2 Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 #ifndef CONTACTSWITCHER_H
21 #define CONTACTSWITCHER_H
23 #include <QtGui/QWidget>
25 class QAbstractItemView
;
30 * @short A widget to switch between the contacts of an contact view.
32 * This widgets provides a 'Next' and 'Previous' button to allow the
33 * user to switch between the entries of a contact view.
35 * @author Tobias Koenig <tokoe@kde.org>
37 class ContactSwitcher
: public QWidget
43 * Creates a new contact switcher.
45 * @param parent The parent widget.
47 ContactSwitcher( QWidget
*parent
= 0 );
50 * Sets the @p view the contact switcher shall work on.
52 void setView( QAbstractItemView
*view
);
56 * This slot is called when the 'Next' button is clicked.
61 * This slot is called when the 'Previous' button is clicked.
63 void previousClicked();
66 * This slot is called whenever the layout of the model has changed
67 * or the user has clicked a button.
72 QAbstractItemView
*mView
;
73 QPushButton
*mNextButton
;
74 QPushButton
*mPreviousButton
;