• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

libkdepim

  • sources
  • kde-4.12
  • kdepim
  • libkdepim
  • widgets
kwidgetlister.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2 
3  kwidgetlister.h
4 
5  This file is part of libkdepim
6  Copyright (c) 2001 Marc Mutz <mutz@kde.org>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License,
10  version 2, as published by the Free Software Foundation.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this library; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this library with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #ifndef KDEPIM_KWIDGETLISTER_H
34 #define KDEPIM_KWIDGETLISTER_H
35 
36 #include "kdepim_export.h"
37 #include <QWidget>
38 
39 namespace KPIM {
40 
63 class KDEPIM_EXPORT KWidgetLister : public QWidget
64 {
65  Q_OBJECT
66 
67  public:
68  //TODO KDE5 merge two constructors
76  explicit KWidgetLister( int minWidgets = 1, int maxWidgets = 8, QWidget *parent = 0 );
77 
85  explicit KWidgetLister( bool fewerMoreButton, int minWidgets = 1, int maxWidgets = 8, QWidget *parent = 0 );
86 
90  virtual ~KWidgetLister();
91 
92  protected Q_SLOTS:
100  virtual void slotMore();
101 
109  virtual void slotFewer();
110 
118  virtual void slotClear();
119 
120  protected:
131  virtual void addWidgetAtEnd( QWidget *widget = 0 );
132 
142  virtual void removeLastWidget();
143 
148  virtual void clearWidget( QWidget *w );
149 
155  virtual QWidget *createWidget( QWidget *parent );
156 
161  virtual void setNumberOfShownWidgetsTo( int count );
162 
166  QList<QWidget*> widgets() const;
167 
171  int widgetsMinimum() const;
172 
176  int widgetsMaximum() const;
177 
181  virtual void removeWidget(QWidget*widget);
185  virtual void addWidgetAfterThisWidget(QWidget*currentWidget, QWidget* widget = 0);
186 
187  private:
188  void init( bool fewerMoreButton = true );
189 
190  Q_SIGNALS:
194  void widgetAdded();
195 
201  void widgetAdded( QWidget *widget );
202 
206  void widgetRemoved();
207 
211  void widgetRemoved( QWidget *widget );
212 
216  void clearWidgets();
217 
218  private:
219  //@cond PRIVATE
220  class Private;
221  Private* const d;
222  //@endcond
223 };
224 
225 }
226 
227 #endif /* _KWIDGETLISTER_H_ */
kdepim_export.h
QWidget
KPIM::KWidgetLister
Widget that manages a list of other widgets (incl.
Definition: kwidgetlister.h:63
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal