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

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

Get the mount-tray menu all cleaned up, and add the option to open up a settings window (settings dialog not implemented yet)

  • Property mode set to 100644
File size: 1.5 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
14#include "menuItem.h"
15#include "devCheck.h"
16#include "fsWatcher.h"
17#include "fsDialog.h"
18
19extern bool DEBUG_MODE;
20extern QString DEVICEDIR;
21extern QString MOUNTDIR;
22
23class MountTray : public QDialog {
24   Q_OBJECT
25   
26public:
27   MountTray() : QDialog()
28   {
29
30   }
31   void programInit();
32   
33   ~MountTray();
34   
35public slots:
36  void closeTray();
37 
38private slots:
39  void slotSingleInstance();
40  void newDevdMessage();
41  void slotDevChanges(bool showPopup = TRUE);
42  void slotTrayActivated(QSystemTrayIcon::ActivationReason);
43  void slotOpenMediaDir();
44  void openMediaDir(QString); 
45  void slotDisplayPopup(QString,QString);
46  void slotDisplayWarning(QString,QString);
47  void removeDevice(QString);
48  void slotRescan();
49  void slotOpenFSDialog();
50  void slotOpenSettings();
51 
52private:
53  DevCheck *DCheck;
54  QString USERNAME, FILEMAN;
55  QLocalSocket* devdProc;
56  QTimer *devdTimer; 
57  int numMount, numAvail;
58  QSystemTrayIcon* trayIcon;
59  QMenu *trayIconMenu, *sysMenu;
60  QList<MenuItem*> deviceList;
61  QStringList oldsysdev;
62  FSWatcher *diskWatcher;
63  FSDialog *diskDisplay;
64
65
66  void updateMenu();
67  void scanInitialDevices();
68  int findDeviceInList(QString);
69  void addDevice(QString,QString,QString,QString);
70  void startupDevdProc();
71  void getInitialUsername();
72  void getDefaultFileManager();
73 
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.