Warning: That file was not part of the compilation database. It may have many parsing errors.
1 | #include "mainwindow.h" |
---|---|
2 | |
3 | #include <KApplication> |
4 | #include <KAction> |
5 | #include <KLocale> |
6 | #include <KActionCollection> |
7 | #include <KStandardAction> |
8 | |
9 | MainWindow::MainWindow(QWidget *parent) |
10 | : KXmlGuiWindow(parent) |
11 | { |
12 | textArea = new KTextEdit; |
13 | setCentralWidget(textArea); |
14 | |
15 | setupActions(); |
16 | } |
17 | |
18 | void MainWindow::setupActions() |
19 | { |
20 | KAction* clearAction = new KAction(this); |
21 | clearAction->setText(i18n("&Clear")); |
22 | clearAction->setIcon(KIcon("tutorial-kicon")); |
23 | clearAction->setShortcut(Qt::CTRL + Qt::Key_W); |
24 | actionCollection()->addAction("clear", clearAction); |
25 | connect(clearAction, SIGNAL(triggered(bool)), |
26 | textArea, SLOT(clear())); |
27 | |
28 | KStandardAction::quit(kapp, SLOT(quit()), |
29 | actionCollection()); |
30 | |
31 | setupGUI(); |
32 | } |
33 | |
34 | |
35 |
Warning: That file was not part of the compilation database. It may have many parsing errors.