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

9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 1a09105 was 1a09105, checked in by Ken Moore <ken@…>, 8 months ago

Make sure that we do not open up the filemanager during the mounttray initialization. This should prevent opening a ton of file manager windows when you boot the system if you have a bunch of harddrive partitions set to automount.

  • 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  bool MTINIT;
76
77  void updateMenu();
78  void scanInitialDevices();
79  int findDeviceInList(QString);
80  bool addDevice(QString,QString,QString,QString);
81  void startupDevdProc();
82  void getInitialUsername();
83  void getDefaultFileManager();
84  void loadSavedSettings();
85  void saveCurrentSettings();
86 
87};
88
89#endif
Note: See TracBrowser for help on using the repository browser.