-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
32 lines (25 loc) · 783 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Local
#include "window.h"
// KDE
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kglobalaccel.h>
#include <ksystemtray.h>
int main(int argc, char** argv) {
KAboutData aboutData("switcha", I18N_NOOP("Switcha"),
"1.0", I18N_NOOP("A fast window switcher and application launcher"), KAboutData::License_GPL,
"Copyright 2007, Aurélien Gâteau", 0, 0);
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication kapplication;
Window window;
kapplication.setMainWidget(&window);
KSystemTray tray(&window);
tray.show();
KGlobalAccel accel(&window);
accel.insert("show", i18n("Show"),
i18n("Show Switcha window"),
Qt::ALT + Qt::Key_F5, 0, &window, SLOT(showAgain()) );
accel.updateConnections();
return kapplication.exec();
}