diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/libkopete/ui/accountselector.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/ui/accountselector.h')
-rw-r--r-- | kopete/libkopete/ui/accountselector.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/kopete/libkopete/ui/accountselector.h b/kopete/libkopete/ui/accountselector.h new file mode 100644 index 00000000..4f5d50ac --- /dev/null +++ b/kopete/libkopete/ui/accountselector.h @@ -0,0 +1,92 @@ +/* + accountselector.cpp - An Accountselector + + Copyright (c) 2004 by Stefan Gehn <metz AT gehn.net> + + Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org> + + ************************************************************************* + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + ************************************************************************* +*/ + +#ifndef ACCOUNTSELECTOR_H +#define ACCOUNTSELECTOR_H + +#include <qwidget.h> +#include <kopeteprotocol.h> +#include "kopete_export.h" + +class AccountSelectorPrivate; +class QListViewItem; +/** + * \brief widget to select an account, based on KListView + * @author Stefan Gehn <metz AT gehn.net> + */ +class KOPETE_EXPORT AccountSelector : public QWidget +{ +Q_OBJECT + + public: + /** + * Constructor. + * + * The parameters @p parent and @p name are handled by + * KListView. + */ + AccountSelector(QWidget *parent=0, const char *name=0); + + /** + * Constructor for a list of accounts for one protocol only + * + * The parameters @p parent and @p name are handled by + * KListView. @p proto defines the protocol whose accounts are + * shown in the list + */ + AccountSelector(Kopete::Protocol *proto, QWidget *parent=0, const char *name=0); + + /** + * Destructor. + */ + ~AccountSelector(); + + /** + * Select @p account in the list, in case it's part of the list + */ + void setSelected(Kopete::Account *account); + + /** + * Returns true in case @p account is in the list and + * the currently selected item, false otherwise + */ + bool isSelected(Kopete::Account *account); + + /** + * @return the currently selected account. + */ + Kopete::Account *selectedItem(); + + signals: + /** + * Emitted whenever the selection changed, @p acc is a pointer to the + * newly selected account + */ + void selectionChanged(Kopete::Account *acc); + + private slots: + void slotSelectionChanged(QListViewItem *item); + + private: + void initUI(); + + private: + AccountSelectorPrivate *d; +}; + +#endif +// vim: set noet ts=4 sts=4 sw=4: |