Dialog for entering one line. Listen for the sig_closed() signal for the Gui::Dialog class and request the text value afterwards if LineInputDialog::ReturnValue is set to LineInputDialog::ReturnValue::Ok.
More...
#include <LineInputDialog.h>
|
enum | ReturnValue {
Ok =0
,
Cancelled
} |
|
|
void | sigClosed () |
| emitted when closed
|
|
|
| LineInputDialog (const QString &title, const QString &infoText, const QString &inputText, QWidget *parent=nullptr) |
|
| LineInputDialog (const QString &title, const QString &infoText, QWidget *parent=nullptr) |
|
void | setHeaderText (const QString &text) |
|
void | setInfoText (const QString &text) |
|
void | setCompleterText (const QStringList &lst) |
|
ReturnValue | returnValue () const |
| returns if the dialog was closes by cancel or ok button More...
|
|
QString | text () const |
| Return the entered text. More...
|
|
void | setText (const QString &text) |
| Prefill the QLineEdit widget. More...
|
|
void | setPlaceholderText (const QString &text) |
|
void | showInfo (bool b, const QString &infoPrefix=QString()) |
|
bool | wasAccepted () const |
| Convenience method for return_value() method. More...
|
|
void | setInvalidChars (const QList< QChar > &chars) |
|
void | resizeRelative (QWidget *widget, double percent, const QSize &maxSize) |
|
bool | isAccepted () const |
|
|
static QString | getRenameFilename (QWidget *parent, const QString &oldName, const QString &parentPath=QString()) |
|
static QString | getNewFilename (QWidget *parent, const QString &info, const QString &parentPath=QString()) |
|
|
void | showEvent (QShowEvent *e) override |
|
void | closeEvent (QCloseEvent *e) override |
|
virtual void | paintEvent (QPaintEvent *e) override |
|
virtual void | languageChanged () |
|
virtual void | skinChanged () |
|
Dialog for entering one line. Listen for the sig_closed() signal for the Gui::Dialog class and request the text value afterwards if LineInputDialog::ReturnValue is set to LineInputDialog::ReturnValue::Ok.
◆ closeEvent()
void Gui::LineInputDialog::closeEvent |
( |
QCloseEvent * |
e | ) |
|
|
overrideprotectedvirtual |
◆ returnValue()
ReturnValue Gui::LineInputDialog::returnValue |
( |
| ) |
const |
returns if the dialog was closes by cancel or ok button
- Returns
- ReturnValue::Ok if ok button was pressed, ReturnValue::Cancelled else
◆ setText()
void Gui::LineInputDialog::setText |
( |
const QString & |
text | ) |
|
Prefill the QLineEdit widget.
- Parameters
-
◆ showEvent()
void Gui::LineInputDialog::showEvent |
( |
QShowEvent * |
e | ) |
|
|
overrideprotectedvirtual |
◆ text()
QString Gui::LineInputDialog::text |
( |
| ) |
const |
Return the entered text.
- Returns
- always returns the entered text no matter if Ok or Cancel was pressed
◆ wasAccepted()
bool Gui::LineInputDialog::wasAccepted |
( |
| ) |
const |
Convenience method for return_value() method.
- Returns