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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
  • ui
collapsiblewidget.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE libraries
3  Copyright (C) 2005 Daniel Molkentin <molkentin@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
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
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 /*
21  * file copied from playground/libs/ui/collabsiblewidget
22  */
23 #ifndef COLLAPSIBLEWIDGET_H
24 #define COLLAPSIBLEWIDGET_H
25 
26 #include <QScrollArea>
27 #include <QLabel>
28 #include <QDebug>
29 #include <QAbstractButton>
30 #include <kopete_export.h>
31 
32 class QScrollArea;
33 
34 class ClickableLabel : public QLabel
35 {
36  Q_OBJECT
37  public:
38  ClickableLabel( QWidget* parent = 0 );
39  ~ClickableLabel();
40 
41  void mouseReleaseEvent( QMouseEvent *e );
42 
43  signals:
44  void clicked();
45 };
46 
47 class ArrowButton : public QAbstractButton
48 {
49  public:
50  ArrowButton(QWidget *parent = 0);
51  ~ArrowButton();
52 
53  QSize sizeHint() const { return QSize(16, 16); }
54 
55  protected:
56  void paintEvent( QPaintEvent* );
57 
58  private:
59 };
60 
65 class KOPETE_EXPORT CollapsibleWidget : public QWidget
66 {
67  Q_OBJECT
68  public:
69  CollapsibleWidget(QWidget *parent = 0);
70  explicit CollapsibleWidget(const QString& caption, QWidget *parent = 0);
71  ~CollapsibleWidget();
72 
73  QString caption() const;
74  bool isExpanded() const;
75 
76  QWidget* innerWidget() const;
77  void setInnerWidget( QWidget *w);
78 
79  public slots:
80  void setExpanded(bool collapsed);
81  void setCaption(const QString& caption);
82 
83 
84  protected:
85  void init();
86 
87  private slots:
88  void animateCollapse(qreal);
89 
90  private:
91  Q_DISABLE_COPY( CollapsibleWidget )
92  class Private;
93  Private * const d;
94 
95 
96 };
97 
98 
104 class KOPETE_EXPORT SettingsContainer : public QScrollArea
105 {
106  Q_ENUMS( CollapseState )
107  Q_OBJECT
108  public:
109  enum CollapseState { Collapsed, Uncollapsed };
110  SettingsContainer( QWidget *parent = 0 );
111  ~SettingsContainer();
112 
113  CollapsibleWidget* insertWidget( QWidget* w, const QString& name );
114 
115  private:
116  Q_DISABLE_COPY( SettingsContainer )
117  class Private;
118  Private * const d;
119 };
120 
121 
122 
123 #endif // COLLAPSIBLEWIDGET_H
124 
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
QWidget
ArrowButton::paintEvent
void paintEvent(QPaintEvent *)
Definition: collapsiblewidget.cpp:53
QMouseEvent
CollapsibleWidget
A widget that has a caption and a collapsible widget.
Definition: collapsiblewidget.h:65
ClickableLabel::~ClickableLabel
~ClickableLabel()
Definition: collapsiblewidget.cpp:33
ArrowButton
Definition: collapsiblewidget.h:47
ClickableLabel
Definition: collapsiblewidget.h:34
ArrowButton::~ArrowButton
~ArrowButton()
Definition: collapsiblewidget.cpp:49
kopete_export.h
ClickableLabel::ClickableLabel
ClickableLabel(QWidget *parent=0)
Definition: collapsiblewidget.cpp:28
QString
ClickableLabel::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *e)
Definition: collapsiblewidget.cpp:37
SettingsContainer
A scrollable container that contains groups of settings, usually in the form of CollapsibleWidgets.
Definition: collapsiblewidget.h:104
QSize
ArrowButton::sizeHint
QSize sizeHint() const
Definition: collapsiblewidget.h:53
SettingsContainer::CollapseState
CollapseState
Definition: collapsiblewidget.h:109
QAbstractButton
QWidget::setCaption
void setCaption(const QString &c)
ArrowButton::ArrowButton
ArrowButton(QWidget *parent=0)
Definition: collapsiblewidget.cpp:43
QPaintEvent
ClickableLabel::clicked
void clicked()
QScrollArea
QLabel
QObject::parent
QObject * parent() const
name
const char * name
Definition: kopeteonlinestatus.cpp:104
QWidget::caption
QString caption() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

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