kdk::KInputDialog(3)

📦 version 3.0.1.2, in arch rolling, ubuntu resolute, ubuntu stonking

✨ kdk::KInputDialog(3) ✨

okay bestie, sit down, hydrate, and let me tell you about this little icon 💖 this page lives in the Library Functions Manual, and the star of the show is kdk::KInputDialog — an input dialog whose interface is literally identical to QInputDialog. no remixing, no plot twist, same everything. periodt. 💅


🌸 NAME 🌸

kdk::KInputDialog — it's the input dialog, bestie 🎀 and its interface is exactly the same as QInputDialog. that's the whole vibe.


🦋 SYNOPSIS 🦋

#include <kinputdialog.h>

Inherits kdk::KDialog.

so yeah, it's a kdk::KDialog at heart — everything the parent can do, it can do too. 🫶

👑 Public Types

  • enum InputDialogOption { NoButtons = 0x00000001, UseListViewForComboBoxItems = 0x00000002, UsePlainTextEditForTextInput = 0x00000004 } — the little behavior switches you can flip on this thing, and yes those hex values are exact, don't touch them 💅
  • enum InputMode { TextInput, IntInput, DoubleInput } — the three flavors of input this dialog can be in. text, int, or double. pick your fighter. ⭐

📣 Signals

these are the little "hey, something happened!!" notifications it sends out 📢

  • void textValueChanged (const QString &text)
  • void textValueSelected (const QString &text)
  • void intValueChanged (int value)
  • void intValueSelected (int value)
  • void doubleValueChanged (double value)
  • void doubleValueSelected (double value)

changed = it's moving, selected = it's committed. iykyk. 💖

