KDELibs4Support
kcolordialog.cpp
141 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
577 // We must replace the untranslated file names by translate names (of course only for KDE's standard palettes)
669 file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString::fromLatin1(path[i]));
745 QString finalMsg = i18ncp("%1 is the number of paths, %2 is the list of paths (with newlines between them)",
865 KColorTable::KColorTablePrivate::slotColorCellDoubleClicked(int index, const QColor & /*color*/)
903 KColorCollection *recentPal = new KColorCollection(colorCollectionName[ recentColorIndex ].m_fileName);
1083 d->hedit->setSuffix(i18nc("The angular degree unit (for hue)", "\302\260")); // U+00B0 DEGREE SIGN
1155 QRect labelRect = modeButton->style()->subElementRect(QStyle::SE_RadioButtonContents, &option, modeButton);
1156 int indent = layoutDirection() == Qt::LeftToRight ? labelRect.left() : modeButton->geometry().right() - labelRect.right();
1442 group.writeEntry("CurrentPalette", collectionName); //Make sure the untranslated name is saved, assuming there is one
1628 void KColorDialog::KColorDialogPrivate::slotColorSelected(const QColor &color, const QString &name)
void setDefaultColor(const QColor &defaultCol)
Call this to make the dialog show a "Default Color" checkbox.
Definition: kcolordialog.cpp:1317
Antialiasing
void append(const T &value)
QPoint pos() const const
AlignLeft
virtual bool eventFilter(QObject *o, QEvent *e) override
virtual void setData(int role, const QVariant &value)
virtual QSize sizeHint() const const override
void setPen(const QColor &color)
virtual void mouseReleaseEvent(QMouseEvent *event) override
BackgroundRole
DragEnter
QDesktopWidget * desktop()
QWidget(QWidget *parent, Qt::WindowFlags f)
SE_RadioButtonContents
QTextStream & endl(QTextStream &stream)
ReadOnly
pos
virtual bool event(QEvent *e) override
Window
void resizeSection(int logicalIndex, int size)
void drawEllipse(const QRectF &rectangle)
Sunken
int right() const const
int removeAll(const T &value)
singleShot
T value() const const
QLayout * layout() const const
KGUIADDONS_EXPORT qreal hue(const QColor &)
void releaseMouse()
void setItemDelegate(QAbstractItemDelegate *delegate)
void update()
void setColor(const QColor &col)
Set the color to display and update the display.
Definition: kcolordialog.cpp:504
QRgb rgb() const const
QIcon fromTheme(const QString &name)
void setDragEnabled(bool enable)
rowCount
void setSelectionMode(QAbstractItemView::SelectionMode mode)
QByteArray trimmed() const const
void setFrameStyle(int style)
void initFrom(const QWidget *widget)
@ Ok
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted)
Definition: kdialog.h:140
ScrollBarAlwaysOff
void setColor(int index, const QColor &col)
Sets the color in the given index in the table.
Definition: kcolordialog.cpp:263
int x() const const
int y() const const
const QMimeData * mimeData() const const
virtual bool event(QEvent *e) override
int column(const QTableWidgetItem *item) const const
KIOFILEWIDGETS_EXPORT QStringList list(const QString &fileClass)
void setFrameShape(QFrame::Shape)
void setHsv(int h, int s, int v, int a)
QColor fromRgbF(qreal r, qreal g, qreal b, qreal a)
LeftButton
QString locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
QPushButton * button(ButtonCode id) const
Returns the button that corresponds to the id.
Definition: kdialog.cpp:702
modal
void setMinimumSize(const QSize &)
virtual void mousePressEvent(QMouseEvent *event) override
void addItem(QLayoutItem *item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment)
void fillRect(const QRectF &rectangle, const QBrush &brush)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
State_Selected
int findColor(const QColor &color) const
int left() const const
void getRgb(int *r, int *g, int *b, int *a) const const
QString i18ncp(const char *context, const char *singular, const char *plural, const TYPE &arg...)
void hide()
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
int saturation() const const
void error(QWidget *parent, const QString &text, const QString &title=QString(), Options options=Notify)
#define I18N_NOOP2(context, text)
QTestData & newRow(const char *dataTag)
QVariant data(int role) const const
void setColumnCount(int columns)
void setColumnStretch(int column, int stretch)
RightArrow
QString & sprintf(const char *cformat,...)
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy)
QString i18n(const char *text, const TYPE &arg...)
KGUIADDONS_EXPORT qreal contrastRatio(const QColor &, const QColor &)
QStyle * style() const const
QRgb pixel(int x, int y) const const
int height() const const
KGUIADDONS_EXPORT QColor fromMimeData(const QMimeData *mimeData)
QTableWidgetItem * itemAt(const QPoint &point) const const
void setTabOrder(QWidget *first, QWidget *second)
void addLayout(QLayout *layout, int row, int column, Qt::Alignment alignment)
void setItem(int row, int column, QTableWidgetItem *item)
void colorDoubleClicked(int index, const QColor &color)
Emitted when a color in the table is double-clicked.
QByteArray mid(int pos, int len) const const
Horizontal
bool isEmpty() const const
Qt::MouseButtons buttons() const const
CrossCursor
static int getColor(QColor &theColor, QWidget *parent=nullptr)
Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed.
Definition: kcolordialog.cpp:1466
QColor color(int index) const
Returns the color at a given index in the table.
Definition: kcolordialog.cpp:215
void setAlpha(int alpha)
int alpha() const const
int x() const const
int y() const const
void setBackgroundRole(QPalette::ColorRole role)
virtual QSize sizeHint() const const override
int value() const const
SingleSelection
virtual int exec()
void setAcceptDrops(bool on)
Accepted
void setMaximumSize(const QSize &)
void releaseKeyboard()
Key_Escape
int result() const const
QImage toImage() const const
void setFixedWidth(int w)
void setBrush(const QBrush &brush)
QColor darker(int factor) const const
bool save()
virtual void mouseReleaseEvent(QMouseEvent *event)
void setIcon(const QIcon &icon)
void setFixedSize(const QSize &s)
NoFrame
QPixmap grabWindow(WId window, int x, int y, int width, int height)
int row(const QTableWidgetItem *item) const const
void setSelected(bool select)
height
GenericDataLocation
void colorSelected(int index, const QColor &color)
Emitted when a color is selected in the table.
QHeaderView * verticalHeader() const const
int key() const const
QString path(const QString &relativePath)
virtual void paintEvent(QPaintEvent *) override
QString fromLatin1(const char *str, int size)
startDragDistance
int count() const
Returns the total number of color cells in the table.
Definition: kcolordialog.cpp:226
QEvent::Type type() const const
void setRgb(int r, int g, int b, int a)
void setObjectName(const QString &name)
void addWidget(QWidget *w)
static int spacingHint()
Returns the number of pixels that should be used between widgets inside a dialog according to the KDE...
Definition: kdialog.cpp:464
QColor toRgb() const const
virtual QRect subElementRect(QStyle::SubElement element, const QStyleOption *option, const QWidget *widget) const const=0
QPoint globalPos() const const
sizeHint
const char * name(StandardAction id)
void drawLine(const QLineF &line)
void setRowCount(int rows)
KGUIADDONS_EXPORT QDrag * createDrag(const QColor &color, QObject *dragsource)
LeftToRight
void setContentsMargins(int left, int top, int right, int bottom)
QHeaderView * horizontalHeader() const const
void setSpacing(int)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void restore()
bool isValid() const const
virtual void setCaption(const QString &caption)
Make a KDE compliant caption.
Definition: kdialog.cpp:502
void addWidget(QWidget *widget, int row, int column, Qt::Alignment alignment)
WId winId() const const
static QColor grabColor(const QPoint &p)
Gets the color from the pixel at point p on the screen.
Definition: kcolordialog.cpp:1750
@ Cancel
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected)
Definition: kdialog.h:143
geometry
QTableWidgetItem * item(int row, int column) const const
virtual QVariant data(int role) const const
void save()
void addLayout(QLayout *layout, int stretch)
bool activate()
static QStringList installedCollections()
void setSelected(int index)
Sets the currently selected cell to index.
Definition: kcolordialog.cpp:251
KColorDialog(QWidget *parent=nullptr, bool modal=false)
Constructs a color selection dialog.
Definition: kcolordialog.cpp:994
int hue() const const
void addSpacing(int size)
KGUIADDONS_EXPORT QColor shade(const QColor &, qreal lumaAmount, qreal chromaAmount=0.0)
void setButtons(ButtonCodes buttonMask)
Creates (or recreates) the button box and all the buttons in it.
Definition: kdialog.cpp:216
void getHsv(int *h, int *s, int *v, int *a) const const
QColor lighter(int factor) const const
int selectedIndex() const
Returns the index of the cell which is currently selected.
Definition: kcolordialog.cpp:258
void setRenderHint(QPainter::RenderHint hint, bool on)
width
void setLayout(QLayout *layout)
KGUIADDONS_EXPORT bool canDecode(const QMimeData *mimeData)
SolidLine
virtual void mouseMoveEvent(QMouseEvent *event)
layoutDirection
int addColor(const QColor &newColor, const QString &newColorName=QString())
QWidget * viewport() const const
columnCount
void setAlphaChannelEnabled(bool alpha)
When set to true, the user is allowed to change the alpha component of the color.
Definition: kcolordialog.cpp:1350
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy)
Qt::DropAction start(Qt::DropActions request)
QObject * parent() const const
void setText(const QString &text)
red
KColorCells(QWidget *parent, int rows, int columns)
Constructs a new table of color cells, consisting of rows * columns colors.
Definition: kcolordialog.cpp:182
void clearSelection()
void colorChanged(const QColor &)
This signal is emitted whenever the current color changes due to a drop event.
QRect contentsRect() const const
void accept()
QWIDGETSIZE_MAXQWIDGETSIZE_MAX
void sort(Qt::CaseSensitivity cs)
virtual void mouseMoveEvent(QMouseEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 03:59:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 03:59:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.