• 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.cpp
Go to the documentation of this file.
1 
30 #include "rexpanderbox.moc"
31 
32 // Qt includes
33 
34 #include <QMouseEvent>
35 #include <QPainter>
36 #include <QPen>
37 #include <QCursor>
38 #include <QStyle>
39 #include <QStyleOption>
40 #include <QGridLayout>
41 #include <QHBoxLayout>
42 #include <QCheckBox>
43 
44 // KDE includes
45 
46 #include <kseparator.h>
47 #include <kdebug.h>
48 #include <kglobalsettings.h>
49 #include <kdialog.h>
50 #include <klocale.h>
51 
52 namespace KDcrawIface
53 {
54 
55 RClickLabel::RClickLabel(QWidget* const parent)
56  : QLabel(parent)
57 {
58  setCursor(Qt::PointingHandCursor);
59 }
60 
61 RClickLabel::RClickLabel(const QString& text, QWidget* const parent)
62  : QLabel(text, parent)
63 {
64  setCursor(Qt::PointingHandCursor);
65 }
66 
67 RClickLabel::~RClickLabel()
68 {
69 }
70 
71 void RClickLabel::mousePressEvent(QMouseEvent* event)
72 {
73  QLabel::mousePressEvent(event);
74 
75  /*
76  * In some contexts, like QGraphicsView, there will be no
77  * release event if the press event was not accepted.
78  */
79  if (event->button() == Qt::LeftButton)
80  {
81  event->accept();
82  }
83 }
84 
85 void RClickLabel::mouseReleaseEvent(QMouseEvent* event)
86 {
87  QLabel::mouseReleaseEvent(event);
88 
89  if (event->button() == Qt::LeftButton)
90  {
91  emit leftClicked();
92  emit activated();
93  event->accept();
94  }
95 }
96 
97 void RClickLabel::keyPressEvent(QKeyEvent* e)
98 {
99  switch (e->key())
100  {
101  case Qt::Key_Down:
102  case Qt::Key_Right:
103  case Qt::Key_Space:
104  emit activated();
105  return;
106  default:
107  break;
108  }
109 
110  QLabel::keyPressEvent(e);
111 }
112 
113 // ------------------------------------------------------------------------
114 
115 RSqueezedClickLabel::RSqueezedClickLabel(QWidget* const parent)
116  : KSqueezedTextLabel(parent)
117 {
118  setCursor(Qt::PointingHandCursor);
119 }
120 
121 RSqueezedClickLabel::RSqueezedClickLabel(const QString& text, QWidget* const parent)
122  : KSqueezedTextLabel(text, parent)
123 {
124  setCursor(Qt::PointingHandCursor);
125 }
126 
127 RSqueezedClickLabel::~RSqueezedClickLabel()
128 {
129 }
130 
131 void RSqueezedClickLabel::mouseReleaseEvent(QMouseEvent* event)
132 {
133  KSqueezedTextLabel::mouseReleaseEvent(event);
134 
135  if (event->button() == Qt::LeftButton)
136  {
137  emit leftClicked();
138  emit activated();
139  event->accept();
140  }
141 }
142 
143 void RSqueezedClickLabel::mousePressEvent(QMouseEvent* event)
144 {
145  QLabel::mousePressEvent(event);
146 
147  /*
148  * In some contexts, like QGraphicsView, there will be no
149  * release event if the press event was not accepted.
150  */
151  if (event->button() == Qt::LeftButton)
152  {
153  event->accept();
154  }
155 }
156 
157 void RSqueezedClickLabel::keyPressEvent(QKeyEvent* e)
158 {
159  switch (e->key())
160  {
161  case Qt::Key_Down:
162  case Qt::Key_Right:
163  case Qt::Key_Space:
164  emit activated();
165  return;
166  default:
167  break;
168  }
169 
170  QLabel::keyPressEvent(e);
171 }
172 
173 // ------------------------------------------------------------------------
174 
175 RArrowClickLabel::RArrowClickLabel(QWidget* const parent)
176  : QWidget(parent), m_arrowType(Qt::DownArrow)
177 {
178  setCursor(Qt::PointingHandCursor);
179  setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
180  m_size = 8;
181  m_margin = 2;
182 }
183 
184 void RArrowClickLabel::setArrowType(Qt::ArrowType type)
185 {
186  m_arrowType = type;
187  update();
188 }
189 
190 RArrowClickLabel::~RArrowClickLabel()
191 {
192 }
193 
194 Qt::ArrowType RArrowClickLabel::arrowType() const
195 {
196  return m_arrowType;
197 }
198 
199 void RArrowClickLabel::mousePressEvent(QMouseEvent* event)
200 {
201  /*
202  * In some contexts, like QGraphicsView, there will be no
203  * release event if the press event was not accepted.
204  */
205  if (event->button() == Qt::LeftButton)
206  {
207  event->accept();
208  }
209 }
210 
211 void RArrowClickLabel::mouseReleaseEvent(QMouseEvent* event)
212 {
213  if (event->button() == Qt::LeftButton)
214  {
215  emit leftClicked();
216  }
217 }
218 
219 void RArrowClickLabel::paintEvent(QPaintEvent*)
220 {
221  // Inspired by karrowbutton.cpp,
222  // Copyright (C) 2001 Frerich Raabe <raabe@kde.org>
223 
224  QPainter p(this);
225 
226  QStyleOptionFrame opt;
227  opt.init(this);
228  opt.lineWidth = 2;
229  opt.midLineWidth = 0;
230 
231  /*
232  p.fillRect( rect(), palette().brush( QPalette::Background ) );
233  style()->drawPrimitive( QStyle::PE_Frame, &opt, &p, this);
234  */
235 
236  if (m_arrowType == Qt::NoArrow)
237  return;
238 
239  if (width() < m_size + m_margin || height() < m_size + m_margin)
240  return; // don't draw arrows if we are too small
241 
242  unsigned int x = 0, y = 0;
243  if (m_arrowType == Qt::DownArrow)
244  {
245  x = (width() - m_size) / 2;
246  y = height() - (m_size + m_margin);
247  }
248  else if (m_arrowType == Qt::UpArrow)
249  {
250  x = (width() - m_size) / 2;
251  y = m_margin;
252  }
253  else if (m_arrowType == Qt::RightArrow)
254  {
255  x = width() - (m_size + m_margin);
256  y = (height() - m_size) / 2;
257  }
258  else // arrowType == LeftArrow
259  {
260  x = m_margin;
261  y = (height() - m_size) / 2;
262  }
263 
264 /*
265  if (isDown())
266  {
267  ++x;
268  ++y;
269  }
270 */
271 
272  QStyle::PrimitiveElement e = QStyle::PE_IndicatorArrowLeft;
273 
274  switch (m_arrowType)
275  {
276  case Qt::LeftArrow:
277  e = QStyle::PE_IndicatorArrowLeft;
278  break;
279  case Qt::RightArrow:
280  e = QStyle::PE_IndicatorArrowRight;
281  break;
282  case Qt::UpArrow:
283  e = QStyle::PE_IndicatorArrowUp;
284  break;
285  case Qt::DownArrow:
286  e = QStyle::PE_IndicatorArrowDown;
287  break;
288  case Qt::NoArrow:
289  break;
290  }
291 
292  opt.state |= QStyle::State_Enabled;
293  opt.rect = QRect( x, y, m_size, m_size);
294 
295  style()->drawPrimitive( e, &opt, &p, this );
296 }
297 
298 QSize RArrowClickLabel::sizeHint() const
299 {
300  return QSize(m_size + 2*m_margin, m_size + 2*m_margin);
301 }
302 
303 // ------------------------------------------------------------------------
304 
305 class RLabelExpander::Private
306 {
307 
308 public:
309 
310  Private()
311  {
312  clickLabel = 0;
313  containerWidget = 0;
314  pixmapLabel = 0;
315  grid = 0;
316  arrow = 0;
317  line = 0;
318  hbox = 0;
319  checkBox = 0;
320  expandByDefault = true;
321  }
322 
323  bool expandByDefault;
324 
325  QCheckBox* checkBox;
326  QLabel* pixmapLabel;
327  QWidget* containerWidget;
328  QGridLayout* grid;
329 
330  KSeparator* line;
331  QWidget* hbox;
332 
333  RArrowClickLabel* arrow;
334  RClickLabel* clickLabel;
335 };
336 
337 RLabelExpander::RLabelExpander(QWidget* const parent)
338  : QWidget(parent), d(new Private)
339 {
340  d->grid = new QGridLayout(this);
341  d->line = new KSeparator(Qt::Horizontal, this);
342  d->hbox = new QWidget(this);
343  d->arrow = new RArrowClickLabel(d->hbox);
344  d->checkBox = new QCheckBox(d->hbox);
345  d->pixmapLabel = new QLabel(d->hbox);
346  d->clickLabel = new RClickLabel(d->hbox);
347 
348  QHBoxLayout* const hlay = new QHBoxLayout(d->hbox);
349  hlay->addWidget(d->arrow);
350  hlay->addWidget(d->checkBox);
351  hlay->addWidget(d->pixmapLabel);
352  hlay->addWidget(d->clickLabel, 10);
353  hlay->setMargin(0);
354  hlay->setSpacing(KDialog::spacingHint());
355 
356  d->pixmapLabel->installEventFilter(this);
357  d->pixmapLabel->setCursor(Qt::PointingHandCursor);
358 
359  d->hbox->setCursor(Qt::PointingHandCursor);
360  setCheckBoxVisible(false);
361 
362  d->grid->addWidget(d->line, 0, 0, 1, 3);
363  d->grid->addWidget(d->hbox, 1, 0, 1, 3);
364  d->grid->setColumnStretch(2, 10);
365  d->grid->setMargin(KDialog::spacingHint());
366  d->grid->setSpacing(KDialog::spacingHint());
367 
368  connect(d->arrow, SIGNAL(leftClicked()),
369  this, SLOT(slotToggleContainer()));
370 
371  connect(d->clickLabel, SIGNAL(activated()),
372  this, SLOT(slotToggleContainer()));
373 
374  connect(d->checkBox, SIGNAL(toggled(bool)),
375  this, SIGNAL(signalToggled(bool)));
376 }
377 
378 RLabelExpander::~RLabelExpander()
379 {
380  delete d;
381 }
382 
383 void RLabelExpander::setCheckBoxVisible(bool b)
384 {
385  d->checkBox->setVisible(b);
386 }
387 
388 bool RLabelExpander::checkBoxIsVisible() const
389 {
390  return d->checkBox->isVisible();
391 }
392 
393 void RLabelExpander::setChecked(bool b)
394 {
395  d->checkBox->setChecked(b);
396 }
397 
398 bool RLabelExpander::isChecked() const
399 {
400  return d->checkBox->isChecked();
401 }
402 
403 void RLabelExpander::setLineVisible(bool b)
404 {
405  d->line->setVisible(b);
406 }
407 
408 bool RLabelExpander::lineIsVisible() const
409 {
410  return d->line->isVisible();
411 }
412 
413 void RLabelExpander::setText(const QString& txt)
414 {
415  d->clickLabel->setText(QString("<qt><b>%1</b></qt>").arg(txt));
416 }
417 
418 QString RLabelExpander::text() const
419 {
420  return d->clickLabel->text();
421 }
422 
423 void RLabelExpander::setIcon(const QPixmap& pix)
424 {
425  d->pixmapLabel->setPixmap(pix);
426 }
427 
428 const QPixmap* RLabelExpander::icon() const
429 {
430  return d->pixmapLabel->pixmap();
431 }
432 
433 void RLabelExpander::setWidget(QWidget* const widget)
434 {
435  if (widget)
436  {
437  d->containerWidget = widget;
438  d->containerWidget->setParent(this);
439  d->grid->addWidget(d->containerWidget, 2, 0, 1, 3);
440  }
441 }
442 
443 QWidget* RLabelExpander::widget() const
444 {
445  return d->containerWidget;
446 }
447 
448 void RLabelExpander::setExpandByDefault(bool b)
449 {
450  d->expandByDefault = b;
451 }
452 
453 bool RLabelExpander::isExpandByDefault() const
454 {
455  return d->expandByDefault;
456 }
457 
458 void RLabelExpander::setExpanded(bool b)
459 {
460  if (d->containerWidget)
461  {
462  d->containerWidget->setVisible(b);
463  if (b)
464  d->arrow->setArrowType(Qt::DownArrow);
465  else
466  d->arrow->setArrowType(Qt::RightArrow);
467  }
468 
469  emit signalExpanded(b);
470 }
471 
472 bool RLabelExpander::isExpanded() const
473 {
474  return (d->arrow->arrowType() == Qt::DownArrow);
475 }
476 
477 void RLabelExpander::slotToggleContainer()
478 {
479  if (d->containerWidget)
480  setExpanded(!d->containerWidget->isVisible());
481 }
482 
483 bool RLabelExpander::eventFilter(QObject* obj, QEvent* ev)
484 {
485  if ( obj == d->pixmapLabel)
486  {
487  if ( ev->type() == QEvent::MouseButtonRelease)
488  {
489  slotToggleContainer();
490  return false;
491  }
492  else
493  {
494  return false;
495  }
496  }
497  else
498  {
499  // pass the event on to the parent class
500  return QWidget::eventFilter(obj, ev);
501  }
502 }
503 
504 // ------------------------------------------------------------------------
505 
506 class RExpanderBox::Private
507 {
508 public:
509 
510  Private(RExpanderBox* const box)
511  {
512  parent = box;
513  vbox = 0;
514  }
515 
516  void createItem(int index, QWidget* const w, const QPixmap& pix, const QString& txt,
517  const QString& objName, bool expandBydefault)
518  {
519  RLabelExpander* const exp = new RLabelExpander(parent->viewport());
520  exp->setText(txt);
521  exp->setIcon(pix);
522  exp->setWidget(w);
523  exp->setLineVisible(!wList.isEmpty());
524  exp->setObjectName(objName);
525  exp->setExpandByDefault(expandBydefault);
526 
527  if (index >= 0)
528  {
529  vbox->insertWidget(index, exp);
530  wList.insert(index, exp);
531  }
532  else
533  {
534  vbox->addWidget(exp);
535  wList.append(exp);
536  }
537 
538  parent->connect(exp, SIGNAL(signalExpanded(bool)),
539  parent, SLOT(slotItemExpanded(bool)));
540 
541  parent->connect(exp, SIGNAL(signalToggled(bool)),
542  parent, SLOT(slotItemToggled(bool)));
543  }
544 
545 public:
546 
547  QList<RLabelExpander*> wList;
548 
549  QVBoxLayout* vbox;
550 
551  RExpanderBox* parent;
552 };
553 
554 RExpanderBox::RExpanderBox(QWidget* const parent)
555  : QScrollArea(parent), d(new Private(this))
556 {
557  setFrameStyle(QFrame::NoFrame);
558  setWidgetResizable(true);
559  QWidget* const main = new QWidget(viewport());
560  d->vbox = new QVBoxLayout(main);
561  d->vbox->setMargin(0);
562  d->vbox->setSpacing(KDialog::spacingHint());
563  setWidget(main);
564 
565  setAutoFillBackground(false);
566  viewport()->setAutoFillBackground(false);
567  main->setAutoFillBackground(false);
568 }
569 
570 RExpanderBox::~RExpanderBox()
571 {
572  d->wList.clear();
573  delete d;
574 }
575 
576 void RExpanderBox::setCheckBoxVisible(int index, bool b)
577 {
578  if (index > d->wList.count() || index < 0) return;
579  d->wList[index]->setCheckBoxVisible(b);
580 }
581 
582 bool RExpanderBox::checkBoxIsVisible(int index) const
583 {
584  if (index > d->wList.count() || index < 0) return false;
585  return d->wList[index]->checkBoxIsVisible();
586 }
587 
588 void RExpanderBox::setChecked(int index, bool b)
589 {
590  if (index > d->wList.count() || index < 0) return;
591  d->wList[index]->setChecked(b);
592 }
593 
594 bool RExpanderBox::isChecked(int index) const
595 {
596  if (index > d->wList.count() || index < 0) return false;
597  return d->wList[index]->isChecked();
598 }
599 
600 void RExpanderBox::addItem(QWidget* const w, const QPixmap& pix, const QString& txt,
601  const QString& objName, bool expandBydefault)
602 {
603  d->createItem(-1, w, pix, txt, objName, expandBydefault);
604 }
605 
606 void RExpanderBox::addItem(QWidget* const w, const QString& txt,
607  const QString& objName, bool expandBydefault)
608 {
609  addItem(w, QPixmap(), txt, objName, expandBydefault);
610 }
611 
612 void RExpanderBox::addStretch()
613 {
614  d->vbox->addStretch(10);
615 }
616 
617 void RExpanderBox::insertItem(int index, QWidget* const w, const QPixmap& pix, const QString& txt,
618  const QString& objName, bool expandBydefault)
619 {
620  d->createItem(index, w, pix, txt, objName, expandBydefault);
621 }
622 
623 void RExpanderBox::slotItemExpanded(bool b)
624 {
625  RLabelExpander* const exp = dynamic_cast<RLabelExpander*>(sender());
626  if (exp)
627  {
628  int index = indexOf(exp);
629  emit signalItemExpanded(index, b);
630  }
631 }
632 
633 void RExpanderBox::slotItemToggled(bool b)
634 {
635  RLabelExpander* const exp = dynamic_cast<RLabelExpander*>(sender());
636  if (exp)
637  {
638  int index = indexOf(exp);
639  emit signalItemToggled(index, b);
640  }
641 }
642 
643 void RExpanderBox::insertItem(int index, QWidget* const w, const QString& txt,
644  const QString& objName, bool expandBydefault)
645 {
646  insertItem(index, w, QPixmap(), txt, objName, expandBydefault);
647 }
648 
649 void RExpanderBox::insertStretch(int index)
650 {
651  d->vbox->insertStretch(index, 10);
652 }
653 
654 void RExpanderBox::removeItem(int index)
655 {
656  if (index > d->wList.count() || index < 0) return;
657  d->wList[index]->hide();
658  d->wList.removeAt(index);
659 }
660 
661 void RExpanderBox::setItemText(int index, const QString& txt)
662 {
663  if (index > d->wList.count() || index < 0) return;
664  d->wList[index]->setText(txt);
665 }
666 
667 QString RExpanderBox::itemText(int index) const
668 {
669  if (index > d->wList.count() || index < 0) return QString();
670  return d->wList[index]->text();
671 }
672 
673 void RExpanderBox::setItemIcon(int index, const QPixmap& pix)
674 {
675  if (index > d->wList.count() || index < 0) return;
676  d->wList[index]->setIcon(pix);
677 }
678 
679 const QPixmap* RExpanderBox::itemIcon(int index) const
680 {
681  if (index > d->wList.count() || index < 0) return 0;
682  return d->wList[index]->icon();
683 }
684 
685 int RExpanderBox::count() const
686 {
687  return d->wList.count();
688 }
689 
690 void RExpanderBox::setItemToolTip(int index, const QString& tip)
691 {
692  if (index > d->wList.count() || index < 0) return;
693  d->wList[index]->setToolTip(tip);
694 }
695 
696 QString RExpanderBox::itemToolTip(int index) const
697 {
698  if (index > d->wList.count() || index < 0) return QString();
699  return d->wList[index]->toolTip();
700 }
701 
702 void RExpanderBox::setItemEnabled(int index, bool enabled)
703 {
704  if (index > d->wList.count() || index < 0) return;
705  d->wList[index]->setEnabled(enabled);
706 }
707 
708 bool RExpanderBox::isItemEnabled(int index) const
709 {
710  if (index > d->wList.count() || index < 0) return false;
711  return d->wList[index]->isEnabled();
712 }
713 
714 RLabelExpander* RExpanderBox::widget(int index) const
715 {
716  if (index > d->wList.count() || index < 0) return 0;
717 
718  return d->wList[index];
719 }
720 
721 int RExpanderBox::indexOf(RLabelExpander* const widget) const
722 {
723  for (int i = 0 ; i < count(); ++i)
724  {
725  RLabelExpander* const exp = d->wList[i];
726 
727  if (widget == exp)
728  return i;
729  }
730  return -1;
731 }
732 
733 void RExpanderBox::setItemExpanded(int index, bool b)
734 {
735  if (index > d->wList.count() || index < 0) return;
736 
737  RLabelExpander* const exp = d->wList[index];
738 
739  if (!exp) return;
740 
741  exp->setExpanded(b);
742 }
743 
744 bool RExpanderBox::isItemExpanded(int index) const
745 {
746  if (index > d->wList.count() || index < 0) return false;
747 
748  RLabelExpander* const exp = d->wList[index];
749 
750  if (!exp) return false;
751 
752  return (exp->isExpanded());
753 }
754 
755 void RExpanderBox::readSettings(KConfigGroup& group)
756 {
757  for (int i = 0 ; i < count(); ++i)
758  {
759  RLabelExpander* const exp = d->wList[i];
760 
761  if (exp)
762  {
763  exp->setExpanded(group.readEntry(QString("%1 Expanded").arg(exp->objectName()),
764  exp->isExpandByDefault()));
765  }
766  }
767 }
768 
769 void RExpanderBox::writeSettings(KConfigGroup& group)
770 {
771  for (int i = 0 ; i < count(); ++i)
772  {
773  RLabelExpander* const exp = d->wList[i];
774 
775  if (exp)
776  {
777  group.writeEntry(QString("%1 Expanded").arg(exp->objectName()),
778  exp->isExpanded());
779  }
780  }
781 }
782 
783 // ------------------------------------------------------------------------
784 
785 RExpanderBoxExclusive::RExpanderBoxExclusive(QWidget* const parent)
786  : RExpanderBox(parent)
787 {
788  setIsToolBox(true);
789 }
790 
791 RExpanderBoxExclusive::~RExpanderBoxExclusive()
792 {
793 }
794 
795 void RExpanderBoxExclusive::slotItemExpanded(bool b)
796 {
797  RLabelExpander* const exp = dynamic_cast<RLabelExpander*>(sender());
798  if (!exp) return;
799 
800  if (isToolBox() && b)
801  {
802  int item = 0;
803 
804  while (item < count())
805  {
806  if (isItemExpanded(item) && item != indexOf(exp))
807  {
808  setItemExpanded(item, false);
809  }
810 
811  item++;
812  }
813  }
814  emit signalItemExpanded(indexOf(exp), b);
815 }
816 
817 void RExpanderBoxExclusive::setIsToolBox(bool b)
818 {
819  m_toolbox = b;
820 }
821 
822 bool RExpanderBoxExclusive::isToolBox() const
823 {
824  return (m_toolbox);
825 }
826 
827 } // namespace KDcrawIface
KDcrawIface::RLabelExpander::setWidget
void setWidget(QWidget *const widget)
Definition: rexpanderbox.cpp:433
KDcrawIface::RSqueezedClickLabel::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition: rexpanderbox.cpp:143
QEvent
KDcrawIface::RLabelExpander::RLabelExpander
RLabelExpander(QWidget *const parent=0)
Definition: rexpanderbox.cpp:337
QWidget
KDcrawIface::RClickLabel
Definition: rexpanderbox.h:53
KDcrawIface::RLabelExpander::widget
QWidget * widget() const
Definition: rexpanderbox.cpp:443
QScrollArea::setWidget
void setWidget(QWidget *widget)
QEvent::type
Type type() const
KDcrawIface::RExpanderBox::itemIcon
const QPixmap * itemIcon(int index) const
Definition: rexpanderbox.cpp:679
KDcrawIface::RExpanderBox::~RExpanderBox
~RExpanderBox()
Definition: rexpanderbox.cpp:570
KDcrawIface::RExpanderBox::setItemToolTip
void setItemToolTip(int index, const QString &tip)
Definition: rexpanderbox.cpp:690
KDcrawIface::RExpanderBox::setChecked
void setChecked(int index, bool b)
Definition: rexpanderbox.cpp:588
QWidget::setCursor
void setCursor(const QCursor &)
KDcrawIface::RExpanderBox::removeItem
void removeItem(int index)
Definition: rexpanderbox.cpp:654
KDcrawIface::RArrowClickLabel
Definition: rexpanderbox.h:103
KDcrawIface::RLabelExpander::setExpandByDefault
void setExpandByDefault(bool b)
Definition: rexpanderbox.cpp:448
KDcrawIface::RArrowClickLabel::m_arrowType
Qt::ArrowType m_arrowType
Definition: rexpanderbox.h:129
KDcrawIface::RSqueezedClickLabel::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: rexpanderbox.cpp:131
QObject::sender
QObject * sender() const
QScrollArea::widget
QWidget * widget() const
KDcrawIface::RExpanderBox::RExpanderBox
RExpanderBox(QWidget *const parent=0)
Definition: rexpanderbox.cpp:554
QWidget::style
QStyle * style() const
KDcrawIface::RExpanderBox::setItemEnabled
void setItemEnabled(int index, bool enabled)
Definition: rexpanderbox.cpp:702
QWidget::y
int y() const
QHBoxLayout
KDcrawIface::RLabelExpander::setLineVisible
void setLineVisible(bool b)
Definition: rexpanderbox.cpp:403
QAbstractScrollArea::viewport
QWidget * viewport() const
QGridLayout
KDcrawIface::RLabelExpander::checkBoxIsVisible
bool checkBoxIsVisible() const
Definition: rexpanderbox.cpp:388
KDcrawIface::RLabelExpander::lineIsVisible
bool lineIsVisible() const
Definition: rexpanderbox.cpp:408
KDcrawIface::RSqueezedClickLabel::activated
void activated()
QMouseEvent
KDcrawIface::RExpanderBox::itemToolTip
QString itemToolTip(int index) const
Definition: rexpanderbox.cpp:696
QFrame::setFrameStyle
void setFrameStyle(int style)
KDcrawIface::RArrowClickLabel::leftClicked
void leftClicked()
KDcrawIface::RLabelExpander::icon
const QPixmap * icon() const
Definition: rexpanderbox.cpp:428
KDcrawIface::RExpanderBox::itemText
QString itemText(int index) const
Definition: rexpanderbox.cpp:667
KDcrawIface::RLabelExpander::isExpanded
bool isExpanded() const
Definition: rexpanderbox.cpp:472
KDcrawIface::RLabelExpander::setExpanded
void setExpanded(bool b)
Definition: rexpanderbox.cpp:458
QWidget::update
void update()
KDcrawIface::RClickLabel::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: rexpanderbox.cpp:85
KDcrawIface::RExpanderBox::count
int count() const
Definition: rexpanderbox.cpp:685
KDcrawIface::RClickLabel::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition: rexpanderbox.cpp:71
KDcrawIface::RLabelExpander::isChecked
bool isChecked() const
Definition: rexpanderbox.cpp:398
QWidget::width
int width() const
KDcrawIface::RExpanderBox::indexOf
int indexOf(RLabelExpander *const widget) const
Definition: rexpanderbox.cpp:721
KDcrawIface::RExpanderBox::setItemIcon
void setItemIcon(int index, const QPixmap &pix)
Definition: rexpanderbox.cpp:673
QRect
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
KDcrawIface::RArrowClickLabel::arrowType
Qt::ArrowType arrowType() const
Definition: rexpanderbox.cpp:194
KDcrawIface::RExpanderBox::addStretch
void addStretch()
Definition: rexpanderbox.cpp:612
KDcrawIface::RSqueezedClickLabel::leftClicked
void leftClicked()
QWidget::x
int x() const
KDcrawIface::RArrowClickLabel::~RArrowClickLabel
~RArrowClickLabel()
Definition: rexpanderbox.cpp:190
QObject
KDcrawIface::RExpanderBox::setCheckBoxVisible
void setCheckBoxVisible(int index, bool b)
Definition: rexpanderbox.cpp:576
QCheckBox
QMouseEvent::button
Qt::MouseButton button() const
KDcrawIface::RExpanderBoxExclusive::RExpanderBoxExclusive
RExpanderBoxExclusive(QWidget *const parent=0)
Definition: rexpanderbox.cpp:785
QPainter
QObject::setObjectName
void setObjectName(const QString &name)
KDcrawIface::RArrowClickLabel::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: rexpanderbox.cpp:211
KDcrawIface::RExpanderBox::writeSettings
virtual void writeSettings(KConfigGroup &group)
Definition: rexpanderbox.cpp:769
KDcrawIface::RArrowClickLabel::RArrowClickLabel
RArrowClickLabel(QWidget *const parent=0)
Definition: rexpanderbox.cpp:175
KDcrawIface::RArrowClickLabel::paintEvent
virtual void paintEvent(QPaintEvent *event)
Definition: rexpanderbox.cpp:219
KDcrawIface::RExpanderBox::setItemText
void setItemText(int index, const QString &txt)
Definition: rexpanderbox.cpp:661
QVBoxLayout
QObject::eventFilter
virtual bool eventFilter(QObject *watched, QEvent *event)
KDcrawIface::RExpanderBoxExclusive::isToolBox
bool isToolBox() const
Definition: rexpanderbox.cpp:822
KDcrawIface::RLabelExpander::setChecked
void setChecked(bool b)
Definition: rexpanderbox.cpp:393
QString
QList
KDcrawIface::RSqueezedClickLabel::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition: rexpanderbox.cpp:157
KDcrawIface::RLabelExpander::setCheckBoxVisible
void setCheckBoxVisible(bool b)
Definition: rexpanderbox.cpp:383
KDcrawIface::RExpanderBox::addItem
void addItem(QWidget *const w, const QPixmap &pix, const QString &txt, const QString &objName, bool expandBydefault)
Add RLabelExpander item at end of box layout with these settings : 'w' : the widget hosted by RLabelE...
Definition: rexpanderbox.cpp:600
QLayout::setMargin
void setMargin(int margin)
KDcrawIface::RClickLabel::leftClicked
void leftClicked()
Emitted when activated by left mouse click.
KDcrawIface::RLabelExpander::text
QString text() const
Definition: rexpanderbox.cpp:418
QWidget::setSizePolicy
void setSizePolicy(QSizePolicy)
KDcrawIface::RArrowClickLabel::m_size
int m_size
Definition: rexpanderbox.h:130
KSqueezedTextLabel
QPixmap
KDcrawIface::RClickLabel::activated
void activated()
Emitted when activated, by mouse or key press.
QKeyEvent::key
int key() const
QSize
QScrollArea::setWidgetResizable
void setWidgetResizable(bool resizable)
KDcrawIface::RClickLabel::~RClickLabel
~RClickLabel()
Definition: rexpanderbox.cpp:67
KDcrawIface::RClickLabel::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition: rexpanderbox.cpp:97
KDcrawIface::RExpanderBox::isChecked
bool isChecked(int index) const
Definition: rexpanderbox.cpp:594
KDcrawIface::RArrowClickLabel::setArrowType
void setArrowType(Qt::ArrowType arrowType)
Definition: rexpanderbox.cpp:184
KDcrawIface::RExpanderBox::checkBoxIsVisible
bool checkBoxIsVisible(int index) const
Definition: rexpanderbox.cpp:582
QKeyEvent
KDcrawIface::RExpanderBox::insertStretch
void insertStretch(int index)
Definition: rexpanderbox.cpp:649
KDcrawIface::RClickLabel::RClickLabel
RClickLabel(QWidget *const parent=0)
Definition: rexpanderbox.cpp:55
KDcrawIface::RLabelExpander::setText
void setText(const QString &txt)
Definition: rexpanderbox.cpp:413
KDcrawIface::RSqueezedClickLabel::~RSqueezedClickLabel
~RSqueezedClickLabel()
Definition: rexpanderbox.cpp:127
KDcrawIface::RExpanderBox::signalItemExpanded
void signalItemExpanded(int index, bool b)
QWidget::QWidget
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
QLabel::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *ev)
KDcrawIface::RArrowClickLabel::mousePressEvent
virtual void mousePressEvent(QMouseEvent *event)
Definition: rexpanderbox.cpp:199
QStyleOption::init
void init(const QWidget *widget)
QStyle::drawPrimitive
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
QLabel::keyPressEvent
virtual void keyPressEvent(QKeyEvent *ev)
QWidget::setAutoFillBackground
void setAutoFillBackground(bool enabled)
KDcrawIface::RExpanderBox::signalItemToggled
void signalItemToggled(int index, bool b)
KDcrawIface::RLabelExpander::signalToggled
void signalToggled(bool)
KDcrawIface::RLabelExpander::~RLabelExpander
~RLabelExpander()
Definition: rexpanderbox.cpp:378
KDcrawIface::RLabelExpander
Definition: rexpanderbox.h:136
KDcrawIface::RExpanderBox::isItemEnabled
bool isItemEnabled(int index) const
Definition: rexpanderbox.cpp:708
QPaintEvent
KDcrawIface::RLabelExpander::isExpandByDefault
bool isExpandByDefault() const
Definition: rexpanderbox.cpp:453
KDcrawIface::RExpanderBoxExclusive::~RExpanderBoxExclusive
~RExpanderBoxExclusive()
Definition: rexpanderbox.cpp:791
QScrollArea
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KDcrawIface::RExpanderBox
Definition: rexpanderbox.h:190
QLabel
QObject::parent
QObject * parent() const
KDcrawIface::RLabelExpander::signalExpanded
void signalExpanded(bool)
KDcrawIface::RArrowClickLabel::m_margin
int m_margin
Definition: rexpanderbox.h:131
QStyleOptionFrame
KDcrawIface::RExpanderBox::readSettings
virtual void readSettings(KConfigGroup &group)
Definition: rexpanderbox.cpp:755
KDcrawIface::RExpanderBox::setItemExpanded
void setItemExpanded(int index, bool b)
Definition: rexpanderbox.cpp:733
KDcrawIface::RSqueezedClickLabel::RSqueezedClickLabel
RSqueezedClickLabel(QWidget *const parent=0)
Definition: rexpanderbox.cpp:115
QBoxLayout::setSpacing
void setSpacing(int spacing)
QLabel::mousePressEvent
virtual void mousePressEvent(QMouseEvent *ev)
QWidget::height
int height() const
KDcrawIface::RExpanderBox::insertItem
void insertItem(int index, QWidget *const w, const QPixmap &pix, const QString &txt, const QString &objName, bool expandBydefault)
Insert RLabelExpander item at box layout index with these settings : 'w' : the widget hosted by RLabe...
Definition: rexpanderbox.cpp:617
KDcrawIface::RExpanderBox::isItemExpanded
bool isItemExpanded(int index) const
Definition: rexpanderbox.cpp:744
KDcrawIface::RLabelExpander::setIcon
void setIcon(const QPixmap &pix)
Definition: rexpanderbox.cpp:423
KDcrawIface::RExpanderBoxExclusive::setIsToolBox
void setIsToolBox(bool b)
Show one expander open at most.
Definition: rexpanderbox.cpp:817
KDcrawIface::RArrowClickLabel::sizeHint
virtual QSize sizeHint() const
Definition: rexpanderbox.cpp:298
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