40class LIBDTKWIDGETSHARED_EXPORT
DCrumbEdit :
public QTextEdit,
public DCORE_NAMESPACE::DObject
44 Q_PROPERTY(
bool crumbReadOnly READ crumbReadOnly WRITE setCrumbReadOnly)
45 Q_PROPERTY(
int crumbRadius READ crumbRadius WRITE setCrumbRadius)
46 Q_PROPERTY(QString splitter READ splitter WRITE setSplitter)
47 Q_PROPERTY(
bool dualClickMakeCrumb READ dualClickMakeCrumb WRITE setDualClickMakeCrumb)
53 darkGray = Qt::darkGray,
55 lightGray = Qt::lightGray,
60 magenta = Qt::magenta,
62 darkRed = Qt::darkRed,
63 darkGreen = Qt::darkGreen,
64 darkBlue = Qt::darkBlue,
65 darkCyan = Qt::darkCyan,
66 darkMagenta = Qt::darkMagenta,
67 darkYellow = Qt::darkYellow
73 bool insertCrumb(
const QString &text,
int pos = -1);
75 bool appendCrumb(
const QString &text);
77 bool containCrumb(
const QString &text)
const;
78 QStringList crumbList()
const;
84 bool dualClickMakeCrumb()
const Q_DECL_NOEXCEPT;
85 bool crumbReadOnly()
const;
86 int crumbRadius()
const;
87 QString splitter()
const;
90 void crumbAdded(
const QString &text);
91 void crumbRemoved(
const QString &text);
92 void crumbListChanged();
95 void setCrumbReadOnly(
bool crumbReadOnly);
96 void setCrumbRadius(
int crumbRadius);
97 void setSplitter(
const QString &splitter);
99 void setDualClickMakeCrumb(
bool flag) Q_DECL_NOEXCEPT;
102 bool event(QEvent *e)
override;
103 void paintEvent(QPaintEvent *event)
override;
104 void keyPressEvent(QKeyEvent *event)
override;
105 void mouseDoubleClickEvent(QMouseEvent *event)
override;
106 void focusOutEvent(QFocusEvent *event)
override;
108 QMimeData *createMimeDataFromSelection()
const override;
109 bool canInsertFromMimeData(
const QMimeData *source)
const override;
110 void insertFromMimeData(
const QMimeData *source)
override;
113 using QTextEdit::setDocument;
114 using QTextEdit::document;
115 using QTextEdit::setText;
116 using QTextEdit::setHtml;
117 using QTextEdit::setPlaceholderText;
118 using QTextEdit::insertPlainText;
119 using QTextEdit::insertHtml;
120 using QTextEdit::append;
123 Q_PRIVATE_SLOT(d_func(),
void _q_onDocumentLayoutChanged())
124 Q_PRIVATE_SLOT(d_func(),
void _q_onCurrentPositionChanged())
125 Q_PRIVATE_SLOT(d_func(),
void _q_onTextChanged())