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

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since 03aedf0 was 03aedf0, checked in by Ken Moore <ken@…>, 21 months ago

Setup the pc-mounttray to allow for mounting a *.iso file via memory disk. This option is available under the "Load ISO File" option in the menu. Once the ISO file is unmounted, the memory disk is also detached from the system.

  • Property mode set to 100644
File size: 1.8 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);
51  void slotDisplayWarning(QString,QString);
52  void removeDevice(QString);
53  void slotRescan();
54  void slotOpenFSDialog();
55  void slotOpenSettings();
56  void slotOpenISO();
57 
58private:
59  DevCheck *DCheck;
60  QString USERNAME, FILEMAN;
61  QLocalSocket* devdProc;
62  QTimer *devdTimer; 
63  int numMount, numAvail;
64  QSystemTrayIcon* trayIcon;
65  QMenu *trayIconMenu, *sysMenu;
66  QList<MenuItem*> deviceList;
67  QStringList oldsysdev;
68  FSWatcher *diskWatcher;
69  FSDialog *diskDisplay;
70  //Saved Settings
71  bool useDiskWatcher, useDiskTimerDevd;
72  int diskTimerMaxMS; //milliseconds
73
74
75  void updateMenu();
76  void scanInitialDevices();
77  int findDeviceInList(QString);
78  bool addDevice(QString,QString,QString,QString);
79  void startupDevdProc();
80  void getInitialUsername();
81  void getDefaultFileManager();
82  void loadSavedSettings();
83  void saveCurrentSettings();
84 
85};
86
87#endif
Note: See TracBrowser for help on using the repository browser.