diff options
author | Michele Calgaro <[email protected]> | 2023-02-06 17:56:50 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-02-06 17:59:03 +0900 |
commit | 8c9567199867edf5e087546e889a9845c28c574e (patch) | |
tree | abc08c607159f437417b0b4bc4daca9a3d9ce196 /kcontrol/hwmanager/hwdevicetray.h | |
parent | b1d5dab80d2c41c21fca41fdb3dd6093d25c9a1f (diff) | |
download | tdebase-8c9567199867edf5e087546e889a9845c28c574e.tar.gz tdebase-8c9567199867edf5e087546e889a9845c28c574e.zip |
hwmanager: rework code for RMB menu. This does not add any new
functionality but allows the future LMB menu to reuse some of the code.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kcontrol/hwmanager/hwdevicetray.h')
-rw-r--r-- | kcontrol/hwmanager/hwdevicetray.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/kcontrol/hwmanager/hwdevicetray.h b/kcontrol/hwmanager/hwdevicetray.h index a6b532ac4..7dd5f3e80 100644 --- a/kcontrol/hwmanager/hwdevicetray.h +++ b/kcontrol/hwmanager/hwdevicetray.h @@ -24,12 +24,13 @@ class HwDeviceSystemTrayPrivate; class KPassivePopup; +class TDEActionMenu; class TDEGenericDevice; class TDEGlobalAccel; class TDEPopupMenu; class TDEStorageDevice; -class HwDeviceSystemTray : public KSystemTray +class HwDeviceSystemTray : public KSystemTray { Q_OBJECT @@ -48,22 +49,8 @@ protected slots: void slotEditShortcutKeys(); void slotSettingsChanged(int category); void slotHelpContents(); + void slotExecuteDeviceAction(int parameter); - void slotOpenDevice(int parameter); - void slotMountDevice(int parameter); - void slotUnmountDevice(int parameter); - void slotUnlockDevice(int parameter); - void slotLockDevice(int parameter); - void slotEjectDevice(int parameter); - void slotSafeRemoveDevice(int parameter); - void slotPropertiesDevice(int parameter); - -protected: - void mousePressEvent(TQMouseEvent *e); - void resizeEvent(TQResizeEvent *); - void showEvent(TQShowEvent *); - -private slots: void quitApp(); void deviceAdded(TDEGenericDevice*); void deviceRemoved(TDEGenericDevice*); @@ -71,12 +58,18 @@ private slots: void devicePopupClicked(KPassivePopup*, TQPoint, TQString); void doDiskNotifications(bool scanOnly); -private: +protected: + void mousePressEvent(TQMouseEvent *e); + void resizeEvent(TQResizeEvent *); + void resizeTrayIcon(); + void showEvent(TQShowEvent *); + static bool isMonitoredDevice(TDEStorageDevice *sdevice); - void resizeTrayIcon(); + void InitRMBMenu(); + void AddDeviceToRMBMenu(TDEStorageDevice *sdevice, const int type); - HwDeviceSystemTrayPrivate *d; + HwDeviceSystemTrayPrivate *d; }; #endif |