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

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 176289d was 176289d, checked in by Ken Moore <ken@…>, 14 months ago

Fix the mount tray message clicked functionality, it should now either mount the device and/or open up where the device is mounted in the file manager.

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