[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akonadi/clients/akonadiconsole
From: Volker Krause <vkrause () kde ! org>
Date: 2008-02-24 14:51:08
Message-ID: 1203864668.231145.30297.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 778754 by vkrause:
Convert to KXmlGui to have a testbed for the action framework.
M +3 -1 CMakeLists.txt
A akonadiconsole.desktop
A akonadiconsoleui.rc
M +15 -3 main.cpp
M +21 -1 mainwindow.cpp
M +7 -2 mainwindow.h
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/CMakeLists.txt #778753:778754
@@ -31,4 +31,6 @@
target_link_libraries( akonadiconsole_bin akonadi akonadicomponents kabcakonadi \
kmimeakonadi kcalakonadi kdepim ${KDE4_KDEUI_LIBRARY} )
-install(TARGETS akonadiconsole_bin DESTINATION ${BIN_INSTALL_DIR} )
+install( TARGETS akonadiconsole_bin DESTINATION ${BIN_INSTALL_DIR} )
+install( FILES akonadiconsole.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
+INSTALL( FILES akonadiconsoleui.rc DESTINATION ${DATA_INSTALL_DIR}/akonadiconsole )
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/main.cpp #778753:778754
@@ -19,6 +19,7 @@
USA.
*/
+#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -26,11 +27,22 @@
int main( int argc, char **argv )
{
- KCmdLineArgs::init( argc, argv, "akonadiconsole", 0, ki18n("AkonadiConsole"), \
"1.0" , ki18n("The Management Console for Akonadi")); + KAboutData aboutData( \
"akonadiconsole", 0, + ki18n( "Akonadi Console" ),
+ "0.99",
+ ki18n( "The Management and Debugging Console for Akonadi" ),
+ KAboutData::License_GPL,
+ ki18n( "(c) 2006-2008 the Akonadi developer" ),
+ KLocalizedString(),
+ "http://pim.kde.org/akonadi/" );
+ aboutData.addAuthor( ki18n( "Tobias König" ), ki18n( "Author" ), "tokoe@kde.org" \
); + aboutData.addAuthor( ki18n( "Volker Krause" ), ki18n( "Author" ), \
"vkrause@kde.org" ); +
+ KCmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
- MainWindow window;
- window.show();
+ MainWindow *window = new MainWindow;
+ window->show();
return app.exec();
}
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/mainwindow.cpp #778753:778754
@@ -24,10 +24,30 @@
#include "mainwidget.h"
#include <libakonadi/control.h>
+#include <libakonadi/subscriptiondialog.h>
+#include <KAction>
+#include <KActionCollection>
+#include <KLocale>
+#include <KStandardAction>
+#include <QApplication>
+
MainWindow::MainWindow( QWidget *parent )
- : QMainWindow( parent )
+ : KXmlGuiWindow( parent )
{
Akonadi::Control::start();
setCentralWidget( new MainWidget( this ) );
+
+ KStandardAction::quit( qApp, SLOT(quit()), actionCollection() );
+ KAction* a = new KAction( i18n("Manage Local &Subscriptions..."), this );
+ connect( a, SIGNAL(triggered()), SLOT(localSubscriptions()) );
+ actionCollection()->addAction( "local_subscription", a );
+
+ setupGUI( Keys /*| ToolBar | StatusBar*/ | Save | Create, "akonadiconsoleui.rc" );
}
+
+void MainWindow::localSubscriptions()
+{
+ Akonadi::SubscriptionDialog* dlg = new Akonadi::SubscriptionDialog();
+ dlg->show();
+}
--- trunk/KDE/kdepim/akonadi/clients/akonadiconsole/mainwindow.h #778753:778754
@@ -22,12 +22,17 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui/QMainWindow>
+#include <KXmlGuiWindow>
-class MainWindow : public QMainWindow
+class MainWindow : public KXmlGuiWindow
{
+ Q_OBJECT
+
public:
MainWindow( QWidget *parent = 0 );
+
+ private slots:
+ void localSubscriptions();
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic