亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mainwindow.cpp

?? 利用Qt寫的白板程序
?? CPP
字號:
/******************************************************************************** Copyright (C) 2005-2008 Trolltech ASA. All rights reserved.**** This file is part of the example classes of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License versions 2.0 or 3.0 as published by the Free Software** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3** included in the packaging of this file.  Alternatively you may (at** your option) use any later version of the GNU General Public** License if such license has been publicly approved by Trolltech ASA** (or its successors, if any) and the KDE Free Qt Foundation. In** addition, as a special exception, Trolltech gives you certain** additional rights. These rights are described in the Trolltech GPL** Exception version 1.1, which can be found at** http://www.trolltech.com/products/qt/gplexception/ and in the file** GPL_EXCEPTION.txt in this package.**** Please review the following information to ensure GNU General** Public Licensing requirements will be met:** http://trolltech.com/products/qt/licenses/licensing/opensource/. If** you are unsure which license is appropriate for your use, please** review the following information:** http://trolltech.com/products/qt/licenses/licensing/licensingoverview** or contact the sales department at sales@trolltech.com.**** In addition, as a special exception, Trolltech, as the sole** copyright holder for Qt Designer, grants users of the Qt/Eclipse** Integration plug-in the right for the Qt/Eclipse Integration to** link to functionality provided by Qt Designer and its related** libraries.**** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR** A PARTICULAR PURPOSE. Trolltech reserves all rights not expressly** granted herein.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include <QtGui>#include "mainwindow.h"#include "scribblearea.h"MainWindow::MainWindow(){    scribbleArea = new ScribbleArea;    setCentralWidget(scribbleArea);    createActions();    createMenus();    setWindowTitle(tr("Scribble"));    resize(500, 500);}void MainWindow::closeEvent(QCloseEvent *event){    if (maybeSave()) {        event->accept();    } else {        event->ignore();    }}void MainWindow::open(){    if (maybeSave()) {        QString fileName = QFileDialog::getOpenFileName(this,                                   tr("Open File"), QDir::currentPath());        if (!fileName.isEmpty())            scribbleArea->openImage(fileName);    }}void MainWindow::save(){    QAction *action = qobject_cast<QAction *>(sender());    QByteArray fileFormat = action->data().toByteArray();    saveFile(fileFormat);}void MainWindow::penColor(){    QColor newColor = QColorDialog::getColor(scribbleArea->penColor());    if (newColor.isValid())        scribbleArea->setPenColor(newColor);}void MainWindow::penWidth(){    bool ok;    int newWidth = QInputDialog::getInteger(this, tr("Scribble"),                                            tr("Select pen width:"),                                            scribbleArea->penWidth(),                                            1, 50, 1, &ok);    if (ok)        scribbleArea->setPenWidth(newWidth);}void MainWindow::about(){    QMessageBox::about(this, tr("About Scribble"),            tr("<p>The <b>Scribble</b> example shows how to use QMainWindow as the "               "base widget for an application, and how to reimplement some of "               "QWidget's event handlers to receive the events generated for "               "the application's widgets:</p><p> We reimplement the mouse event "               "handlers to facilitate drawing, the paint event handler to "               "update the application and the resize event handler to optimize "               "the application's appearance. In addition we reimplement the "               "close event handler to intercept the close events before "               "terminating the application.</p><p> The example also demonstrates "               "how to use QPainter to draw an image in real time, as well as "               "to repaint widgets.</p>"));}void MainWindow::createActions(){    openAct = new QAction(tr("&Open..."), this);    openAct->setShortcut(tr("Ctrl+O"));    connect(openAct, SIGNAL(triggered()), this, SLOT(open()));    foreach (QByteArray format, QImageWriter::supportedImageFormats()) {        QString text = tr("%1...").arg(QString(format).toUpper());        QAction *action = new QAction(text, this);        action->setData(format);        connect(action, SIGNAL(triggered()), this, SLOT(save()));        saveAsActs.append(action);    }    printAct = new QAction(tr("&Print..."), this);    connect(printAct, SIGNAL(triggered()), scribbleArea, SLOT(print()));    exitAct = new QAction(tr("E&xit"), this);    exitAct->setShortcut(tr("Ctrl+Q"));    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));    penColorAct = new QAction(tr("&Pen Color..."), this);    connect(penColorAct, SIGNAL(triggered()), this, SLOT(penColor()));    penWidthAct = new QAction(tr("Pen &Width..."), this);    connect(penWidthAct, SIGNAL(triggered()), this, SLOT(penWidth()));    clearScreenAct = new QAction(tr("&Clear Screen"), this);    clearScreenAct->setShortcut(tr("Ctrl+L"));    connect(clearScreenAct, SIGNAL(triggered()),            scribbleArea, SLOT(clearImage()));    aboutAct = new QAction(tr("&About"), this);    connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));    aboutQtAct = new QAction(tr("About &Qt"), this);    connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));}void MainWindow::createMenus(){    saveAsMenu = new QMenu(tr("&Save As"), this);    foreach (QAction *action, saveAsActs)        saveAsMenu->addAction(action);    fileMenu = new QMenu(tr("&File"), this);    fileMenu->addAction(openAct);    fileMenu->addMenu(saveAsMenu);    fileMenu->addAction(printAct);    fileMenu->addSeparator();    fileMenu->addAction(exitAct);    optionMenu = new QMenu(tr("&Options"), this);    optionMenu->addAction(penColorAct);    optionMenu->addAction(penWidthAct);    optionMenu->addSeparator();    optionMenu->addAction(clearScreenAct);    helpMenu = new QMenu(tr("&Help"), this);    helpMenu->addAction(aboutAct);    helpMenu->addAction(aboutQtAct);    menuBar()->addMenu(fileMenu);    menuBar()->addMenu(optionMenu);    menuBar()->addMenu(helpMenu);}bool MainWindow::maybeSave(){    if (scribbleArea->isModified()) {       QMessageBox::StandardButton ret;       ret = QMessageBox::warning(this, tr("Scribble"),                          tr("The image has been modified.\n"                             "Do you want to save your changes?"),                          QMessageBox::Save | QMessageBox::Discard			  | QMessageBox::Cancel);        if (ret == QMessageBox::Save) {            return saveFile("png");        } else if (ret == QMessageBox::Cancel) {            return false;        }    }    return true;}bool MainWindow::saveFile(const QByteArray &fileFormat){    QString initialPath = QDir::currentPath() + "/untitled." + fileFormat;    QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),                               initialPath,                               tr("%1 Files (*.%2);;All Files (*)")                               .arg(QString(fileFormat.toUpper()))                               .arg(QString(fileFormat)));    if (fileName.isEmpty()) {        return false;    } else {        return scribbleArea->saveImage(fileName, fileFormat);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久品道一品道久久精品| 欧美日韩高清不卡| 91精品国产一区二区三区| 亚洲男人天堂av| 成人精品视频一区二区三区 | 中文字幕一区二区日韩精品绯色| 日韩中文字幕区一区有砖一区| 欧美女孩性生活视频| 国产精品国产三级国产aⅴ入口 | 国产自产高清不卡| 久久亚洲免费视频| 国产麻豆精品视频| 国产精品久线在线观看| 成人免费高清在线| 国产精品素人一区二区| 91在线观看免费视频| 精品国产一区二区亚洲人成毛片 | 亚洲成av人片一区二区三区 | 日韩中文字幕1| 欧美成人猛片aaaaaaa| 国产一区二区三区四区五区美女| 亚洲精品在线观看网站| 国产河南妇女毛片精品久久久 | 波波电影院一区二区三区| 亚洲天天做日日做天天谢日日欢| 99久久精品情趣| 亚洲国产日韩一级| 日韩免费性生活视频播放| 国产91丝袜在线观看| 亚洲人123区| 在线成人av网站| 国产成人午夜精品5599| 亚洲精品乱码久久久久久黑人| 欧美日韩一区二区三区不卡| 一区二区在线观看av| 制服视频三区第一页精品| 日本午夜一区二区| 精品日韩99亚洲| 91看片淫黄大片一级在线观看| 亚洲成人自拍偷拍| 久久婷婷综合激情| 欧美三级蜜桃2在线观看| 精品无码三级在线观看视频| 国产精品伦理在线| 91精品国产91久久综合桃花| 成人美女视频在线看| 亚洲第一福利一区| 精品蜜桃在线看| 91久久一区二区| 国产很黄免费观看久久| 婷婷激情综合网| 国产欧美精品一区二区色综合| 欧美中文字幕久久| 国产一区二区在线免费观看| 亚洲一区二区不卡免费| 欧美一级精品大片| www.av精品| 国内精品免费在线观看| 亚洲第一av色| 亚洲欧美色一区| 人人爽香蕉精品| 一区二区三区四区视频精品免费 | 亚洲精品菠萝久久久久久久| 成人精品一区二区三区四区| 亚洲三级在线看| 欧美视频中文字幕| 成人动漫一区二区三区| 午夜精品免费在线| 国产精品超碰97尤物18| 精品国产制服丝袜高跟| 欧美片在线播放| eeuss鲁片一区二区三区在线看| 免费在线看一区| 亚洲美女电影在线| 亚洲国产高清在线| 2021久久国产精品不只是精品| 欧美性大战久久久久久久| 亚洲色图视频网站| 亚洲欧美日韩国产手机在线| 国产精品久久久久久久午夜片| 中文字幕一区免费在线观看| 国产精品视频在线看| 精品伦理精品一区| 欧美福利视频导航| 亚洲va欧美va国产va天堂影院| 一本在线高清不卡dvd| 色婷婷精品大在线视频| 国产一区二区成人久久免费影院| 久久精品久久99精品久久| 亚洲精品高清视频在线观看| 欧美一级理论片| 91看片淫黄大片一级在线观看| 久久久亚洲精华液精华液精华液| 色综合久久88色综合天天6| 一区二区不卡在线播放| 亚洲欧美日韩国产另类专区| 中文字幕av一区二区三区高| 日韩精品色哟哟| 亚洲欧美自拍偷拍| 亚洲成av人综合在线观看| 亚洲第一狼人社区| 久久久久久久久岛国免费| 91精品久久久久久蜜臀| 老司机一区二区| 亚洲成人精品在线观看| 国产成人精品免费视频网站| 色视频一区二区| 欧美久久久久久久久久| 欧美精品一区视频| 国产剧情一区二区| 亚洲影视在线观看| 亚洲宅男天堂在线观看无病毒| 蜜桃av一区二区在线观看 | 国产自产2019最新不卡| 蜜臀av亚洲一区中文字幕| 成人毛片视频在线观看| 91女厕偷拍女厕偷拍高清| 欧美在线观看一区| 欧美性视频一区二区三区| 欧美一区二区免费观在线| 久久久久久久久久久久电影| 中文字幕在线不卡| 亚洲v日本v欧美v久久精品| 精品亚洲国内自在自线福利| 97精品久久久久中文字幕| 欧美在线观看你懂的| 精品美女在线观看| 国产精品天美传媒| 午夜精品福利一区二区蜜股av| 国产精品99久久久久久宅男| 99久久精品免费精品国产| 欧美刺激脚交jootjob| 国产精品少妇自拍| 日本欧美一区二区三区乱码| 99国产精品久久久| 91精品在线免费| 91久久国产最好的精华液| 精品成人一区二区三区| 亚洲人一二三区| 另类中文字幕网| 色综合久久久久久久久久久| 日韩一卡二卡三卡国产欧美| 日本一二三四高清不卡| 日本成人超碰在线观看| www.性欧美| 精品免费视频一区二区| 亚洲黄色尤物视频| 国产成人免费9x9x人网站视频| 欧美色国产精品| 国产精品全国免费观看高清| 日韩综合一区二区| 91在线视频18| 久久久午夜精品理论片中文字幕| 亚洲尤物视频在线| 久国产精品韩国三级视频| av亚洲产国偷v产偷v自拍| 欧美一区二区高清| 国产精品美日韩| 久久er精品视频| 欧美日韩亚洲丝袜制服| 国产精品久久久久久亚洲毛片| 久草在线在线精品观看| 欧美日韩一卡二卡三卡 | 色综合天天综合网天天狠天天| 精品久久久影院| 三级在线观看一区二区| 91福利视频网站| 中国av一区二区三区| 久久国产成人午夜av影院| 在线中文字幕不卡| 国产精品大尺度| 不卡一卡二卡三乱码免费网站| 精品国产一区二区三区久久久蜜月| 亚洲午夜电影网| 91国偷自产一区二区三区成为亚洲经典 | 中文字幕欧美三区| 国产精品白丝av| 国产精品色一区二区三区| 成人动漫视频在线| 中文字幕一区二区三区av| 一本大道久久a久久综合| 亚洲精品国产无天堂网2021| 欧洲精品在线观看| 日本中文字幕一区二区有限公司| 欧美一区二区三区男人的天堂| 免费看欧美女人艹b| 精品99久久久久久| 成人伦理片在线| 亚洲一区在线观看免费观看电影高清 | 亚洲男人的天堂在线观看| 色94色欧美sute亚洲13| 一区二区三区四区不卡在线| 激情av综合网| 日本一区二区在线不卡| 91女人视频在线观看| 亚洲成人av免费| 2023国产一二三区日本精品2022| 成人免费三级在线| 亚洲国产精品久久艾草纯爱| 日韩小视频在线观看专区|