#include <kis_shade_selector_line_combo_box.h>
◆ KisShadeSelectorLineComboBox()
| KisShadeSelectorLineComboBox::KisShadeSelectorLineComboBox |
( |
QWidget * | parent = 0 | ) |
|
|
explicit |
Definition at line 26 of file kis_shade_selector_line_combo_box.cpp.
26 :
27 QComboBox(parent),
31{
32 QGridLayout* l = new QGridLayout(this);
33 {
34 int left;
35 l->getContentsMargins(&left, nullptr, nullptr, nullptr);
36 l->setContentsMargins(left, 0, 30, 0);
37
38 }
40
41 m_currentLine->setAttribute(Qt::WA_TransparentForMouseEvents);
42
46
48}
KisShadeSelectorLineComboBoxPopup * m_popup
KisShadeSelectorLine * m_currentLine
QScopedPointer< KisColorSelectorBaseProxy > m_parentProxy
void setColor(const KoColor &color)
void fromQColor(const QColor &c)
Convenient function for converting from a QColor.
References KoColor::fromQColor(), m_currentLine, KisShadeSelectorLine::setColor(), and updateSettings().
◆ ~KisShadeSelectorLineComboBox()
| KisShadeSelectorLineComboBox::~KisShadeSelectorLineComboBox |
( |
| ) |
|
|
override |
◆ configuration()
| QString KisShadeSelectorLineComboBox::configuration |
( |
| ) |
const |
◆ hidePopup()
| void KisShadeSelectorLineComboBox::hidePopup |
( |
| ) |
|
|
override |
◆ resizeEvent()
| void KisShadeSelectorLineComboBox::resizeEvent |
( |
QResizeEvent * | e | ) |
|
|
overrideprotected |
◆ setConfiguration
| void KisShadeSelectorLineComboBox::setConfiguration |
( |
const QString & | stri | ) |
|
|
slot |
◆ setGradient
| void KisShadeSelectorLineComboBox::setGradient |
( |
bool | b | ) |
|
|
slot |
◆ setLineHeight
| void KisShadeSelectorLineComboBox::setLineHeight |
( |
int | height | ) |
|
|
slot |
◆ setLineNumber()
| void KisShadeSelectorLineComboBox::setLineNumber |
( |
int | n | ) |
|
◆ setPatchCount
| void KisShadeSelectorLineComboBox::setPatchCount |
( |
int | count | ) |
|
|
slot |
◆ setPatches
| void KisShadeSelectorLineComboBox::setPatches |
( |
bool | b | ) |
|
|
slot |
◆ showPopup()
| void KisShadeSelectorLineComboBox::showPopup |
( |
| ) |
|
|
override |
Definition at line 60 of file kis_shade_selector_line_combo_box.cpp.
61{
62 QComboBox::showPopup();
64
65 const int widgetMargin = 20;
66 QScreen *screen = qApp->screenAt(QCursor::pos());
67 QRect fitRect;
68 if (screen) {
69 fitRect =
kisGrowRect(screen->availableGeometry(), -widgetMargin);
70 }
71 else {
72 fitRect =
kisGrowRect(QRect(0, 0, 1024, 768), -widgetMargin);
73 }
74 QRect popupRect =
m_popup->rect();
75 popupRect.moveTo(mapToGlobal(QPoint()));
77
78 m_popup->move(popupRect.topLeft());
80}
T kisGrowRect(const T &rect, U offset)
QRect kisEnsureInRect(QRect rc, const QRect &bounds)
References kisEnsureInRect(), kisGrowRect(), m_currentLine, m_popup, KisShadeSelectorLineComboBoxPopup::setConfiguration(), and KisShadeSelectorLine::toString().
◆ updateSettings
| void KisShadeSelectorLineComboBox::updateSettings |
( |
| ) |
|
|
slot |
◆ m_currentLine
◆ m_parentProxy
◆ m_popup
The documentation for this class was generated from the following files: