Cockatrice/cockatrice/src/client/get_text_with_max.h
Lukas Brübach 12b4d2e1c5 Sort *every* file into a doxygen group.
Took 7 hours 9 minutes

Took 18 seconds

Took 2 minutes
2025-09-30 12:02:12 +02:00

28 lines
977 B
C

/**
* @file get_text_with_max.h
* @ingroup UI
* @brief Custom QInputDialog::getText implementation that allows configuration of the max length
*/
#ifndef GETTEXTWITHMAX_H
#define GETTEXTWITHMAX_H
#include "trice_limits.h"
#include <QInputDialog>
QString getTextWithMax(QWidget *parent,
const QString &title,
const QString &label,
QLineEdit::EchoMode echo = QLineEdit::Normal,
const QString &text = QString(),
bool *ok = nullptr,
int max = MAX_NAME_LENGTH,
Qt::WindowFlags flags = Qt::WindowFlags(),
Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
static inline QString getTextWithMax(QWidget *parent, const QString &title, const QString &label, int max)
{
return getTextWithMax(parent, title, label, QLineEdit::Normal, QString(), nullptr, max);
}
#endif // GETTEXTWITHMAX_H