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

libs/libkdcraw/libkdcraw

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libkdcraw
  • libkdcraw
rexpanderbox.h
Go to the documentation of this file.
1 
30 #ifndef REXPANDERBOX_H
31 #define REXPANDERBOX_H
32 
33 // Qt includes
34 
35 #include <QtCore/QObject>
36 #include <QtGui/QPixmap>
37 #include <QtGui/QLabel>
38 #include <QtGui/QWidget>
39 #include <QtGui/QScrollArea>
40 
41 // KDE includes
42 
43 #include <ksqueezedtextlabel.h>
44 #include <kconfig.h>
45 
46 // Local includes
47 
48 #include "libkdcraw_export.h"
49 
50 namespace KDcrawIface
51 {
52 
53 class LIBKDCRAW_EXPORT RClickLabel : public QLabel
54 {
55  Q_OBJECT
56 
57 public:
58 
59  RClickLabel(QWidget* const parent = 0);
60  explicit RClickLabel(const QString& text, QWidget* const parent = 0);
61  ~RClickLabel();
62 
63 Q_SIGNALS:
64 
66  void leftClicked();
68  void activated();
69 
70 protected:
71 
72  virtual void mousePressEvent(QMouseEvent* event);
73  virtual void mouseReleaseEvent(QMouseEvent* event);
74  virtual void keyPressEvent(QKeyEvent* event);
75 };
76 
77 // -------------------------------------------------------------------------
78 
79 class LIBKDCRAW_EXPORT RSqueezedClickLabel : public KSqueezedTextLabel
80 {
81  Q_OBJECT
82 
83 public:
84 
85  RSqueezedClickLabel(QWidget* const parent = 0);
86  explicit RSqueezedClickLabel(const QString& text, QWidget* const parent = 0);
87  ~RSqueezedClickLabel();
88 
89 Q_SIGNALS:
90 
91  void leftClicked();
92  void activated();
93 
94 protected:
95 
96  virtual void mousePressEvent(QMouseEvent* event);
97  virtual void mouseReleaseEvent(QMouseEvent* event);
98  virtual void keyPressEvent(QKeyEvent* event);
99 };
100 
101 // -------------------------------------------------------------------------
102 
103 class LIBKDCRAW_EXPORT RArrowClickLabel : public QWidget
104 {
105  Q_OBJECT
106 
107 public:
108 
109  RArrowClickLabel(QWidget* const parent = 0);
110  ~RArrowClickLabel();
111 
112  void setArrowType(Qt::ArrowType arrowType);
113  Qt::ArrowType arrowType() const;
114 
115  virtual QSize sizeHint () const;
116 
117 Q_SIGNALS:
118 
119  void leftClicked();
120 
121 protected:
122 
123  virtual void mousePressEvent(QMouseEvent* event);
124  virtual void mouseReleaseEvent(QMouseEvent* event);
125  virtual void paintEvent(QPaintEvent* event);
126 
127 protected:
128 
129  Qt::ArrowType m_arrowType;
130  int m_size;
131  int m_margin;
132 };
133 
134 // -------------------------------------------------------------------------
135 
136 class LIBKDCRAW_EXPORT RLabelExpander : public QWidget
137 {
138  Q_OBJECT
139 
140 public:
141 
142  RLabelExpander(QWidget* const parent = 0);
143  ~RLabelExpander();
144 
145  void setCheckBoxVisible(bool b);
146  bool checkBoxIsVisible() const;
147 
148  void setChecked(bool b);
149  bool isChecked() const;
150 
151  void setLineVisible(bool b);
152  bool lineIsVisible() const;
153 
154  void setText(const QString& txt);
155  QString text() const;
156 
157  void setIcon(const QPixmap& pix);
158  const QPixmap* icon() const;
159 
160  void setWidget(QWidget* const widget);
161  QWidget* widget() const;
162 
163  void setExpanded(bool b);
164  bool isExpanded() const;
165 
166  void setExpandByDefault(bool b);
167  bool isExpandByDefault() const;
168 
169 Q_SIGNALS:
170 
171  void signalExpanded(bool);
172  void signalToggled(bool);
173 
174 private Q_SLOTS:
175 
176  void slotToggleContainer();
177 
178 private:
179 
180  bool eventFilter(QObject* obj, QEvent* ev);
181 
182 private:
183 
184  class Private;
185  Private* const d;
186 };
187 
188 // -------------------------------------------------------------------------
189 
190 class LIBKDCRAW_EXPORT RExpanderBox : public QScrollArea
191 {
192  Q_OBJECT
193 
194 public:
195 
196  RExpanderBox(QWidget* const parent = 0);
197  ~RExpanderBox();
198 
206  void addItem(QWidget* const w, const QPixmap& pix, const QString& txt,
207  const QString& objName, bool expandBydefault);
208  void addItem(QWidget* const w, const QString& txt,
209  const QString& objName, bool expandBydefault);
210 
218  void insertItem(int index, QWidget* const w, const QPixmap& pix, const QString& txt,
219  const QString& objName, bool expandBydefault);
220  void insertItem(int index, QWidget* const w, const QString& txt,
221  const QString& objName, bool expandBydefault);
222 
223  void removeItem(int index);
224 
225  void setCheckBoxVisible(int index, bool b);
226  bool checkBoxIsVisible(int index) const;
227 
228  void setChecked(int index, bool b);
229  bool isChecked(int index) const;
230 
231  void setItemText(int index, const QString& txt);
232  QString itemText (int index) const;
233 
234  void setItemIcon(int index, const QPixmap& pix);
235  const QPixmap* itemIcon(int index) const;
236 
237  void setItemToolTip(int index, const QString& tip);
238  QString itemToolTip(int index) const;
239 
240  void setItemEnabled(int index, bool enabled);
241  bool isItemEnabled(int index) const;
242 
243  void addStretch();
244  void insertStretch(int index);
245 
246  void setItemExpanded(int index, bool b);
247  bool isItemExpanded(int index) const;
248 
249  int count() const;
250 
251  RLabelExpander* widget(int index) const;
252  int indexOf(RLabelExpander* const widget) const;
253 
254  virtual void readSettings(KConfigGroup& group);
255  virtual void writeSettings(KConfigGroup& group);
256 
257 Q_SIGNALS:
258 
259  void signalItemExpanded(int index, bool b);
260  void signalItemToggled(int index, bool b);
261 
262 private Q_SLOTS:
263 
264  void slotItemExpanded(bool b);
265  void slotItemToggled(bool b);
266 
267 private:
268 
269  class Private;
270  Private* const d;
271 };
272 
273 // -------------------------------------------------------------------------
274 
275 class LIBKDCRAW_EXPORT RExpanderBoxExclusive : public RExpanderBox
276 {
277  Q_OBJECT
278 
279 public:
280 
281  RExpanderBoxExclusive(QWidget* const parent = 0);
282  ~RExpanderBoxExclusive();
283 
285  void setIsToolBox(bool b);
286  bool isToolBox() const;
287 
288 private Q_SLOTS:
289 
290  void slotItemExpanded(bool b);
291 
292 private:
293 
294  bool m_toolbox;
295 };
296 
297 } // namespace KDcrawIface
298 
299 #endif // REXPANDERBOX_H
QEvent
QWidget
KDcrawIface::RClickLabel
Definition: rexpanderbox.h:53
KDcrawIface::RArrowClickLabel
Definition: rexpanderbox.h:103
KDcrawIface::RArrowClickLabel::m_arrowType
Qt::ArrowType m_arrowType
Definition: rexpanderbox.h:129
LIBKDCRAW_EXPORT
#define LIBKDCRAW_EXPORT
Definition: libkdcraw_export.h:39
QMouseEvent
QObject
QString
KDcrawIface::RArrowClickLabel::m_size
int m_size
Definition: rexpanderbox.h:130
KSqueezedTextLabel
QPixmap
QSize
KDcrawIface::RExpanderBoxExclusive
Definition: rexpanderbox.h:275
QKeyEvent
libkdcraw_export.h
===========================================================This file is part of the KDE project ...
KDcrawIface::RSqueezedClickLabel
Definition: rexpanderbox.h:79
KDcrawIface::RLabelExpander
Definition: rexpanderbox.h:136
QPaintEvent
QScrollArea
KDcrawIface::RExpanderBox
Definition: rexpanderbox.h:190
QLabel
KDcrawIface::RArrowClickLabel::m_margin
int m_margin
Definition: rexpanderbox.h:131
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libkdcraw/libkdcraw

Skip menu "libs/libkdcraw/libkdcraw"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

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