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

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

?? mainwindow.cpp

?? 關于嵌入式的QT圖形用戶界面C GUI Programming with QT4書籍的配套源碼
?? CPP
字號:
#include <QtGui>#include "editor.h"#include "mainwindow.h"MainWindow::MainWindow(){    workspace = new QWorkspace;    setCentralWidget(workspace);    connect(workspace, SIGNAL(windowActivated(QWidget *)),            this, SLOT(updateMenus()));    createActions();    createMenus();    createToolBars();    createStatusBar();    setWindowTitle(tr("MDI Editor"));    setWindowIcon(QPixmap(":/images/icon.png"));}void MainWindow::newFile(){    Editor *editor = createEditor();    editor->newFile();    editor->show();}void MainWindow::openFile(const QString &fileName){    Editor *editor = createEditor();    if (editor->openFile(fileName)) {        editor->show();    } else {        editor->close();    }}void MainWindow::closeEvent(QCloseEvent *event){    workspace->closeAllWindows();    if (activeEditor()) {        event->ignore();    } else {        event->accept();    }}void MainWindow::open(){    Editor *editor = createEditor();    if (editor->open()) {        editor->show();    } else {        editor->close();    }}void MainWindow::save(){    if (activeEditor())        activeEditor()->save();}void MainWindow::saveAs(){    if (activeEditor())        activeEditor()->saveAs();}void MainWindow::cut(){    if (activeEditor())        activeEditor()->cut();}void MainWindow::copy(){    if (activeEditor())        activeEditor()->copy();}void MainWindow::paste(){    if (activeEditor())        activeEditor()->paste();}void MainWindow::about(){    QMessageBox::about(this, tr("About MDI Editor"),            tr("<h2>Editor 1.1</h2>"               "<p>Copyright &copy; 2006 Software Inc."               "<p>MDI Editor is a small application that demonstrates "               "QWorkspace."));}void MainWindow::updateMenus(){    bool hasEditor = (activeEditor() != 0);    bool hasSelection = activeEditor()                        && activeEditor()->textCursor().hasSelection();    saveAction->setEnabled(hasEditor);    saveAsAction->setEnabled(hasEditor);    pasteAction->setEnabled(hasEditor);    cutAction->setEnabled(hasSelection);    copyAction->setEnabled(hasSelection);    closeAction->setEnabled(hasEditor);    closeAllAction->setEnabled(hasEditor);    tileAction->setEnabled(hasEditor);    cascadeAction->setEnabled(hasEditor);    nextAction->setEnabled(hasEditor);    previousAction->setEnabled(hasEditor);    separatorAction->setVisible(hasEditor);    if (activeEditor())        activeEditor()->windowMenuAction()->setChecked(true);}void MainWindow::createActions(){    newAction = new QAction(QIcon(":/images/new.png"), tr("&New"),                            this);    newAction->setShortcut(tr("Ctrl+N"));    newAction->setStatusTip(tr("Create a new file"));    connect(newAction, SIGNAL(triggered()), this, SLOT(newFile()));    openAction = new QAction(QIcon(":/images/open.png"), tr("&Open..."),                             this);    openAction->setShortcut(tr("Ctrl+O"));    openAction->setStatusTip(tr("Open an existing file"));    connect(openAction, SIGNAL(triggered()), this, SLOT(open()));    saveAction = new QAction(QIcon(":/images/save.png"), tr("&Save"),                             this);    saveAction->setShortcut(tr("Ctrl+S"));    saveAction->setStatusTip(tr("Save the file to disk"));    connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));    saveAsAction = new QAction(tr("Save &As..."), this);    saveAsAction->setStatusTip(tr("Save the file under a new name"));    connect(saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()));    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(QIcon(":/images/cut.png"), tr("Cu&t"),                            this);    cutAction->setShortcut(tr("Ctrl+X"));    cutAction->setStatusTip(tr("Cut the current selection to the "                               "clipboard"));    connect(cutAction, SIGNAL(triggered()), this, SLOT(cut()));    copyAction = new QAction(QIcon(":/images/copy.png"), tr("&Copy"),                             this);    copyAction->setShortcut(tr("Ctrl+C"));    copyAction->setStatusTip(tr("Copy the current selection to the "                                "clipboard"));    connect(copyAction, SIGNAL(triggered()), this, SLOT(copy()));    pasteAction = new QAction(QIcon(":/images/paste.png"), tr("&Paste"),                              this);    pasteAction->setShortcut(tr("Ctrl+V"));    pasteAction->setStatusTip(tr("Paste the clipboard's contents at "                                 "the cursor position"));    connect(pasteAction, SIGNAL(triggered()), this, SLOT(paste()));    closeAction = new QAction(tr("Cl&ose"), this);    closeAction->setShortcut(tr("Ctrl+F4"));    closeAction->setStatusTip(tr("Close the active window"));    connect(closeAction, SIGNAL(triggered()),            workspace, SLOT(closeActiveWindow()));    closeAllAction = new QAction(tr("Close &All"), this);    closeAllAction->setStatusTip(tr("Close all the windows"));    connect(closeAllAction, SIGNAL(triggered()),            workspace, SLOT(closeAllWindows()));    tileAction = new QAction(tr("&Tile"), this);    tileAction->setStatusTip(tr("Tile the windows"));    connect(tileAction, SIGNAL(triggered()), workspace, SLOT(tile()));    cascadeAction = new QAction(tr("&Cascade"), this);    cascadeAction->setStatusTip(tr("Cascade the windows"));    connect(cascadeAction, SIGNAL(triggered()),            workspace, SLOT(cascade()));    nextAction = new QAction(tr("Ne&xt"), this);    nextAction->setShortcut(tr("Ctrl+F6"));    nextAction->setStatusTip(tr("Move the focus to the next window"));    connect(nextAction, SIGNAL(triggered()),            workspace, SLOT(activateNextWindow()));    previousAction = new QAction(tr("Pre&vious"), this);    previousAction->setShortcut(tr("Ctrl+Shift+F6"));    previousAction->setStatusTip(tr("Move the focus to the previous "                                    "window"));    connect(previousAction, SIGNAL(triggered()),            workspace, SLOT(activatePreviousWindow()));    separatorAction = new QAction(this);    separatorAction->setSeparator(true);    aboutAction = new QAction(tr("&About"), this);    aboutAction->setStatusTip(tr("Show the application's About box"));    connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));    aboutQtAction = new QAction(tr("About &Qt"), this);    aboutQtAction->setStatusTip(tr("Show the Qt library's About box"));    connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));    windowActionGroup = new QActionGroup(this);}void MainWindow::createMenus(){    fileMenu = menuBar()->addMenu(tr("&File"));    fileMenu->addAction(newAction);    fileMenu->addAction(openAction);    fileMenu->addAction(saveAction);    fileMenu->addAction(saveAsAction);    fileMenu->addSeparator();    fileMenu->addAction(exitAction);    editMenu = menuBar()->addMenu(tr("&Edit"));    editMenu->addAction(cutAction);    editMenu->addAction(copyAction);    editMenu->addAction(pasteAction);    windowMenu = menuBar()->addMenu(tr("&Window"));    windowMenu->addAction(closeAction);    windowMenu->addAction(closeAllAction);    windowMenu->addSeparator();    windowMenu->addAction(tileAction);    windowMenu->addAction(cascadeAction);    windowMenu->addSeparator();    windowMenu->addAction(nextAction);    windowMenu->addAction(previousAction);    windowMenu->addAction(separatorAction);    menuBar()->addSeparator();    helpMenu = menuBar()->addMenu(tr("&Help"));    helpMenu->addAction(aboutAction);    helpMenu->addAction(aboutQtAction);}void MainWindow::createToolBars(){    fileToolBar = addToolBar(tr("File"));    fileToolBar->addAction(newAction);    fileToolBar->addAction(openAction);    fileToolBar->addAction(saveAction);    editToolBar = addToolBar(tr("Edit"));    editToolBar->addAction(cutAction);    editToolBar->addAction(copyAction);    editToolBar->addAction(pasteAction);}void MainWindow::createStatusBar(){    readyLabel = new QLabel(tr(" Ready"));    statusBar()->addWidget(readyLabel, 1);}Editor *MainWindow::createEditor(){    Editor *editor = new Editor;    connect(editor, SIGNAL(copyAvailable(bool)),            cutAction, SLOT(setEnabled(bool)));    connect(editor, SIGNAL(copyAvailable(bool)),            copyAction, SLOT(setEnabled(bool)));    workspace->addWindow(editor);    windowMenu->addAction(editor->windowMenuAction());    windowActionGroup->addAction(editor->windowMenuAction());    return editor;}Editor *MainWindow::activeEditor(){    return qobject_cast<Editor *>(workspace->activeWindow());}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美精品一区二区色综合朱莉| fc2成人免费人成在线观看播放| 在线观看国产一区二区| 亚洲免费资源在线播放| 欧美性受xxxx黑人xyx性爽| 亚洲国产日韩精品| 欧美一级在线视频| 国产毛片精品视频| **欧美大码日韩| 欧美日韩极品在线观看一区| 日本不卡中文字幕| 国产精品丝袜在线| 精品污污网站免费看| 麻豆freexxxx性91精品| 国产欧美精品国产国产专区| 91在线无精精品入口| 亚洲国产aⅴ天堂久久| 日韩女同互慰一区二区| 岛国精品在线播放| 亚洲综合色婷婷| 欧美一区二区免费视频| 国产成人在线观看免费网站| 亚洲一区二区三区免费视频| 欧美不卡一区二区三区四区| 成人黄色综合网站| 三级久久三级久久久| 国产日韩综合av| 欧美日韩精品一区二区在线播放| 激情五月播播久久久精品| 自拍偷拍亚洲激情| 久久综合色综合88| 欧美丝袜丝交足nylons图片| 国产一区激情在线| 亚洲国产日韩在线一区模特 | 国产亚洲欧美一区在线观看| 成人做爰69片免费看网站| 亚洲高清在线视频| 中文av字幕一区| 欧美一区二区三区婷婷月色 | 中文字幕中文乱码欧美一区二区| 欧美日韩一区久久| 成年人国产精品| 另类调教123区| 亚洲一区在线看| 中文字幕亚洲视频| 精品欧美乱码久久久久久1区2区| 一本久久精品一区二区| 国产一级精品在线| 奇米在线7777在线精品| 一区二区三区产品免费精品久久75| 精品国产一二三| 欧美一区日韩一区| 欧美亚洲一区二区在线观看| 成人小视频在线观看| 国产精品日韩精品欧美在线| 奇米精品一区二区三区在线观看| 欧美日韩一区二区三区免费看| 亚洲第一激情av| 91麻豆精品91久久久久久清纯 | 日韩亚洲欧美在线| 亚洲一区二区在线免费看| 91搞黄在线观看| 国产一区在线观看麻豆| 国产精品一区二区黑丝| 久久综合九色欧美综合狠狠| 99精品国产热久久91蜜凸| 激情五月激情综合网| 日本中文一区二区三区| 亚洲国产一区视频| 一区二区三区成人在线视频| 日韩理论片网站| 久久精品视频免费观看| 日韩视频一区二区在线观看| 欧美在线观看18| 色综合天天综合狠狠| 不卡av在线网| 粉嫩绯色av一区二区在线观看| 国产真实精品久久二三区| 精品在线免费视频| 老司机免费视频一区二区三区| 日本视频在线一区| 久久电影网电视剧免费观看| 久88久久88久久久| 国产一区二区剧情av在线| 国产精品资源网站| 高清视频一区二区| 99在线热播精品免费| 色婷婷综合五月| 欧美日韩一区二区在线观看视频| 欧美日韩中字一区| 日韩一级完整毛片| 国产拍欧美日韩视频二区| 中文在线一区二区| 亚洲男帅同性gay1069| 亚洲国产毛片aaaaa无费看| 欧美96一区二区免费视频| 狠狠色伊人亚洲综合成人| 从欧美一区二区三区| 色噜噜狠狠成人网p站| 欧美精品粉嫩高潮一区二区| 欧美精品一区在线观看| 中文字幕的久久| 亚洲高清免费观看| 国产制服丝袜一区| 99热在这里有精品免费| 欧美性感一区二区三区| 日韩女优电影在线观看| 中文字幕一区二区在线观看| 亚洲一区二区三区在线| 国产麻豆一精品一av一免费| 色悠久久久久综合欧美99| 日韩欧美在线影院| 国产精品成人免费精品自在线观看| 91精品国产综合久久小美女| 日韩视频123| 精品精品欲导航| 国产日韩亚洲欧美综合| 国产精品免费av| 亚洲一区视频在线| 蜜乳av一区二区三区| 国产精品白丝av| 欧美三级视频在线播放| 精品少妇一区二区三区日产乱码| 久久久99免费| 亚洲成人资源网| 91看片淫黄大片一级在线观看| 成人免费看黄yyy456| av一本久道久久综合久久鬼色| 91国偷自产一区二区使用方法| 久久亚洲免费视频| 香蕉影视欧美成人| 精品日韩在线一区| 亚洲人成7777| 国产乱对白刺激视频不卡| 亚洲国产成人91porn| 一区二区三区国产精华| 另类小说一区二区三区| 91免费小视频| 日韩 欧美一区二区三区| 亚洲裸体xxx| 专区另类欧美日韩| 精品对白一区国产伦| 亚洲日本青草视频在线怡红院 | 91网站黄www| 久久久亚洲国产美女国产盗摄| 亚洲国产精品视频| 99精品热视频| 国产三级欧美三级日产三级99| 青草av.久久免费一区| 在线免费观看日本一区| 一色屋精品亚洲香蕉网站| 国产一区二区三区四| 综合av第一页| 成人网在线免费视频| 欧美国产激情一区二区三区蜜月| 波多野结衣91| 欧美午夜精品一区| 日韩电影网1区2区| 欧美午夜精品理论片a级按摩| 中文字幕制服丝袜一区二区三区 | 欧美日本精品一区二区三区| 91久久精品一区二区三区| 91蜜桃免费观看视频| 色94色欧美sute亚洲13| 国产寡妇亲子伦一区二区| 国产精品色一区二区三区| 日本高清无吗v一区| 717成人午夜免费福利电影| 日韩丝袜美女视频| 欧美高清在线一区二区| 亚洲一区二区在线播放相泽| 国产精品素人一区二区| 一区二区三区欧美亚洲| 美腿丝袜在线亚洲一区| 国产ts人妖一区二区| 在线免费观看日本欧美| 国产偷国产偷精品高清尤物| 国产精品理论片在线观看| 亚洲与欧洲av电影| 国产风韵犹存在线视精品| 欧美三级视频在线播放| 欧美激情一区二区三区全黄| 亚洲小说春色综合另类电影| 国产麻豆日韩欧美久久| 欧美日韩精品综合在线| 中文字幕在线免费不卡| 国产在线麻豆精品观看| 欧美午夜一区二区三区免费大片| 久久综合国产精品| 国产精品久久久久永久免费观看 | 精品一区二区三区免费毛片爱| 欧美一区二区三区在线| 色综合天天综合网天天狠天天| 国产精品99久久久久久久女警 | 91麻豆国产福利在线观看| 国产精品初高中害羞小美女文| 日本高清不卡在线观看| 日本91福利区| 国产无人区一区二区三区| 一本色道**综合亚洲精品蜜桃冫|