🧚 Public Member Functions

  • KInputDialog (QWidget *parent=nullptr) — constructor, duh. give it a parent or let it be free and parentless (nullptr) 🦋
  • void setInputMode (InputMode mode) — sets the input mode ✨
  • InputMode inputMode () const — hands you back the current input mode
  • void setLabelText (const QString &text) — sets the prompt / label text so the user knows what you're asking for 💬
  • QString labelText () const — gives you the label text back
  • void setOption (InputDialogOption option, bool on=true) — flips an InputDialogOption on (or off if you pass false)
  • bool testOption (InputDialogOption option) const — tells you whether that option is currently set. true/false moment. 💀
  • void setOptions (InputDialogOptions options) — sets the whole batch of options at once
  • InputDialogOptions options () const — returns the whole batch of options
  • void setTextValue (const QString &text) — sets the text value
  • QString textValue () const — gets the current text value
  • void setTextEchoMode (QLineEdit::EchoMode mode) — sets the echo mode used for storing the text value, i.e. QLineEdit::EchoMode 🙈 (yes, password-hiding mode is one of them, go off)
  • QLineEdit::EchoMode textEchoMode () const — returns the echo mode used for storing the text value
  • void setComboBoxEditable (bool editable) — sets whether the combo box used in the input dialog is editable ✏️
  • bool isComboBoxEditable () const — tells you whether that combo box is editable
  • void setComboBoxItems (const QStringList &items) — sets the items used in the input dialog's combo box 🎀
  • QStringList comboBoxItems () const — returns the items used in the input dialog's combo box
  • void setIntValue (int value) — sets the int-type value
  • int intValue () const — gets the int-type value
  • void setIntMinimum (int min) — sets the int-type minimum value
  • int intMinimum () const — gets the int-type minimum value
  • void setIntMaximum (int max) — sets the int-type maximum value
  • int intMaximum () const — gets the int-type maximum value
  • void setIntRange (int min, int max) — sets the int-type value range, min and max in one go, efficiency queen 👑
  • void setIntStep (int step) — sets the step size
  • int intStep () const — gets the int-type step size
  • void setDoubleValue (double value) — sets the double-type value
  • double doubleValue () const — gets the double-type value
  • void setDoubleMinimum (double min) — sets the double-type minimum value
  • double doubleMinimum () const — gets the double-type minimum value
  • void setDoubleMaximum (double max) — sets the double-type maximum value
  • double doubleMaximum () const — gets the double-type maximum value
  • void setDoubleRange (double min, double max) — sets the double-type value range 🌈
  • void setDoubleDecimals (int decimals) — sets the precision of the double spin box, measured in decimal places 🔢
  • int doubleDecimals () const — gets the precision of the double spin box
  • void setOkButtonText (const QString &text) — sets the text on the OK button ✅
  • QString okButtonText () const — gets the text on the OK button
  • void setCancelButtonText (const QString &text) — sets the text on the cancel button
  • QString cancelButtonText () const — gets the text on the cancel button
  • void open (QObject *receiver, const char *member) — shows the dialog as a window-modal dialog and returns immediately. yes bestie, immediately — it does not block, it does not wait for you, it's booked and busy 💅
  • QSize minimumSizeHint () const override — gets the widget's recommended minimum size
  • QSize sizeHint () const override — gets the widget's recommended size 📐
  • void setVisible (bool visible) override — sets whether the widget is visible 👀
  • QString placeholderText () const — gets the placeholder text
  • void setPlaceholderText (const QString &) — sets the placeholder text 💭
  • void setDoubleStep (double step) — sets the step size for the double type. (the source spells it doubel and honestly? we respect the typo, it's iconic 💀)
  • double doubleStep () const — gets the step size for the double type
  • void done (int result) override — done. closes the dialog and reports result. that's it, that's the function. 🫡

🌈 Public Member Functions inherited from kdk::KDialog

  • KDialog (QWidget *parent=nullptr) — the parent constructor, with an optional parent
  • void setWindowIcon (const QIcon &icon) — sets the dialog icon 🖼️
  • void setWindowIcon (const QString &iconName) — also sets the dialog icon, but by name this time
  • void setWindowTitle (const QString &) — sets the dialog's title
  • QPushButton * maximumButton () — gets the maximize button
  • QPushButton * minimumButton () — gets the minimize button
  • QPushButton * closeButton () — gets the close button
  • KMenuButton * menuButton () — gets the dropdown menu button
  • QWidget * mainWidget () — gets the main content area widget
  • KWindowButtonBar * windowButtonBar () — windowButtonBar
  • KIconBar * iconBar () — iconBar

⭐ Static Public Member Functions

these are the drive-thru versions — call them without making an object first, and they'll pop the dialog for you 🍓

  • static QString getText (QWidget *parent, const QString &label, QLineEdit::EchoMode echo=QLineEdit::Normal, const QString &text=QString(), bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints=Qt::ImhNone) — static convenience function that grabs a single line of string input from the user ✍️
  • static QString getMultiLineText (QWidget *parent, const QString &label, const QString &text=QString(), bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints=Qt::ImhNone) — static convenience function that grabs multiple lines of string input from the user 📝
  • static QString getItem (QWidget *parent, const QString &label, const QStringList &items, int current=0, bool editable=true, bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints=Qt::ImhNone) — static convenience function that lets the user pick one item out of a list of strings 🎯
  • static int getInt (QWidget *parent, const QString &label, int value=0, int minValue=-2147483647, int maxValue=2147483647, int step=1, bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags()) — static convenience function that grabs an integer from the user 🔢 (look at those defaults, -2147483647 to 2147483647, generous queen)
  • static double getDouble (QWidget *parent, const QString &label, double value=0, double minValue=-2147483647, double maxValue=2147483647, int decimals=1, bool *ok=nullptr, Qt::WindowFlags flags=Qt::WindowFlags()) — static convenience function that grabs a floating point number from the user 🌊

🫶 Protected Member Functions

  • void changeTheme () — changes the theme 🎨

💜 Protected Member Functions inherited from kdk::KDialog

  • bool eventFilter (QObject *target, QEvent *event) override
  • void changeTheme ()
  • void changeIconStyle ()
  • QBoxLayout * mainLayout ()

🌟 DETAILED DESCRIPTION 🌟

it's the input dialog 💖 and its interface is the same as QInputDialog. that's it, that's the description, and it ate. 👑

⏳ Since ⏳

1.0.0 — been here since the beginning, a true veteran 🎀

✍️ Author ✍️

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. not a human author, just doxygen doing its little robot thing 🤖✨


and that's the whole page bestie!! thanks for reading all the way to the bottom, you're the real main character 💅 the source is LIBKYSDK-APPLICATIONS, it's Version version:3.0, and that's the kdk::KInputDialog(3) page — go forth and pop some dialogs, ily 🫶🌈💖

📦 where this page comes from