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

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

?? mainwindow.cpp

?? 關于嵌入式的QT圖形用戶界面C GUI Programming with QT4書籍的配套源碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
#include <QtGui>#include "finddialog.h"#include "gotocelldialog.h"#include "mainwindow.h"#include "sortdialog.h"#include "spreadsheet.h"MainWindow::MainWindow(){    spreadsheet = new Spreadsheet;    setCentralWidget(spreadsheet);    createActions();    createMenus();    createContextMenu();    createToolBars();    createStatusBar();    readSettings();    findDialog = 0;    setWindowIcon(QIcon(":/images/icon.png"));    setCurrentFile("");}void MainWindow::closeEvent(QCloseEvent *event){    if (okToContinue()) {        writeSettings();        event->accept();    } else {        event->ignore();    }}void MainWindow::newFile(){    if (okToContinue()) {        spreadsheet->clear();        setCurrentFile("");    }}void MainWindow::open(){    if (okToContinue()) {        QString fileName = QFileDialog::getOpenFileName(this,                                   tr("Open Spreadsheet"), ".",                                   tr("Spreadsheet files (*.sp)"));        if (!fileName.isEmpty())            loadFile(fileName);    }}bool MainWindow::save(){    if (curFile.isEmpty()) {        return saveAs();    } else {        return saveFile(curFile);    }}bool MainWindow::saveAs(){    QString fileName = QFileDialog::getSaveFileName(this,                               tr("Save Spreadsheet"), ".",                               tr("Spreadsheet files (*.sp)"));    if (fileName.isEmpty())        return false;    return saveFile(fileName);}void MainWindow::find(){    if (!findDialog) {        findDialog = new FindDialog(this);        connect(findDialog, SIGNAL(findNext(const QString &,                                            Qt::CaseSensitivity)),                spreadsheet, SLOT(findNext(const QString &,                                           Qt::CaseSensitivity)));        connect(findDialog, SIGNAL(findPrevious(const QString &,                                                Qt::CaseSensitivity)),                spreadsheet, SLOT(findPrevious(const QString &,                                               Qt::CaseSensitivity)));    }    findDialog->show();    findDialog->activateWindow();}void MainWindow::goToCell(){    GoToCellDialog dialog(this);    if (dialog.exec()) {        QString str = dialog.lineEdit->text().toUpper();        spreadsheet->setCurrentCell(str.mid(1).toInt() - 1,                                    str[0].unicode() - 'A');    }}void MainWindow::sort(){    SortDialog dialog(this);    QTableWidgetSelectionRange range = spreadsheet->selectedRange();    dialog.setColumnRange('A' + range.leftColumn(),                          'A' + range.rightColumn());    if (dialog.exec()) {        SpreadsheetCompare compare;        compare.keys[0] =              dialog.primaryColumnCombo->currentIndex();        compare.keys[1] =              dialog.secondaryColumnCombo->currentIndex() - 1;        compare.keys[2] =              dialog.tertiaryColumnCombo->currentIndex() - 1;        compare.ascending[0] =              (dialog.primaryOrderCombo->currentIndex() == 0);        compare.ascending[1] =              (dialog.secondaryOrderCombo->currentIndex() == 0);        compare.ascending[2] =              (dialog.tertiaryOrderCombo->currentIndex() == 0);        spreadsheet->sort(compare);    }}void MainWindow::about(){    QMessageBox::about(this, tr("About Spreadsheet"),            tr("<h2>Spreadsheet 1.1</h2>"               "<p>Copyright &copy; 2006 Software Inc."               "<p>Spreadsheet is a small application that "               "demonstrates QAction, QMainWindow, QMenuBar, "               "QStatusBar, QTableWidget, QToolBar, and many other "               "Qt classes."));}void MainWindow::openRecentFile(){    if (okToContinue()) {        QAction *action = qobject_cast<QAction *>(sender());        if (action)            loadFile(action->data().toString());    }}void MainWindow::updateStatusBar(){    locationLabel->setText(spreadsheet->currentLocation());    formulaLabel->setText(spreadsheet->currentFormula());}void MainWindow::spreadsheetModified(){    setWindowModified(true);    updateStatusBar();}void MainWindow::createActions(){    newAction = new QAction(tr("&New"), this);    newAction->setIcon(QIcon(":/images/new.png"));    newAction->setShortcut(tr("Ctrl+N"));    newAction->setStatusTip(tr("Create a new spreadsheet file"));    connect(newAction, SIGNAL(triggered()), this, SLOT(newFile()));    openAction = new QAction(tr("&Open..."), this);    openAction->setIcon(QIcon(":/images/open.png"));    openAction->setShortcut(tr("Ctrl+O"));    openAction->setStatusTip(tr("Open an existing spreadsheet file"));    connect(openAction, SIGNAL(triggered()), this, SLOT(open()));    saveAction = new QAction(tr("&Save"), this);    saveAction->setIcon(QIcon(":/images/save.png"));    saveAction->setShortcut(tr("Ctrl+S"));    saveAction->setStatusTip(tr("Save the spreadsheet to disk"));    connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));    saveAsAction = new QAction(tr("Save &As..."), this);    saveAsAction->setStatusTip(tr("Save the spreadsheet under a new "                                  "name"));    connect(saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()));    for (int i = 0; i < MaxRecentFiles; ++i) {        recentFileActions[i] = new QAction(this);        recentFileActions[i]->setVisible(false);        connect(recentFileActions[i], SIGNAL(triggered()),                this, SLOT(openRecentFile()));    }    exitAction = new QAction(tr("E&xit"), this);    exitAction->setShortcut(tr("Ctrl+Q"));    exitAction->setStatusTip(tr("Exit the application"));    connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));    cutAction = new QAction(tr("Cu&t"), this);    cutAction->setIcon(QIcon(":/images/cut.png"));    cutAction->setShortcut(tr("Ctrl+X"));    cutAction->setStatusTip(tr("Cut the current selection's contents "                               "to the clipboard"));    connect(cutAction, SIGNAL(triggered()), spreadsheet, SLOT(cut()));    copyAction = new QAction(tr("&Copy"), this);    copyAction->setIcon(QIcon(":/images/copy.png"));    copyAction->setShortcut(tr("Ctrl+C"));    copyAction->setStatusTip(tr("Copy the current selection's contents "                                "to the clipboard"));    connect(copyAction, SIGNAL(triggered()), spreadsheet, SLOT(copy()));    pasteAction = new QAction(tr("&Paste"), this);    pasteAction->setIcon(QIcon(":/images/paste.png"));    pasteAction->setShortcut(tr("Ctrl+V"));    pasteAction->setStatusTip(tr("Paste the clipboard's contents into "                                 "the current selection"));    connect(pasteAction, SIGNAL(triggered()),            spreadsheet, SLOT(paste()));    deleteAction = new QAction(tr("&Delete"), this);    deleteAction->setShortcut(tr("Del"));    deleteAction->setStatusTip(tr("Delete the current selection's "                                  "contents"));    connect(deleteAction, SIGNAL(triggered()),            spreadsheet, SLOT(del()));    selectRowAction = new QAction(tr("&Row"), this);    selectRowAction->setStatusTip(tr("Select all the cells in the "                                     "current row"));    connect(selectRowAction, SIGNAL(triggered()),            spreadsheet, SLOT(selectCurrentRow()));    selectColumnAction = new QAction(tr("&Column"), this);    selectColumnAction->setStatusTip(tr("Select all the cells in the "                                        "current column"));    connect(selectColumnAction, SIGNAL(triggered()),            spreadsheet, SLOT(selectCurrentColumn()));    selectAllAction = new QAction(tr("&All"), this);    selectAllAction->setShortcut(tr("Ctrl+A"));    selectAllAction->setStatusTip(tr("Select all the cells in the "                                     "spreadsheet"));    connect(selectAllAction, SIGNAL(triggered()),            spreadsheet, SLOT(selectAll()));    findAction = new QAction(tr("&Find..."), this);    findAction->setIcon(QIcon(":/images/find.png"));    findAction->setShortcut(tr("Ctrl+F"));    findAction->setStatusTip(tr("Find a matching cell"));    connect(findAction, SIGNAL(triggered()), this, SLOT(find()));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天影视色香欲综合网老头| 欧美日韩日日夜夜| 久久美女艺术照精彩视频福利播放 | 欧美午夜一区二区三区 | 久久激情五月激情| 91传媒视频在线播放| 久久久久久9999| 青椒成人免费视频| 婷婷中文字幕综合| av中文字幕在线不卡| 久久综合久久综合九色| 日韩av中文字幕一区二区三区| 一道本成人在线| 国产精品国产自产拍高清av| 精品夜夜嗨av一区二区三区| 精品视频1区2区| 国产精品二区一区二区aⅴ污介绍| 日韩精品亚洲一区二区三区免费| 色综合久久久久网| 亚洲国产精品黑人久久久| 麻豆精品久久精品色综合| 欧美久久久久中文字幕| 久久久久亚洲蜜桃| 亚洲精品日韩一| 国产精品99久久久| 精品动漫一区二区三区在线观看 | 午夜精品一区在线观看| 9i在线看片成人免费| 国产亚洲一区二区三区四区| 免费亚洲电影在线| 欧美亚洲国产一区二区三区va| 自拍偷拍亚洲综合| 精品视频色一区| 国产成人精品免费一区二区| 欧美性做爰猛烈叫床潮| 日韩欧美国产电影| 国产精品成人在线观看| 国产精品自在欧美一区| 欧美性三三影院| 国产精品国产三级国产普通话蜜臀| 国产精品久久久久aaaa樱花| 日韩va欧美va亚洲va久久| jizzjizzjizz欧美| 国产欧美精品国产国产专区| 秋霞影院一区二区| 精品1区2区在线观看| 国产美女在线精品| 国产精品嫩草99a| 日韩av午夜在线观看| 欧美偷拍一区二区| 日本系列欧美系列| 久久综合九色综合97婷婷| 国产九九视频一区二区三区| 国产精品久久久久影视| 9人人澡人人爽人人精品| 亚洲国产精品人人做人人爽| 欧美美女激情18p| 国产精品888| 亚洲日本中文字幕区| 欧美影院一区二区| 色域天天综合网| 中文字幕日韩精品一区| 日韩视频一区在线观看| 欧美在线999| 欧美日韩一区二区三区免费看| 成人app网站| 色猫猫国产区一区二在线视频| av中文字幕一区| 国产福利一区在线| 欧美一卡二卡在线| 在线视频一区二区三| 成人av资源站| 91丨国产丨九色丨pron| 国产精品一级在线| 国产又黄又大久久| 日本欧美一区二区| 国产成人在线观看免费网站| 国产中文一区二区三区| 韩国精品免费视频| 极品美女销魂一区二区三区免费| 午夜av区久久| 日韩电影一区二区三区| 午夜久久久影院| 日韩中文字幕麻豆| 久久66热偷产精品| 国产v综合v亚洲欧| 国产激情一区二区三区桃花岛亚洲| 精品一区二区三区在线播放| 国产精品亚洲第一区在线暖暖韩国 | 成人精品视频一区二区三区| 51精品国自产在线| 国产精品丝袜一区| 成熟亚洲日本毛茸茸凸凹| 91精品国产综合久久蜜臀 | 一二三四社区欧美黄| 国产99精品在线观看| 欧美一区二区黄| 日本亚洲三级在线| 欧美日韩精品免费观看视频| 一区精品在线播放| 国产成人av自拍| 成人av电影免费在线播放| 日韩精品中文字幕在线一区| 亚洲另类春色国产| 成人黄色电影在线 | 国产蜜臀av在线一区二区三区 | 视频在线观看国产精品| 久久国产视频网| 波多野结衣亚洲| 欧美日韩成人综合天天影院 | 欧美国产一区视频在线观看| 亚洲综合免费观看高清完整版在线| 亚洲一线二线三线久久久| 蜜臀久久99精品久久久画质超高清| 久久精品国产久精国产| 色综合激情久久| 久久久综合网站| 久久超碰97人人做人人爱| 色婷婷精品大在线视频| 国产色综合久久| 精品一区二区三区欧美| 国产清纯白嫩初高生在线观看91 | 欧美精品一区二区三区在线播放| 欧美变态tickle挠乳网站| 欧美一区永久视频免费观看| 国产亚洲精品7777| 日韩av电影免费观看高清完整版在线观看| 国产精品一区二区91| 欧美日韩一卡二卡| 亚洲人妖av一区二区| 激情六月婷婷综合| 欧美日韩一区二区不卡| 亚洲电影你懂得| 日本二三区不卡| 亚洲精品免费在线观看| 成人免费毛片片v| 欧美激情综合五月色丁香| 波多野结衣在线一区| 久久嫩草精品久久久久| 黄页视频在线91| 国产夜色精品一区二区av| 国产一区在线精品| 综合色中文字幕| 色哟哟一区二区| 午夜电影一区二区三区| 91麻豆精品91久久久久久清纯| 中文字幕av免费专区久久| 国产成人午夜精品影院观看视频| 久久精品亚洲国产奇米99| 粉嫩蜜臀av国产精品网站| 中文字幕一区二| 91美女精品福利| 美女一区二区久久| 国产午夜亚洲精品不卡| 成人开心网精品视频| 午夜成人免费视频| 国产片一区二区三区| 4438成人网| 99精品一区二区| 奇米影视在线99精品| 国产精品美女久久福利网站| 在线视频你懂得一区二区三区| 国产精品亚洲专一区二区三区| 一区二区三区日韩在线观看| 欧美一区二区三区人| 91美女在线看| 成人综合在线网站| 国产麻豆成人精品| 日韩电影免费在线看| 国产精品久久午夜| 精品美女被调教视频大全网站| 色综合久久中文综合久久97| 精品系列免费在线观看| 一区二区免费在线播放| 日本一区二区三区电影| 91精品黄色片免费大全| 欧美日韩在线亚洲一区蜜芽| thepron国产精品| 老汉av免费一区二区三区| 亚洲h动漫在线| 一区二区三区在线不卡| 国产精品福利一区二区三区| 久久夜色精品国产欧美乱极品| 日韩亚洲欧美中文三级| 日韩欧美三级在线| 欧美色精品在线视频| 91精品午夜视频| 欧美日韩精品欧美日韩精品一| 色www精品视频在线观看| 欧美影院午夜播放| 精品美女一区二区三区| 国产日韩高清在线| 中文字幕佐山爱一区二区免费| 国产清纯在线一区二区www| 精品国产一区二区亚洲人成毛片| 在线综合亚洲欧美在线视频| 91精品国产综合久久香蕉麻豆| 日韩免费福利电影在线观看| 欧美一区二区观看视频| 国产亚洲美州欧州综合国|