Input widget with an editor widget.
More...
#include <AbstractInputWidget.h>
Input widget with an editor widget.
omni::ui::AbstractInputWidget::AbstractInputWidget |
( |
QWidget * |
_parent = nullptr | ) |
|
virtual omni::ui::AbstractInputWidget::~AbstractInputWidget |
( |
| ) |
|
|
inlinevirtual |
void omni::ui::AbstractInputWidget::drawHandle |
( |
QPainter & |
_p, |
|
|
double |
_pos, |
|
|
double |
_heightFactor = 1.0 |
|
) |
| const |
|
protected |
Draw slider handle.
91 QRectF _progressRect = rect();
93 _progressRect.setRight(_pos);
94 _p.setPen(QPen(
colorSet().dark(), 4));
96 QPointF(_pos, _progressRect.bottom() + 2),
98 _progressRect.bottom() - _heightFactor *
99 _progressRect.height() - 2));
void omni::ui::AbstractInputWidget::drawTrack |
( |
QPainter & |
_p, |
|
|
double |
_pos |
|
) |
| const |
|
protected |
void omni::ui::AbstractInputWidget::drawTrack |
( |
QPainter & |
_p, |
|
|
double |
_left, |
|
|
double |
_right |
|
) |
| const |
|
protected |
106 QRectF _progressRect = rect();
108 _p.setBrush(QBrush(
colorSet().window()));
109 _p.drawRect(_progressRect);
111 if (_left > _right) std::swap(_left, _right);
113 _progressRect.setLeft(_left);
114 _progressRect.setRight(_right);
115 _p.setBrush(QBrush(
colorSet().highlight()));
116 _p.drawRect(_progressRect);
void omni::ui::AbstractInputWidget::hideEditor |
( |
| ) |
|
|
slot |
Hide editor.
void hideEditor()
Hide editor.
Definition: Editor.h:98
void omni::ui::AbstractInputWidget::init |
( |
| ) |
|
|
protected |
38 valueLabel_->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
40 QSizePolicy::Expanding);
41 valueLabel_->setStyleSheet(
"background : transparent; color: #808080;");
void omni::ui::AbstractInputWidget::keyPressEvent |
( |
QKeyEvent * |
e | ) |
|
|
protectedvirtual |
Show editor when enter key is pressed.
Reimplemented in omni::ui::RangedFloat, and omni::ui::RangedInt.
81 if (((e->key() == Qt::Key_Enter) || (e->key() == Qt::Key_Return)))
editor_type const * editor() const
Return pointer editor (const version)
Definition: Editor.h:58
void omni::ui::AbstractInputWidget::mouseDoubleClickEvent |
( |
QMouseEvent * |
| ) |
|
|
protectedvirtual |
void omni::ui::AbstractInputWidget::mousePressEvent |
( |
QMouseEvent * |
| ) |
|
|
protectedvirtual |
void omni::ui::AbstractInputWidget::setEditorVisible |
( |
bool |
_visible | ) |
|
|
virtualslot |
Set editor visible.
virtual void setEditorVisible(bool _visible)
Set editor visibility and set focus.
Definition: Editor.h:82
void omni::ui::AbstractInputWidget::showEditor |
( |
| ) |
|
|
slot |
Show editor.
void showEditor()
Show editor and set focus.
Definition: Editor.h:93
void omni::ui::AbstractInputWidget::valueChanged |
( |
| ) |
|
|
signal |
QLabel* omni::ui::AbstractInputWidget::valueLabel_ = nullptr |
|
protected |
The documentation for this class was generated from the following files: