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

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since bb6089a was bb6089a, checked in by beanpole135 <ken@…>, 19 months ago

Add the ability for the mount tray to monitor/warn the user about disks that are almost full. Also add a new dialog that will show the current disk usage for the entire system. Still need to clean up the menu a bit, and add the ability to change settings for this.

  • 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 
51private:
52  DevCheck *DCheck;
53  QString USERNAME, FILEMAN;
54  QLocalSocket* devdProc;
55  QTimer *devdTimer; 
56  int numMount, numAvail;
57  QSystemTrayIcon* trayIcon;
58  QMenu* trayIconMenu;
59  QList<MenuItem*> deviceList;
60  QStringList oldsysdev;
61  FSWatcher *diskWatcher;
62  FSDialog *diskDisplay;
63
64
65  void updateMenu();
66  void scanInitialDevices();
67  int findDeviceInList(QString);
68  void addDevice(QString,QString,QString,QString);
69  void startupDevdProc();
70  void getInitialUsername();
71  void getDefaultFileManager();
72 
73};
74
75#endif
Note: See TracBrowser for help on using the repository browser.