| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- /*
- * Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- */
- #ifndef APPLICATION_H
- #define APPLICATION_H
- #include <QApplication>
- #include <QSystemTrayIcon>
- #include "mirall/syncresult.h"
- #include "mirall/folder.h"
- #include "mirall/folderman.h"
- class QAction;
- class QMenu;
- class QSystemTrayIcon;
- class QNetworkConfigurationManager;
- class QSignalMapper;
- class QSplashScreen;
- namespace Mirall {
- class Theme;
- class FolderWatcher;
- class FolderWizard;
- class StatusDialog;
- class OwncloudSetupWizard;
- class Application : public QApplication
- {
- Q_OBJECT
- public:
- explicit Application(int argc, char **argv);
- ~Application();
- signals:
- protected slots:
- void slotAddFolder();
- void slotRemoveFolder( const QString& );
- #ifdef HAVE_FETCH_AND_PUSH
- void slotFetchFolder( const QString& );
- void slotPushFolder( const QString& );
- #endif
- void slotEnableFolder( const QString&, const bool );
- void slotInfoFolder( const QString& );
- void slotConfigure();
- void slotSyncStateChange( const QString& );
- protected:
- void setupActions();
- void setupSystemTray();
- void setupContextMenu();
- //folders have to be disabled while making config changes
- void computeOverallSyncStatus();
- protected slots:
- void slotTrayClicked( QSystemTrayIcon::ActivationReason );
- void slotFolderOpenAction(const QString & );
- void slotHideSplash();
- private:
- // configuration file -> folder
- QSystemTrayIcon *_tray;
- QAction *_actionQuit;
- QAction *_actionAddFolder;
- QAction *_actionConfigure;
- QNetworkConfigurationManager *_networkMgr;
- FolderWizard *_folderWizard;
- OwncloudSetupWizard *_owncloudSetupWizard;
- // tray's menu
- QMenu *_contextMenu;
- StatusDialog *_statusDialog;
- FolderMan *_folderMan;
- Theme *_theme;
- QSignalMapper *_folderOpenActionMapper;
- QSplashScreen *_splash;
- };
- } // namespace Mirall
- #endif // APPLICATION_H
|