2
2
smb4ksystemtray - This is the system tray window class of Smb4K.
4
4
begin : Mi Jun 13 2007
5
copyright : (C) 2007-2008 by Alexander Reinholdt
6
email : dustpuppy@users.berlios.de
5
copyright : (C) 2007-2011 by Alexander Reinholdt
6
email : alexander.reinholdt@kdemail.net
7
7
***************************************************************************/
9
9
/***************************************************************************
20
20
* You should have received a copy of the GNU General Public License *
21
21
* along with this program; if not, write to the *
22
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
22
* Free Software Foundation, 51 Franklin Street, Suite 500, Boston, *
23
* MA 02110-1335, USA *
24
24
***************************************************************************/
26
26
#ifndef SMB4KSYSTEMTRAY_H
56
58
~Smb4KSystemTray();
59
* Embeds the system tray window into the system tray, if @p ebd is
60
* TRUE. Otherwise, it removes it from there. Note, that the system tray
61
* icon won't be deleted but only hidden!
63
* @param ebd If TRUE the system tray icon will be embedded into
66
void embed( bool ebd );
69
* This function returns TRUE if the system tray window is embedded into
70
* the system tray, i.e. it is visible, and FALSE otherwise.
72
* @returns TRUE if the system tray window is embedded.
74
bool isEmbedded() { return isVisible(); }
77
* This function (re-)loads the settings for this widget. It basically just
78
* runs the slot slotSetupBookmarkMenu() and slotSetupSharesMenu(), that will
79
* do everything to properly set up the menus.
81
* This slot *does not* manage the appearance (or disappearance) of this widget
82
* in the system tray. You need to use embed() to do this.
61
* This function (re-)loads the settings for this widget.
84
63
void loadSettings();
116
95
void slotSettingsChanged( const QString &dialogName );
119
* This slot is invoked when the bookmarks have been updated. It sets up the
120
* bookmark menu, inserts the bookmark actions into it and automatically
121
* disables them if they were already mounted (@see slotSetupSharesMenu() as well).
123
void slotSetupBookmarksMenu();
126
* This slot opens the bookmark editor.
128
* @param checked TRUE if the action can be and is checked and FALSE
131
void slotBookmarkEditor( bool checked );
134
* This slot is called when a bookmark action has been triggered. It initializes the
135
* mounting of the represented share.
137
* @param action The bookmark action.
139
void slotBookmarkTriggered( QAction *action );
142
* This slot enables and disables the bookmarks. If a share that's represented
143
* by the bookmark is mounted, the bookmark will be disabled. It will be
144
* enabled, when it is unmounted again.
146
void slotEnableBookmarks();
149
* This slot is activated when the list of mounted shares has been updated.
150
* It setus up the "Mounted Shares" menu and also enables/disables the
151
* bookmarks in the "Bookmarks" menu. It is connected to the
152
* Smb4KMounter::updated() signal.
154
void slotSetupSharesMenu();
157
* This slot initializes the umounting of all shares. It is connected to the
158
* "Unmount All" action of the "Mounted Shares" menu.
160
* @param checked TRUE if the action can be and is checked and FALSE
163
void slotUnmountAllTriggered( bool checked );
166
* This slot is called whan a share related action has been triggered. It
167
* executes all actions that can be performed: Unmounting, Synchronization,
170
* @param action The action that has been triggered.
172
void slotShareActionTriggered( QAction *action );
176
* The action menu for the bookmarks.
178
KActionMenu *m_bookmarks_menu;
181
* The action menu for the mounted shares.
183
KActionMenu *m_shares_menu;
186
* This QActionGroup manages the bookmark actions.
188
QActionGroup *m_bookmarks;
191
* This QActionGroup manages all menus representing a share.
193
QActionGroup *m_share_menus;
196
* This QActionGoup manages all actions associated with
199
QActionGroup *m_shares_actions;
98
* Set the status of the system tray icon. This slot checks the global
99
* list of mounted shares and the global list of workgroups. If neither of
100
* them contains any item, the icon is set to passive state until one of
101
* the lists is populated.
103
void slotSetStatus();