青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

Cpper
C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿

使用QGraphicsScene顯示矩形框

int main(int argc, char *argv[])
{
    QApplication app(argc,argv);
    QGraphicsScene scene;
    scene.setSceneRect(
0,0,3000,3000);
    
    
for(int i=0;i<32;i++)
    {
        
for(int j=0;j<12;j++)
        {
            QGraphicsRectItem
* item = new QGraphicsRectItem(20+300*i,20+120*j,240,72);
            item
->setBrush(QColor(79,136,187,255));
            scene.addItem(item);
        }
    }
    
    QGraphicsView view(
&scene);
    view.setDragMode(QGraphicsView::ScrollHandDrag);
    view.resize(
600,540);
    view.show();

    
return app.exec();
}
posted @ 2015-12-09 18:14 ccsdu2009 閱讀(451) | 評論 (0)編輯 收藏
 
     摘要: 最近想做個基于Opengl的GUI試了下SFML發(fā)現(xiàn)其String類對寬字節(jié)轉(zhuǎn)換有問題,就修改了下String并重命名為Utf8使用這個應(yīng)該可以正確顯示中文該類修改如下:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/////////////////...  閱讀全文
posted @ 2015-11-20 13:09 ccsdu2009 閱讀(640) | 評論 (0)編輯 收藏
 
import QtQuick 1.1

Text 
{
    Timer 
    {
        triggeredOnStart: 
true
        onTriggered: parent.text 
= Qt.formatTime(new Date())
        interval: 
1000; running: visible; repeat: true;
    }

    font.pixelSize: 
32
    font.family: 
"sans-serif"
    font.bold: 
true
    color: 
"#a1ff09"
}
posted @ 2015-11-04 11:43 ccsdu2009 閱讀(793) | 評論 (0)編輯 收藏
 
import QtQuick 2.0
import QtQuick.Controls 
1.3  
import QtQuick.Window 
2.2  

