]> git.siccegge.de Git - frida/frida.git/blob - src/gui/Mainwindow.cxx
Update
[frida/frida.git] / src / gui / Mainwindow.cxx
1 #include "Mainwindow.h++"
2
3 #include <QtGui>
4
5 Mainwindow::Mainwindow()
6 {
7 // openAction = new QAction(tr("&Open"), this);
8 // saveAction = new QAction(tr("&Save"), this);
9 exitAction = new QAction(tr("E&xit"), this);
10
11 // connect(openAction, SIGNAL(triggered()), this, SLOT(open()));
12 // connect(saveAction, SIGNAL(triggered()), this, SLOT(save()));
13 connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
14
15 fileMenu = menuBar()->addMenu(tr("&File"));
16 // fileMenu->addAction(openAction);
17 // fileMenu->addAction(saveAction);
18 // fileMenu->addSeparator();
19 fileMenu->addAction(exitAction);
20
21 //
22 // setCentralWidget(textEdit);
23
24 tabwidget = new QTabWidget;
25 setCentralWidget(tabwidget);
26
27 textEdit = new QTextEdit;
28 tabwidget->addTab(textEdit, "edit");
29
30 setWindowTitle(tr("Notepad"));
31 }
32
33 void Mainwindow::quit()
34 {
35 QMessageBox messageBox;
36 messageBox.setWindowTitle(tr("Notepad"));
37 messageBox.setText(tr("Do you really want to quit?"));
38 messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
39 messageBox.setDefaultButton(QMessageBox::No);
40 if (messageBox.exec() == QMessageBox::Yes)
41 qApp->quit();
42 }
43
44 void Mainwindow::open() {
45
46 }