cppcheck/gui/libraryaddfunctiondialog.cpp

32 lines
693 B
C++
Raw Normal View History

#include "libraryaddfunctiondialog.h"
#include "ui_libraryaddfunctiondialog.h"
#include <QRegExp>
#include <QValidator>
LibraryAddFunctionDialog::LibraryAddFunctionDialog(QWidget *parent) :
QDialog(parent),
2018-06-18 10:13:33 +02:00
mUi(new Ui::LibraryAddFunctionDialog)
{
2018-06-18 10:13:33 +02:00
mUi->setupUi(this);
QRegExp rx(NAMES);
QValidator *validator = new QRegExpValidator(rx, this);
2018-06-18 10:13:33 +02:00
mUi->functionName->setValidator(validator);
}
LibraryAddFunctionDialog::~LibraryAddFunctionDialog()
{
2018-06-18 10:13:33 +02:00
delete mUi;
}
QString LibraryAddFunctionDialog::functionName() const
{
2018-06-18 10:13:33 +02:00
return mUi->functionName->text();
}
int LibraryAddFunctionDialog::numberOfArguments() const
{
2018-06-18 10:13:33 +02:00
return mUi->numberOfArguments->value();
}