Changeset View
Changeset View
Standalone View
Standalone View
radselect/radselect.cpp
Show All 31 Lines | |||||
32 | #include <KStandardAction> | 32 | #include <KStandardAction> | ||
33 | #include <KStandardShortcut> | 33 | #include <KStandardShortcut> | ||
34 | #include <QStatusBar> | 34 | #include <QStatusBar> | ||
35 | 35 | | |||
36 | #include <QDragEnterEvent> | 36 | #include <QDragEnterEvent> | ||
37 | #include <QDropEvent> | 37 | #include <QDropEvent> | ||
38 | #include <QtDBus> | 38 | #include <QtDBus> | ||
39 | 39 | | |||
40 | #include <KXMLGUIFactory> | ||||
41 | | ||||
40 | RadSelect::RadSelect() | 42 | RadSelect::RadSelect() | ||
41 | : KXmlGuiWindow() | 43 | : KXmlGuiWindow() | ||
42 | , m_view( new RadSelectView( this ) ) | 44 | , m_view( new RadSelectView( this ) ) | ||
43 | { | 45 | { | ||
44 | // accept dnd | 46 | // accept dnd | ||
45 | setAcceptDrops( true ); | 47 | setAcceptDrops( true ); | ||
46 | setCentralWidget( m_view ); //This is the main widget | 48 | setCentralWidget( m_view ); //This is the main widget | ||
47 | setObjectName( QLatin1String( "radselect" ) ); | 49 | setObjectName( QLatin1String( "radselect" ) ); | ||
48 | 50 | | |||
49 | KStandardAction::quit( this, SLOT(close()), actionCollection() ); | 51 | KStandardAction::quit( this, SLOT(close()), actionCollection() ); | ||
50 | KStandardAction::preferences( this, SLOT(optionsPreferences()), actionCollection() ); | 52 | KStandardAction::preferences( this, SLOT(optionsPreferences()), actionCollection() ); | ||
51 | KStandardAction::keyBindings( (const QObject*)guiFactory(), SLOT(configureShortcuts()), actionCollection() ); | 53 | KStandardAction::keyBindings( qobject_cast<QObject*>(guiFactory()), SLOT(configureShortcuts()), actionCollection() ); | ||
52 | statusBar()->show(); | 54 | statusBar()->show(); | ||
53 | 55 | | |||
54 | // Apply the create the main window and ask the mainwindow to | 56 | // Apply the create the main window and ask the mainwindow to | ||
55 | // automatically save settings if changed: window size, toolbar | 57 | // automatically save settings if changed: window size, toolbar | ||
56 | // position, icon size, etc. Also to add actions for the statusbar | 58 | // position, icon size, etc. Also to add actions for the statusbar | ||
57 | // toolbar, and keybindings if necessary. | 59 | // toolbar, and keybindings if necessary. | ||
58 | setupGUI( Default, "radselectui.rc" ); | 60 | setupGUI( Default, "radselectui.rc" ); | ||
59 | 61 | | |||
60 | // allow the view to change the statusbar | 62 | // allow the view to change the statusbar | ||
61 | connect( m_view, SIGNAL(signalChangeStatusbar(QString)), | 63 | connect( m_view, SIGNAL(signalChangeStatusbar(QString)), | ||
62 | this, SLOT(changeStatusbar(QString)) ); | 64 | this, SLOT(changeStatusbar(QString)) ); | ||
63 | 65 | | |||
64 | if( ! QDBusConnection::sessionBus().isConnected() ) | 66 | if( ! QDBusConnection::sessionBus().isConnected() ) | ||
65 | { | 67 | { | ||
66 | qDebug() << "Session Bus not found!!" << endl; | 68 | qDebug() << "Session Bus not found!!" << endl; | ||
67 | m_dbusInterface = 0; | 69 | m_dbusInterface = nullptr; | ||
68 | } | 70 | } | ||
69 | else | 71 | else | ||
70 | { | 72 | { | ||
71 | m_dbusInterface = new QDBusInterface( "org.kde.kiten", "/", "" | 73 | m_dbusInterface = new QDBusInterface( "org.kde.kiten", "/", "" | ||
72 | , QDBusConnection::sessionBus() ); | 74 | , QDBusConnection::sessionBus() ); | ||
73 | } | 75 | } | ||
74 | 76 | | |||
75 | // connect the search signal from the m_view with our dcop routines | 77 | // connect the search signal from the m_view with our dcop routines | ||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |