1#ifndef WIDGETS_BUTTONOVERLAY_H
2#define WIDGETS_BUTTONOVERLAY_H
8QT_FORWARD_DECLARE_CLASS(QAction)
9QT_FORWARD_DECLARE_CLASS(QWidget)
10QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
11QT_FORWARD_DECLARE_CLASS(QString)
12QT_FORWARD_DECLARE_CLASS(QPixmap)
13QT_FORWARD_DECLARE_CLASS(QMargins)
14QT_FORWARD_DECLARE_CLASS(QRect)
15QT_FORWARD_DECLARE_CLASS(QLineEdit)
22class ClearPlainTextEdit;
37 bool isUsingCustomLayout()
const;
38 QHBoxLayout *buttonLayout();
39 bool isClearButtonEnabled()
const;
40 void setClearButtonEnabled(
bool enabled);
41 bool isInfoButtonEnabled()
const;
42 void enableInfoButton(
const QPixmap &pixmap,
const QString &infoText);
43 void disableInfoButton();
44 void addCustomButton(QWidget *button);
45 void insertCustomButton(
int index, QWidget *button);
46 void removeCustomButton(QWidget *button);
47 void addCustomAction(QAction *action);
48 void insertCustomAction(
int index, QAction *action);
49 void removeCustomAction(QAction *action);
50 virtual bool isCleared()
const;
53 void updateClearButtonVisibility(
bool visible);
54 virtual void handleClearButtonClicked();
55 virtual void handleCustomLayoutCreated();
58 void fallbackToUsingCustomLayout();
59 QLineEdit *lineEditForWidget()
const;
61 void setContentsMarginsFromEditFieldRectAndFrameWidth(
const QRect &editFieldRect,
int frameWidth,
int padding = 0);
64 QWidget *m_buttonWidget;
65 QHBoxLayout *m_buttonLayout;
67 void *m_infoButtonOrAction;
A QComboBox with an embedded button for clearing its contents.
A QLineEdit with an embedded button for clearing its contents.
A QPlainTextEdit with an embedded button for clearing its contents.
A QSpinBox with an embedded button for clearing its contents and the ability to hide the minimum valu...
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.