You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
#ifndef QTPMULTIINPUTDIALOG_H
|
|
#define QTPMULTIINPUTDIALOG_H
|
|
|
|
#include <QtWidgets/QDialog>
|
|
#include <QtWidgets/QLabel>
|
|
#include <QtWidgets/QLineEdit>
|
|
#include <QtWidgets/QPushButton>
|
|
#include <QtWidgets/QVBoxLayout>
|
|
#include <QtGui/QRegExpValidator>
|
|
|
|
class QTpMultiInputDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
QTpMultiInputDialog(int count, QWidget *parent = 0);
|
|
virtual ~QTpMultiInputDialog();
|
|
|
|
QString ShowDlg(int nIndex);
|
|
|
|
void SetLabelTexts(const QStringList &listText);
|
|
|
|
void SetOneLabelText(int nIndex, const QString &text);
|
|
void SetOneLineEditText(int nIndex, const QString &text);
|
|
QString GetOneLineEditText(int nIndex);
|
|
|
|
void SetOneLineEditReadOnly(int nIndex, bool bRead);
|
|
|
|
void SetLabelsWidth(int width);
|
|
void SetLineEditWidth(int width);
|
|
void SetLineEditRegExp(int nIndex, QRegExp regExp);
|
|
|
|
virtual void accept() { QDialog::accept(); }
|
|
virtual void reject() { QDialog::reject(); }
|
|
|
|
private:
|
|
const int m_GroupCount;
|
|
QVector<QLabel*> m_vecLabel;
|
|
QVector<QLineEdit*> m_vecLineEdit;
|
|
|
|
QPushButton *m_pOKButton;
|
|
QPushButton *m_pCancelButton;
|
|
};
|
|
|
|
#endif // QTPMULTIINPUTDIALOG_H
|