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

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

?? mainwindow.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
字號:
/******************************************************************************** Copyright (C) 2005-2006 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 version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** 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"MainWindow::MainWindow(){    textEdit = new QTextEdit;    setCentralWidget(textEdit);    createActions();    createMenus();    createToolBars();    createStatusBar();    createDockWindows();    setWindowTitle(tr("Dock Widgets"));    newLetter();}void MainWindow::newLetter(){    textEdit->clear();    QTextCursor cursor(textEdit->textCursor());    cursor.movePosition(QTextCursor::Start);    QTextFrame *topFrame = cursor.currentFrame();    QTextFrameFormat topFrameFormat = topFrame->frameFormat();    topFrameFormat.setPadding(16);    topFrame->setFrameFormat(topFrameFormat);    QTextCharFormat textFormat;    QTextCharFormat boldFormat;    boldFormat.setFontWeight(QFont::Bold);    QTextCharFormat italicFormat;    italicFormat.setFontItalic(true);    QTextTableFormat tableFormat;    tableFormat.setBorder(1);    tableFormat.setCellPadding(16);    tableFormat.setAlignment(Qt::AlignRight);    cursor.insertTable(1, 1, tableFormat);    cursor.insertText("The Firm", boldFormat);    cursor.insertBlock();    cursor.insertText("321 City Street", textFormat);    cursor.insertBlock();    cursor.insertText("Industry Park");    cursor.insertBlock();    cursor.insertText("Some Country");    cursor.setPosition(topFrame->lastPosition());    cursor.insertText(QDate::currentDate().toString("d MMMM yyyy"), textFormat);    cursor.insertBlock();    cursor.insertBlock();    cursor.insertText("Dear ", textFormat);    cursor.insertText("NAME", italicFormat);    cursor.insertText(",", textFormat);    for (int i = 0; i < 3; ++i)        cursor.insertBlock();    cursor.insertText(tr("Yours sincerely,"), textFormat);    for (int i = 0; i < 3; ++i)        cursor.insertBlock();    cursor.insertText("The Boss", textFormat);    cursor.insertBlock();    cursor.insertText("ADDRESS", italicFormat);}void MainWindow::print(){    QTextDocument *document = textEdit->document();    QPrinter printer;    QPrintDialog *dlg = new QPrintDialog(&printer, this);    if (dlg->exec() != QDialog::Accepted)        return;    document->print(&printer);    statusBar()->showMessage(tr("Ready"), 2000);}void MainWindow::save(){    QString fileName = QFileDialog::getSaveFileName(this,                        tr("Choose a file name"), ".",                        tr("HTML (*.html *.htm)"));    if (fileName.isEmpty())        return;    QFile file(fileName);    if (!file.open(QFile::WriteOnly | QFile::Text)) {        QMessageBox::warning(this, tr("Dock Widgets"),                             tr("Cannot write file %1:\n%2.")                             .arg(fileName)                             .arg(file.errorString()));        return;    }    QTextStream out(&file);    QApplication::setOverrideCursor(Qt::WaitCursor);    out << textEdit->toHtml();    QApplication::restoreOverrideCursor();    statusBar()->showMessage(tr("Saved '%1'").arg(fileName), 2000);}void MainWindow::undo(){    QTextDocument *document = textEdit->document();    document->undo();}void MainWindow::insertCustomer(const QString &customer){    if (customer.isEmpty())        return;    QStringList customerList = customer.split(", ");    QTextDocument *document = textEdit->document();    QTextCursor cursor = document->find("NAME");    if (!cursor.isNull()) {        cursor.beginEditBlock();        cursor.insertText(customerList.at(0));        QTextCursor oldcursor = cursor;        cursor = document->find("ADDRESS");        if (!cursor.isNull()) {            for (int i = 1; i < customerList.size(); ++i) {                cursor.insertBlock();                cursor.insertText(customerList.at(i));            }            cursor.endEditBlock();        }        else            oldcursor.endEditBlock();    }}void MainWindow::addParagraph(const QString &paragraph){    if (paragraph.isEmpty())        return;    QTextDocument *document = textEdit->document();    QTextCursor cursor = document->find(tr("Yours sincerely,"));    if (cursor.isNull())        return;    cursor.beginEditBlock();    cursor.movePosition(QTextCursor::PreviousBlock, QTextCursor::MoveAnchor, 2);    cursor.insertBlock();    cursor.insertText(paragraph);    cursor.insertBlock();    cursor.endEditBlock();}void MainWindow::about(){   QMessageBox::about(this, tr("About Dock Widgets"),            tr("The <b>Dock Widgets</b> example demonstrates how to "               "use Qt's dock widgets. You can enter your own text, "               "click a customer to add a customer name and "               "address, and click standard paragraphs to add them."));}void MainWindow::createActions(){    newLetterAct = new QAction(QIcon(":/images/new.png"), tr("&New Letter"),                               this);    newLetterAct->setShortcut(tr("Ctrl+N"));    newLetterAct->setStatusTip(tr("Create a new form letter"));    connect(newLetterAct, SIGNAL(triggered()), this, SLOT(newLetter()));    saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save..."), this);    saveAct->setShortcut(tr("Ctrl+S"));    saveAct->setStatusTip(tr("Save the current form letter"));    connect(saveAct, SIGNAL(triggered()), this, SLOT(save()));    printAct = new QAction(QIcon(":/images/print.png"), tr("&Print..."), this);    printAct->setShortcut(tr("Ctrl+P"));    printAct->setStatusTip(tr("Print the current form letter"));    connect(printAct, SIGNAL(triggered()), this, SLOT(print()));    undoAct = new QAction(QIcon(":/images/undo.png"), tr("&Undo"), this);    undoAct->setShortcut(tr("Ctrl+Z"));    undoAct->setStatusTip(tr("Undo the last editing action"));    connect(undoAct, SIGNAL(triggered()), this, SLOT(undo()));    quitAct = new QAction(tr("&Quit"), this);    quitAct->setShortcut(tr("Ctrl+Q"));    quitAct->setStatusTip(tr("Quit the application"));    connect(quitAct, SIGNAL(triggered()), this, SLOT(close()));    aboutAct = new QAction(tr("&About"), this);    aboutAct->setStatusTip(tr("Show the application's About box"));    connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));    aboutQtAct = new QAction(tr("About &Qt"), this);    aboutQtAct->setStatusTip(tr("Show the Qt library's About box"));    connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));}void MainWindow::createMenus(){    fileMenu = menuBar()->addMenu(tr("&File"));    fileMenu->addAction(newLetterAct);    fileMenu->addAction(saveAct);    fileMenu->addAction(printAct);    fileMenu->addSeparator();    fileMenu->addAction(quitAct);    editMenu = menuBar()->addMenu(tr("&Edit"));    editMenu->addAction(undoAct);    viewMenu = menuBar()->addMenu(tr("&View"));    menuBar()->addSeparator();    helpMenu = menuBar()->addMenu(tr("&Help"));    helpMenu->addAction(aboutAct);    helpMenu->addAction(aboutQtAct);}void MainWindow::createToolBars(){    fileToolBar = addToolBar(tr("File"));    fileToolBar->addAction(newLetterAct);    fileToolBar->addAction(saveAct);    fileToolBar->addAction(printAct);    editToolBar = addToolBar(tr("Edit"));    editToolBar->addAction(undoAct);}void MainWindow::createStatusBar(){    statusBar()->showMessage(tr("Ready"));}void MainWindow::createDockWindows(){    QDockWidget *dock = new QDockWidget(tr("Customers"), this);    dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);    customerList = new QListWidget(dock);    customerList->addItems(QStringList()            << "John Doe, Harmony Enterprises, 12 Lakeside, Ambleton"            << "Jane Doe, Memorabilia, 23 Watersedge, Beaton"            << "Tammy Shea, Tiblanka, 38 Sea Views, Carlton"            << "Tim Sheen, Caraba Gifts, 48 Ocean Way, Deal"            << "Sol Harvey, Chicos Coffee, 53 New Springs, Eccleston"            << "Sally Hobart, Tiroli Tea, 67 Long River, Fedula");    dock->setWidget(customerList);    addDockWidget(Qt::RightDockWidgetArea, dock);    viewMenu->addAction(dock->toggleViewAction());    dock = new QDockWidget(tr("Paragraphs"), this);    paragraphsList = new QListWidget(dock);    paragraphsList->addItems(QStringList()            << "Thank you for your payment which we have received today."            << "Your order has been dispatched and should be with you "               "within 28 days."            << "We have dispatched those items that were in stock. The "               "rest of your order will be dispatched once all the "               "remaining items have arrived at our warehouse. No "               "additional shipping charges will be made."            << "You made a small overpayment (less than $5) which we "               "will keep on account for you, or return at your request."            << "You made a small underpayment (less than $1), but we have "               "sent your order anyway. We'll add this underpayment to "               "your next bill."            << "Unfortunately you did not send enough money. Please remit "               "an additional $. Your order will be dispatched as soon as "               "the complete amount has been received."            << "You made an overpayment (more than $5). Do you wish to "               "buy more items, or should we return the excess to you?");    dock->setWidget(paragraphsList);    addDockWidget(Qt::RightDockWidgetArea, dock);    viewMenu->addAction(dock->toggleViewAction());    connect(customerList, SIGNAL(currentTextChanged(const QString &)),            this, SLOT(insertCustomer(const QString &)));    connect(paragraphsList, SIGNAL(currentTextChanged(const QString &)),            this, SLOT(addParagraph(const QString &)));}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一级二级三级| 成人黄色综合网站| 懂色av一区二区三区蜜臀| 在线观看一区二区精品视频| 欧美刺激午夜性久久久久久久| 国产精品剧情在线亚洲| 久久99日本精品| 欧美性三三影院| 国产精品麻豆欧美日韩ww| 青青草国产精品97视觉盛宴| 色爱区综合激月婷婷| 国产午夜精品福利| 国产一区二区三区在线观看精品 | 国产一区日韩二区欧美三区| 丁香亚洲综合激情啪啪综合| 欧美电影免费观看高清完整版在| 亚洲与欧洲av电影| 91免费观看国产| 国产精品国产三级国产| 国产99精品在线观看| 久久精品夜夜夜夜久久| 久久66热偷产精品| 欧美精品一区二区在线播放| 香蕉成人啪国产精品视频综合网 | 日韩欧美一级特黄在线播放| 亚洲一区二区3| 欧美亚洲国产bt| 亚洲一级片在线观看| 在线中文字幕不卡| 一区二区三区高清不卡| 色8久久精品久久久久久蜜| 最新高清无码专区| 99精品偷自拍| 亚洲激情综合网| 欧美三级韩国三级日本三斤| 亚洲线精品一区二区三区八戒| 欧美性高清videossexo| 亚洲国产成人精品视频| 91精品蜜臀在线一区尤物| 日韩 欧美一区二区三区| 日韩欧美一级二级三级| 久久99精品国产| 久久先锋资源网| 成人国产精品免费观看| 成人欧美一区二区三区视频网页 | 日韩欧美的一区| 国模无码大尺度一区二区三区| 国产日韩欧美激情| 91视频观看视频| 亚洲va国产va欧美va观看| 91精品国产丝袜白色高跟鞋| 精品午夜一区二区三区在线观看| 中国色在线观看另类| 91国偷自产一区二区三区成为亚洲经典 | 欧美久久久久久蜜桃| 麻豆精品一区二区综合av| 久久精品夜夜夜夜久久| 色噜噜狠狠一区二区三区果冻| 视频一区二区中文字幕| 国产欧美日韩在线视频| 91在线一区二区| 久久99国产精品久久99果冻传媒| 国产亚洲欧美日韩日本| 色猫猫国产区一区二在线视频| 日本欧美韩国一区三区| 国产精品久久午夜夜伦鲁鲁| 欧美精品在线视频| 东方aⅴ免费观看久久av| 亚洲超丰满肉感bbw| 国产欧美视频在线观看| 欧美三片在线视频观看| 高清日韩电视剧大全免费| 亚洲制服欧美中文字幕中文字幕| 2020日本不卡一区二区视频| 色哟哟国产精品| 国产麻豆精品theporn| 亚洲精品菠萝久久久久久久| 久久九九国产精品| 欧美精品在线视频| 色妞www精品视频| 国产成人自拍网| 天堂一区二区在线免费观看| 中文字幕乱码一区二区免费| 91精品久久久久久久99蜜桃 | 国产精品第13页| 欧美一级淫片007| 色婷婷国产精品| 国产高清不卡一区| 奇米一区二区三区av| 亚洲国产一区二区视频| 18成人在线观看| 国产精品每日更新在线播放网址| 精品精品国产高清a毛片牛牛| 欧美在线看片a免费观看| 丰满亚洲少妇av| 国产一区二区三区久久久 | 亚洲国产精品嫩草影院| 中文字幕一区二区三区在线播放| 精品电影一区二区| 精品免费视频一区二区| 欧美一二三区精品| 欧美剧情片在线观看| 欧美影片第一页| 在线看国产一区| 一本大道av一区二区在线播放| 成人综合激情网| 国产麻豆精品在线| 国产福利不卡视频| 国产传媒日韩欧美成人| 国内久久婷婷综合| 国产毛片精品视频| 国产aⅴ综合色| 国产大陆亚洲精品国产| 丁香天五香天堂综合| 国产成人超碰人人澡人人澡| 国产成人av一区二区三区在线 | 日本视频免费一区| 美女在线一区二区| 激情小说亚洲一区| 国产一区二区在线看| 国模大尺度一区二区三区| 国产一区二区三区香蕉| 国产不卡视频在线播放| 成人不卡免费av| 色综合久久中文字幕综合网| 色偷偷一区二区三区| 欧美色男人天堂| 日韩一卡二卡三卡国产欧美| 欧美草草影院在线视频| 久久在线免费观看| 国产精品久久午夜夜伦鲁鲁| 亚洲乱码日产精品bd| 亚洲成人av在线电影| 久久国产人妖系列| 国产999精品久久久久久绿帽| 91丝袜美女网| 欧美年轻男男videosbes| 精品免费99久久| 国产精品久久久久aaaa| 午夜精品一区二区三区免费视频 | 精品视频免费看| 久久婷婷成人综合色| 亚洲女人小视频在线观看| 婷婷综合另类小说色区| 国产盗摄精品一区二区三区在线| 色域天天综合网| 日韩欧美一级精品久久| 中文字幕日本乱码精品影院| 午夜国产精品影院在线观看| 国产在线精品一区二区不卡了| 99久久精品免费| 欧美一级理论性理论a| 欧美国产一区视频在线观看| 亚洲一区影音先锋| 国产精品996| 欧美日韩精品一区二区| 欧美韩国一区二区| 欧美aaaaaa午夜精品| aaa欧美日韩| 精品国产乱码久久久久久图片| 亚洲少妇30p| 国产成人精品亚洲日本在线桃色| 欧美三级日韩三级| 国产精品久久久久久久久免费桃花| 亚洲成国产人片在线观看| 国产91高潮流白浆在线麻豆| 欧美一区二区视频观看视频| 国产精品久久久久影院亚瑟 | 久久久99精品免费观看不卡| 一区二区三区av电影| 国产成人在线视频网址| 日韩天堂在线观看| 亚洲午夜电影在线观看| av激情亚洲男人天堂| 久久久久久免费| 人人爽香蕉精品| 色婷婷av一区二区三区之一色屋| 国产色一区二区| 国产一区二三区好的| 在线成人免费视频| 一区二区三区.www| 91国偷自产一区二区三区成为亚洲经典 | 亚洲最色的网站| 成人动漫av在线| 国产欧美日韩在线| 国产精品一区二区三区乱码| 欧美哺乳videos| 免费不卡在线观看| 制服丝袜av成人在线看| 亚洲.国产.中文慕字在线| 一本到不卡精品视频在线观看| 国产精品美女一区二区| 丁香六月久久综合狠狠色| 国产欧美日本一区二区三区| 国产一区二区三区视频在线播放| 日韩欧美电影在线| 国产乱码精品一区二区三区五月婷| 日韩欧美电影一二三| 国内精品免费**视频| 久久亚洲影视婷婷|