source: src-qt4/pc-mounttray/mountTray.h @ 891636a

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 891636a was 891636a, checked in by Ken Moore <ken@…>, 17 months ago

Get the mountTray saving/loading it's settings properly, and integrate those settings with the new Settings dlialog. You can now turn the disk space watcher off/on and set the refresh times/flags within the settings dialog.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1#ifndef MOUNT_TRAY_H
2#define MOUNT_TRAY_H
3
4// QT Includes
5#include <QDialog>
6#include <QSystemTrayIcon>
7#include <QMenu>
8#include <QLocalSocket>
9#include <QString>
10#include <QPixmap>
11#include <QList>
12#include <QTimer>
13#include <QDir>
14#include <QFile>
15#include <QTextStream>
16
17#include "menuItem.h"
18#include "devCheck.h"
19#include "fsWatcher.h"
20#include "fsDialog.h"
21#include "settingsDialog.h"
22
23extern bool DEBUG_MODE;
24extern QString DEVICEDIR;
25extern QString MOUNTDIR;
26
27class MountTray : public QDialog {
28   Q_OBJECT
29   
30public:
31   MountTray() : QDialog()
32   {
33
34   }
35   void programInit();
36   
37   ~MountTray();
38   
39public slots:
40  void closeTray();
41 
42private slots:
43  void slotSingleInstance();
44  void newDevdMessage();
45  void slotDevChanges(bool showPopup = TRUE);
46  void slotTrayActivated(QSystemTrayIcon::ActivationReason);
47  void slotOpenMediaDir();
48  void openMediaDir(QString); 
49  void slotDisplayPopup(QString,QString);
50  void slotDisplayWarning(QString,QString);
51  void removeDevice(QString);
52  void slotRescan();
53  void slotOpenFSDialog();
54  void slotOpenSettings();
55 
56private:
57  DevCheck *DCheck;
58  QString USERNAME, FILEMAN;
59  QLocalSocket* devdProc;
60  QTimer *devdTimer; 
61  int numMount, numAvail;
62  QSystemTrayIcon* trayIcon;
63  QMenu *trayIconMenu, *sysMenu;
64  QList<MenuItem*> deviceList;
65  QStringList oldsysdev;
66  FSWatcher *diskWatcher;
67  FSDialog *diskDisplay;
68  //Saved Settings
69  bool useDiskWatcher, useDiskTimerDevd;
70  int diskTimerMaxMS; //milliseconds
71
72
73  void updateMenu();
74  void scanInitialDevices();
75  int findDeviceInList(QString);
76  void addDevice(QString,QString,QString,QString);
77  void startupDevdProc();
78  void getInitialUsername();
79  void getDefaultFileManager();
80  void loadSavedSettings();
81  void saveCurrentSettings();
82 
83};
84
85#endif
Note: See TracBrowser for help on using the repository browser.