ApplicationWindow 
{
    id: window 
    visible: 
true   
    title: qsTr(
"Hello World")  
    width: 
480  
    height: 
480  
    color: 
"#339546"
    property variant colorArray: [
"#00bde3","#67c111","#ea7025","#ef0748","#1894af"

    Column
    {
        id: flow
        spacing: 
2
        anchors.fill: parent

        Grid
        {
            anchors.margins: 
8
            spacing:
2
            Repeater
            {
                model: 
12
                Rectangle
                {
                    id: flag
                    width: 
120
                    height: 
0
                    property 
int colorIndex: Math.floor(Math.random()*5)
                    color: window.colorArray[colorIndex]
                    border.color: Qt.lighter(color)
                    Text
                    {
                        anchors.centerIn: parent
                        color: 
"#f0f0f0"
                        font.pixelSize: 
18
                        text: qsTr(
"WPS表單")
                    }

                    MouseArea 
                    {
                         anchors.fill: parent
                         onClicked: 
                         {
                             animateColor.start()
                             animateOpacity.start()
                         }
                    }

                    PropertyAnimation 
                    {
                         id: animateColor; 
                         target: flag; 
                         properties: 
"color"
                         to: 
"green"
                         duration: 
100
                    }

                    NumberAnimation 
                    {
                         id: animateOpacity
                         target: flag
                         properties: 
"opacity"
                         from: 
0.99
                         to: 
1.0
                         loops: Animation.Infinite
                         easing {type: Easing.OutBack; overshoot: 
500}
                    }

                    PropertyAnimation on height{to: 
24 ;duration:600; loops:Animation.Infinite }
                } 
            }
        }
        
        Rectangle
        {
            id: desc
            width: 
486
            height: 
0
            property 
int colorIndex: Math.floor(Math.random()*5)
            color: window.colorArray[colorIndex]
            border.color: Qt.lighter(color)
            
            Text
            {
                anchors.centerIn: parent
                color: 
"#f0f0f0"
                font.pixelSize: 
18
                text: qsTr(
"描述信息")
            }

            PropertyAnimation on height{to: 
32 ;duration:600; loops:Animation.Infinite }
        }

        Rectangle
        {
            id: detail
            width: 
486
            height: 
0
            property 
int colorIndex: Math.floor(Math.random()*5)
            color: window.colorArray[colorIndex]
            border.color: Qt.lighter(color)
            
            Text
            {
                id: text
                anchors.centerIn: parent
                color: 
"#f0f0f0"
                font.pixelSize: 
18
                text: qsTr(
"點擊展開")
            }

            MouseArea  
            {  
                anchors.fill: parent  
   
                onReleased:
                {
                    text.text 
= row.visible == true ? qsTr("點擊展開") : qsTr("點擊折疊")
                    row.visible 
= row.visible == true ? false : true
                } 
            }  

            PropertyAnimation on height{to: 
32 ;duration:600; loops:Animation.Infinite }
        }  

        Row
        {
            id: row
            visible: 
false
            spacing: 
2
            
            Rectangle
            {
                id: d1
                width: 
120
                height: 
32
                property 
int colorIndex: Math.floor(Math.random()*5)
                color: window.colorArray[colorIndex]
                border.color: Qt.lighter(color)
                Text
                {
                    anchors.centerIn: parent
                    color: 
"#f0f0f0"
                    font.pixelSize: 
18
                    text: qsTr(
"WPS表單")
                }
            }
            Rectangle
            {
                id: d2
                width: 
120
                height: 
32
                property 
int colorIndex: Math.floor(Math.random()*5)
                color: window.colorArray[colorIndex]
                border.color: Qt.lighter(color)
                Text
                {
                    anchors.centerIn: parent
                    color: 
"#f0f0f0"
                    font.pixelSize: 
18
                    text: qsTr(
"WPS表單")
                }
            }
            Rectangle
            {
                id: d3
                width: 
120
                height: 
32
                property 
int colorIndex: Math.floor(Math.random()*5)
                color: window.colorArray[colorIndex]
                border.color: Qt.lighter(color)
                Text
                {
                    anchors.centerIn: parent
                    color: 
"#f0f0f0"
                    font.pixelSize: 
18
                    text: qsTr(
"WPS表單")
                }
            }
        }
    }

posted @ 2015-11-03 19:37 ccsdu2009 閱讀(400) | 評論 (0)編輯 收藏
 
    bool unzip(const QString& in_file_path, const QString& out_file_path)  
    {  
        QuaZip archive(in_file_path);  
        
if (!archive.open(QuaZip::mdUnzip))  
            
return false;  
          
        QString path 
= out_file_path;  
        
if (!path.endsWith("/"&& !out_file_path.endsWith("\\"))  
            path 
+= "/";  
      
        QDir dir(out_file_path);  
        
if (!dir.exists())  
            dir.mkpath(out_file_path);  
      
        
forbool f = archive.goToFirstFile(); f; f = archive.goToNextFile() )  
        {  
            QString filePath 
= archive.getCurrentFileName();  
            QuaZipFile zFile(archive.getZipName(), filePath);  
            zFile.open(QIODevice::ReadOnly );  
            QByteArray ba 
= zFile.readAll();  
            zFile.close();  
      
            
if (filePath.endsWith("/"))  
            {  
                dir.mkpath(filePath);  
            }  
            
else  
            {  
                QFile dstFile(path 
+ filePath);  
                
if (!dstFile.open(QIODevice::WriteOnly))  
                    
return false;  
                dstFile.write(ba);  
                dstFile.close();  
            }  
        }  
      
        
return true;  
    }  

源于:
http://blog.csdn.net/kfbyj/article/details/13888101
證實可用.
posted @ 2015-10-16 16:33 ccsdu2009 閱讀(1034) | 評論 (0)編輯 收藏
 
#include <QtCore/QCoreApplication>
#include 
<QTextStream>
#include 
<QXmlStreamReader>
#include 
<QtXML/QDom.h>
#include 
<QZip/QuaZipFile.h>
#include 
<iostream>

int main(int argc,char *argv[])
{
    QCoreApplication app(argc,argv);
    QuaZip zip(
":qrc/zip.zip");
    
if(!zip.open(QuaZip::mdUnzip))
    {
        std::cout
<<"open failed:"<<zip.getZipError()<<std::endl;
        system(
"pause");
        
return -1;
    }

    
if(zip.setCurrentFile("list.xml"))
    {
        QuaZipFile zipfile(
&zip);
        
if(!zipfile.open(QIODevice::ReadOnly))
        {
            std::cout
<<"open zipfile failed"<<std::endl;
            system(
"pause");
            
return -1;
        }

        QTextStream stream(
&zipfile);
        
while(!stream.atEnd())
            std::cout
<<qPrintable(stream.readLine())<<std::endl;

        zipfile.close();
        zip.close();
    }
    
else
        std::cout
<<"set current file failed."<<std::endl;
    system(
"pause");
    
return 1;
}

如上,需要使用QuaZip庫
posted @ 2015-10-10 10:11 ccsdu2009 閱讀(2746) | 評論 (0)編輯 收藏
 
本來打算使用QFtp,居然上傳不成功

#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#ifdef WIN32
#include <io.h>
#else
#include <unistd.h>
#endif

#define REMOTE_URL      "sftp://account:password@xx.xx.xx.xx/"

static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
    curl_off_t nread;
    size_t retcode = fread(ptr, size, nmemb, stream);
    nread = (curl_off_t)retcode;
    fprintf(stderr, "*** We read %" CURL_FORMAT_CURL_OFF_T " bytes from file\n", nread);
    return retcode;
}

int main(int argc,char *argv[])
{
    if(argc != 3)
    {
        printf("2 paramenters is needed.\n");
        return -1;
    
}

    char* local_file = argv[1];
    char* remote_file = argv[2];

    printf("call me for update -:%s,%s\n",local_file,remote_file);

    char remoteurl[1024] = 
{0};
    strcpy(remoteurl,REMOTE_URL);
    strcat(remoteurl,remote_file);

    CURL* curl;
    CURLcode res;
    FILE* file;
    struct stat file_info;
    curl_off_t fsize;

    if(stat(local_file,&file_info))
    
{
        printf("couldnt open '%s'
: %s\n", local_file, strerror(errno));
        return 1;
    
}

    fsize = (curl_off_t)file_info.st_size;
    printf("Local file size: %" CURL_FORMAT_CURL_OFF_T " bytes.\n", fsize);

    file = fopen(local_file, "rb");
    curl_global_init(CURL_GLOBAL_ALL);

    curl = curl_easy_init();

    if(curl)
    
{
        curl_easy_setopt(curl,CURLOPT_READFUNCTION,read_callback);
        curl_easy_setopt(curl,CURLOPT_UPLOAD,1L);
        curl_easy_setopt(curl,CURLOPT_URL,remoteurl);
        curl_easy_setopt(curl,CURLOPT_READDATA,file);
        curl_easy_setopt(curl,CURLOPT_INFILESIZE_LARGE,(curl_off_t)fsize);
        curl_easy_setopt(curl,CURLOPT_FTP_RESPONSE_TIMEOUT,120);
        res = curl_easy_perform(curl);
        if(res != CURLE_OK)
            fprintf(stderr,"curl_easy_perform() failed
: %s\n",curl_easy_strerror(res));
        curl_easy_cleanup(curl);
        fprintf(stderr,"finished update.");
    
}

    fclose(file);
    curl_global_cleanup();
    return 0;
}

以上代碼經(jīng)過實際測試.
posted @ 2015-08-31 17:21 ccsdu2009 閱讀(2186) | 評論 (0)編輯 收藏
 
 -no-icu -no-opengl -confirm-license -opensource -nomake examples -nomake tests -mp -no-harfbuzz -no-angle -D _CRT_SECURE_NO_WARNINGS -skip qtactiveqt -skip qtandroidextras -skip qtconnectivity -skip qtdeclarative -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtserialport -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtx11extras -skip qtxmlpatterns
posted @ 2015-08-27 09:43 ccsdu2009 閱讀(660) | 評論 (0)編輯 收藏
 
import QtQuick 2.0
import QtQuick.Particles 2.0

Rectangle 
{
    id
: root
    width: 480
; height: 360
    color: "#1f1f1f"
    ParticleSystem 
    {
        id: ps
    
}
    
    Emitter 
    
{
        id
: emitter
        anchors.left: parent.left
        anchors.verticalCenter: parent.verticalCenter
        width: 1
; height: 1
        system: ps
        emitRate: 10
        lifeSpan: 6400
        lifeSpanVariation: 600
        size: 32
        
        velocity: PointDirection 
        {
            x: 100
            y: 0
            xVariation: 0
            yVariation: 100/6
        
}
        
        acceleration: AngleDirection 
        
{
            angle
: 90
            magnitude: 30
        
}
    }
    ImageParticle 
    
{
        source
: "assets/ufo.png"
        system: ps
    
}
}
posted @ 2015-08-20 14:31 ccsdu2009 閱讀(556) | 評論 (0)編輯 收藏
 
import QtQuick 2.2  
import QtQuick.Controls 1.1
    
Canvas
{
    id: root
    width: 200; height: 200
    onPaint:
    {
        var ctx = getContext("2d")
        ctx.lineWidth = 2
        ctx.strokeStyle = "blue"
        ctx.fillStyle = "red"
        ctx.beginPath()
            ctx.moveTo(50,50)
            ctx.lineTo(150,50)
            ctx.lineTo(150,150)
            ctx.lineTo(50,150)
        ctx.closePath()
        ctx.fillRect(10,10,10,10)
        ctx.strokeRect(20,20,10,10);
        ctx.fill()
        ctx.stroke()
    }
}
使用漸變
import QtQuick 2.2  
import QtQuick.Controls 1.1
    
Canvas
{
    id: root
    width: 200; height: 200
    onPaint:
    {
        var ctx = getContext("2d")
        var gradient = ctx.createLinearGradient(0,0,200,200)
        gradient.addColorStop(0,"blue")
        gradient.addColorStop(0.5,"red")
        gradient.addColorStop(1,"yellow")
        ctx.fillStyle = gradient
        ctx.fillRect(10,10,100,100)
    }
}
增加陰影
import QtQuick 2.2  
import QtQuick.Controls 1.1
    
Canvas
{
    id: root
    width: 200; height: 200
    onPaint:
    {
        var ctx = getContext("2d")
        ctx.shadowColor = "black";
        ctx.shadowOffsetX = 2;
        ctx.shadowOffsetY = 2;
        var gradient = ctx.createLinearGradient(0,0,200,200)
        gradient.addColorStop(0,"blue")
        gradient.addColorStop(0.5,"red")
        gradient.addColorStop(1,"yellow")
        ctx.fillStyle = gradient
        ctx.fillRect(10,10,100,100)
    }
}
posted @ 2015-08-20 14:11 ccsdu2009 閱讀(591) | 評論 (0)編輯 收藏
僅列出標題
共38頁: First 5 6 7 8 9 10 11 12 13 Last 
 
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美深夜影院| 在线不卡中文字幕| 美女主播一区| 亚洲国产日韩一区二区| 欧美一级在线视频| 亚洲国产91精品在线观看| 欧美日韩在线精品| 欧美国产精品久久| 99国产精品久久| 亚洲综合成人在线| 亚洲精品国产精品乱码不99| 欧美屁股在线| 免费久久99精品国产自| 欧美日韩裸体免费视频| 久久影音先锋| 国产精品久久一级| 麻豆亚洲精品| 亚洲午夜激情| 欧美一级理论片| 久久亚洲精品中文字幕冲田杏梨| 性娇小13――14欧美| 欧美一区二区日韩一区二区| 亚洲曰本av电影| 免费h精品视频在线播放| 久久久久久一区| 亚洲老司机av| 久久久久久综合| 国产精品对白刺激久久久| 国产专区一区| 米奇777超碰欧美日韩亚洲| 伊人久久成人| 一本色道久久88精品综合| 亚洲欧美日韩中文播放| 久久久久久久91| 国产精品一区二区三区四区 | 欧美午夜宅男影院| 国产一区在线视频| 性欧美暴力猛交69hd| 亚洲激情欧美激情| 久久亚洲春色中文字幕| 激情视频一区| 久久av资源网站| 亚洲第一主播视频| 99在线热播精品免费99热| 亚洲欧美一区二区原创| 免费成人av在线| 欧美激情黄色片| 国产女人精品视频| 一本色道久久加勒比88综合| 欧美顶级大胆免费视频| 欧美成人精品在线| 91久久国产自产拍夜夜嗨| 久久一区亚洲| 亚洲免费视频在线观看| 欧美精品免费在线| 黄色精品一二区| 亚洲欧美国产高清| 亚洲精品日韩久久| 欧美国产日本在线| 在线观看亚洲一区| 亚洲第一中文字幕| 欧美日韩成人综合| 亚洲一区日韩| 久久在线视频在线| 中文国产亚洲喷潮| 一区二区三区视频在线| 亚洲欧美一区二区视频| 亚洲人成网站精品片在线观看| 日韩视频一区二区在线观看 | 91久久中文字幕| 蜜桃av一区二区| 夜夜嗨av色综合久久久综合网| 亚洲激情电影在线| 国产三级欧美三级| 快射av在线播放一区| 欧美a级片一区| 欧美一级欧美一级在线播放| 亚洲一区二区在线免费观看| 国产精品亚洲激情| 欧美成在线视频| 国产精品爽爽爽| 男女精品网站| 国产精品日韩欧美综合 | 欧美成人免费在线观看| 中文网丁香综合网| 女人香蕉久久**毛片精品| 亚洲视频1区| 免费不卡中文字幕视频| 亚洲一区二区三区欧美| 久久亚洲欧洲| 欧美/亚洲一区| 亚洲激情一区二区| 欧美剧在线免费观看网站| 欧美激情久久久久| av成人手机在线| 国产一区二区毛片| 免费国产一区二区| 妖精视频成人观看www| 久久久精品久久久久| 亚洲欧美成人综合| 国产一区二区三区免费不卡 | 国产日韩欧美一区二区| 久久gogo国模裸体人体| 免费91麻豆精品国产自产在线观看| 曰韩精品一区二区| 欧美日韩亚洲综合| 欧美国产日韩在线观看| 午夜一区在线| 夜夜狂射影院欧美极品| 亚洲一区二区成人在线观看| 欧美激情一二三区| 亚洲人成网站色ww在线| 亚洲伊人色欲综合网| 国产精品久久影院| 美女诱惑一区| 欧美在线free| 亚洲狼人综合| 欧美大胆a视频| 欧美一区二区成人| 亚洲免费av网站| 一区二区视频免费完整版观看| 欧美色图一区二区三区| 久久久欧美一区二区| 久热国产精品| 欧美国产91| 欧美黄色免费网站| 欧美日韩一区二区三区四区五区 | 国产一区欧美| 亚洲韩日在线| 欧美日韩你懂的| 久久gogo国模啪啪人体图| 亚洲精品专区| 亚洲激情二区| 亚洲激情一区二区三区| 欧美黄色片免费观看| 欧美一区二区| 亚洲欧美日韩精品一区二区| 亚洲精品自在久久| 亚洲精品激情| 亚洲欧美日产图| 久久精品99国产精品酒店日本| 欧美一区二区在线播放| 日韩午夜在线观看视频| 91久久久久久久久| 亚洲电影免费观看高清完整版| 一区视频在线| 亚洲精品国偷自产在线99热| 在线观看视频一区| 这里只有精品视频在线| 91久久夜色精品国产网站| 一本久久青青| 亚洲一区二区三区涩| 亚洲欧美一级二级三级| 久久中文字幕一区二区三区| 欧美3dxxxxhd| 亚洲亚洲精品在线观看| 久久福利电影| 欧美激情视频在线播放| 国产乱码精品一区二区三| 伊人蜜桃色噜噜激情综合| 亚洲小说区图片区| 免费成人黄色片| 性色av香蕉一区二区| 欧美日韩在线视频一区| 亚洲日本激情| 亚洲精品一区在线观看香蕉| 欧美精品亚洲精品| 亚洲精品社区| 久久伊伊香蕉| 午夜在线a亚洲v天堂网2018| 国产精品白丝jk黑袜喷水| 香蕉乱码成人久久天堂爱免费| 欧美日韩一区二区三区四区在线观看 | 亚洲欧美电影在线观看| 欧美电影免费观看网站| 在线观看三级视频欧美| 午夜精品偷拍| 久久精品九九| 亚洲第一区中文99精品| 久久亚洲视频| 欧美成人精品一区二区| 在线午夜精品| 久久先锋资源| 亚洲欧美成人一区二区三区| 欧美伊人久久久久久午夜久久久久 | 久久久久91| 久久成人精品视频| 国产夜色精品一区二区av| 亚洲成色777777在线观看影院| 玖玖玖国产精品| 久久久久国产精品一区三寸| 欧美绝品在线观看成人午夜影视| 久久亚洲综合| 国产精品九九| 亚洲国产老妈| 精品51国产黑色丝袜高跟鞋| 欧美成人午夜| 国产真实精品久久二三区| 亚洲一区二区三区涩| 一区二区电影免费观看|