2 kopetewindow.h - Kopete Main Window
4 Copyright (c) 2001-2002 by Duncan Mac-Vicar Prett <duncan@kde.org>
5 Copyright (c) 2001-2002 by Stefan Gehn <metz AT gehn.net>
6 Copyright (c) 2002-2003 by Martijn Klingens <klingens@kde.org>
8 Kopete (c) 2002-2008 by the Kopete developers <kopete-devel@kde.org>
10 *************************************************************************
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
17 *************************************************************************
20 #ifndef KOPETEWINDOW_H
21 #define KOPETEWINDOW_H
24 #include <QtGui/QLabel>
27 #include <kxmlguiwindow.h>
42 class StatusRootAction
;
46 * @author Duncan Mac-Vicar P. <duncan@kde.org>
48 class KopeteWindow
: public KXmlGuiWindow
53 explicit KopeteWindow ( QWidget
*parent
= 0 );
56 virtual bool eventFilter( QObject
* o
, QEvent
* e
);
59 virtual void closeEvent( QCloseEvent
*ev
);
60 virtual void leaveEvent( QEvent
* ev
);
61 virtual void showEvent( QShowEvent
* ev
);
62 virtual void hideEvent( QHideEvent
* ev
);
65 void slotToggleShowAllOfflineEmpty( bool toggled
);
66 void slotToggleShowOfflineUsers();
67 void slotToggleShowEmptyGroups();
68 void slotConfigChanged();
69 void slotConfNotifications();
70 void slotConfToolbar();
71 void slotUpdateToolbar();
72 void slotConfGlobalKeys();
74 void slotToggleAway();
77 void setStatusMessage( const Kopete::StatusMessage
& );
79 void globalStatusChanged();
82 * Checks if the mousecursor is in the contact list.
83 * If not, the window will be hidden.
88 * Resize window to fit size of contact list nicely.
90 void slotUpdateSize();
92 void slotStartAutoResizeTimer();
95 * This slot will apply settings that change the
96 * contact list's appearance. Only autohiding is
97 * handled here at the moment
99 void slotContactListAppearanceChanged();
102 * This slot will set all the protocols to away
104 void slotGlobalAway();
105 void slotGlobalBusy();
106 void slotGlobalAvailable();
107 void slotSetInvisibleAll();
108 void slotDisconnectAll();
113 * Get a notification when a plugin is loaded, so we can merge
116 void slotPluginLoaded( Kopete::Plugin
*p
);
119 * Get a notification when an identity is created, so we can add a status bar
121 * @param identity the registered identity
123 void slotIdentityRegistered( Kopete::Identity
*identity
);
126 * Cleanup the status bar icon when the identity is destroyed
127 * @param identity the unregistered identity
129 void slotIdentityUnregistered( const Kopete::Identity
*identity
);
132 * The tooltip got changed, update it.
133 * @param identity the identity that has changed
135 void slotIdentityToolTipChanged( Kopete::Identity
*identity
);
138 * The status icon got changed, update it.
139 * @param identity the identity that has changed
141 void slotIdentityStatusIconChanged( Kopete::Identity
*identity
);
144 * Show a in-place widget for an identity
146 void slotIdentityStatusIconLeftClicked( Kopete::Identity
*i
,
151 * This is used to add the account to the "Add Contact" submenu
153 void slotAccountRegistered( Kopete::Account
*account
);
156 * This is used to add the account to the "Add Contact" submenu
158 void slotAccountUnregistered( const Kopete::Account
*account
);
160 void slotTrayAboutToShowMenu(KMenu
*);
163 * Show the Add Contact wizard
165 void showAddContactDialog( Kopete::Account
* );
168 * Show the Export Contacts wizards
170 void showExportDialog();
173 * Enable the Connect All and Disconnect All buttons here
174 * along with connecting the accountRegistered and accountUnregistered
177 void slotAllPluginsLoaded();
180 * Show the set global status message menu when clicking on the icon in the status bar.
182 void slotGlobalStatusMessageIconClicked( const QPoint
&position
);
185 * Show Info Event widget and if necessary raise the Kopete window.
187 void slotShowInfoEventWidget();
190 * Show/hide Info Event widget.
192 void slotInfoIconClicked();
195 * Extracts protocolId and accountId from the single QString argument signalled by a QSignalMapper,
196 * get the account, and call showAddContactDialog.
197 * @param accountIdentifer QString of protocolId and accountId, concatenated with QChar( 0xE000 )
198 * We need both to uniquely identify an account, but QSignalMapper only emits one QString.
200 void slotAddContactDialogInternal( const QString
& accountIdentifier
);
202 void updateStatusMenuMessage( Kopete::StatusRootAction
*statusRootAction
);
211 void makeTrayToolTip();
212 void startAutoHideTimer();
214 virtual bool queryClose();
215 virtual bool queryExit();
223 class GlobalStatusMessageIconLabel
: public QLabel
227 GlobalStatusMessageIconLabel(QWidget
*parent
= 0);
230 void mouseReleaseEvent(QMouseEvent
*event
);
233 void iconClicked(const QPoint
&position
);
237 class InfoEventIconLabel
: public QLabel
241 InfoEventIconLabel( QWidget
*parent
= 0 );
244 void mouseReleaseEvent( QMouseEvent
*event
);
255 // vim: set noet ts=4 sts=4 sw=4: