2 avatarselectorwidget.h - Widget to manage and select user avatar
4 Copyright (c) 2007 by Michaël Larouche <larouche@kde.org>
5 2007 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
7 Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
9 *************************************************************************
11 * This library is free software; you can redistribute it and/or *
12 * modify it under the terms of the GNU Lesser General Public *
13 * License as published by the Free Software Foundation; either *
14 * version 2 of the License, or (at your option) any later version. *
16 *************************************************************************
18 #ifndef KOPETE_AVATARSELECTORWIDGET_H
19 #define KOPETE_AVATARSELECTORWIDGET_H
21 #include <QtGui/QWidget>
24 #include <kopete_export.h>
25 #include <kopeteavatarmanager.h>
27 class QListWidgetItem
;
37 * @brief Widget to select and manager user avatar.
39 * Do not use this widget alone, use AvatarSelectorDialog instead.
41 * @sa AvatarSelectorDialog
42 * @author Michaël Larouche <larouche@kde.org>
44 class KOPETE_EXPORT AvatarSelectorWidget
: public QWidget
49 * @brief Create a new AvatarSelectorWidget
50 * @param parent parent widget
52 AvatarSelectorWidget(QWidget
*parent
= 0);
56 virtual ~AvatarSelectorWidget();
59 * @brief Get the selected AvatarEntry
61 * This is a convience method to retrieve the AvatarEntry
62 * from current selected avatar.
64 * @return AvatarEntry of current selected avatar in list.
66 Kopete::AvatarManager::AvatarEntry
selectedEntry() const;
69 * @brief Set the avatar currently being used
71 * This is used to select the avatar in the avatar list
73 void setCurrentAvatar(const QString
&path
);
78 * Add Avatar button was clicked
80 void buttonAddAvatarClicked();
84 * Remove Avatar button was clicked
86 void buttonRemoveAvatarClicked();
90 * Avatar query job was finished
92 void queryJobFinished(KJob
*job
);
96 * A new avatar was added into storage
97 * @param newEntry new avatar Entry
99 void avatarAdded(Kopete::AvatarManager::AvatarEntry newEntry
);
103 * An avatar has been removed from storage
104 * @param entryRemoved Avatar entry removed
106 void avatarRemoved(Kopete::AvatarManager::AvatarEntry entryRemoved
);
110 * A new item was selected in lists
111 * @param item new selected QListWidgetItem
113 void listSelectionChanged(QListWidgetItem
*item
);
116 Q_DISABLE_COPY(AvatarSelectorWidget
)