|
|
@ -41,6 +41,8 @@ FileDialog::FileDialog(QWidget *parent) :
|
|
|
|
QCheckBox checkBox;
|
|
|
|
QCheckBox checkBox;
|
|
|
|
unsigned int height = checkBox.sizeHint().height() + 4;
|
|
|
|
unsigned int height = checkBox.sizeHint().height() + 4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
masterView->setModel(mMastersProxyModel);
|
|
|
|
|
|
|
|
|
|
|
|
mastersTable->setModel(mMastersProxyModel);
|
|
|
|
mastersTable->setModel(mMastersProxyModel);
|
|
|
|
mastersTable->setObjectName("MastersTable");
|
|
|
|
mastersTable->setObjectName("MastersTable");
|
|
|
|
mastersTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
|
|
|
mastersTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
|
|
@ -83,12 +85,12 @@ FileDialog::FileDialog(QWidget *parent) :
|
|
|
|
mNameLabel = new QLabel(tr("File Name:"), this);
|
|
|
|
mNameLabel = new QLabel(tr("File Name:"), this);
|
|
|
|
|
|
|
|
|
|
|
|
QRegExpValidator *validator = new QRegExpValidator(QRegExp("^[a-zA-Z0-9\\s]*$"));
|
|
|
|
QRegExpValidator *validator = new QRegExpValidator(QRegExp("^[a-zA-Z0-9\\s]*$"));
|
|
|
|
mNameLineEdit = new LineEdit(this);
|
|
|
|
//mNameLineEdit = new LineEdit(this);
|
|
|
|
mNameLineEdit->setValidator(validator);
|
|
|
|
//mNameLineEdit->setValidator(validator);
|
|
|
|
|
|
|
|
|
|
|
|
nameLayout->addSpacerItem(spacer);
|
|
|
|
nameLayout->addSpacerItem(spacer);
|
|
|
|
nameLayout->addWidget(mNameLabel);
|
|
|
|
nameLayout->addWidget(mNameLabel);
|
|
|
|
nameLayout->addWidget(mNameLineEdit);
|
|
|
|
//nameLayout->addWidget(mNameLineEdit);
|
|
|
|
|
|
|
|
|
|
|
|
mButtonBox = new QDialogButtonBox(this);
|
|
|
|
mButtonBox = new QDialogButtonBox(this);
|
|
|
|
|
|
|
|
|
|
|
@ -109,9 +111,9 @@ FileDialog::FileDialog(QWidget *parent) :
|
|
|
|
|
|
|
|
|
|
|
|
connect(mDataFilesModel, SIGNAL(layoutChanged()), this, SLOT(updateViews()));
|
|
|
|
connect(mDataFilesModel, SIGNAL(layoutChanged()), this, SLOT(updateViews()));
|
|
|
|
connect(mDataFilesModel, SIGNAL(checkedItemsChanged(QStringList)), this, SLOT(updateOpenButton(QStringList)));
|
|
|
|
connect(mDataFilesModel, SIGNAL(checkedItemsChanged(QStringList)), this, SLOT(updateOpenButton(QStringList)));
|
|
|
|
connect(mNameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(updateCreateButton(QString)));
|
|
|
|
//connect(mNameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(updateCreateButton(QString)));
|
|
|
|
|
|
|
|
|
|
|
|
connect(filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
|
|
|
//connect(filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
|
|
|
|
|
|
|
|
|
|
|
connect(pluginsTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckState(QModelIndex)));
|
|
|
|
connect(pluginsTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckState(QModelIndex)));
|
|
|
|
connect(mastersTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckState(QModelIndex)));
|
|
|
|
connect(mastersTable, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(setCheckState(QModelIndex)));
|
|
|
@ -223,7 +225,7 @@ QStringList FileDialog::checkedItemsPaths()
|
|
|
|
|
|
|
|
|
|
|
|
QString FileDialog::fileName()
|
|
|
|
QString FileDialog::fileName()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return mNameLineEdit->text();
|
|
|
|
//return mNameLineEdit->text();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FileDialog::openFile()
|
|
|
|
void FileDialog::openFile()
|
|
|
@ -231,7 +233,7 @@ void FileDialog::openFile()
|
|
|
|
setWindowTitle(tr("Open"));
|
|
|
|
setWindowTitle(tr("Open"));
|
|
|
|
|
|
|
|
|
|
|
|
mNameLabel->hide();
|
|
|
|
mNameLabel->hide();
|
|
|
|
mNameLineEdit->hide();
|
|
|
|
//mNameLineEdit->hide();
|
|
|
|
mCreateButton->hide();
|
|
|
|
mCreateButton->hide();
|
|
|
|
|
|
|
|
|
|
|
|
mButtonBox->removeButton(mCreateButton);
|
|
|
|
mButtonBox->removeButton(mCreateButton);
|
|
|
@ -249,8 +251,8 @@ void FileDialog::newFile()
|
|
|
|
setWindowTitle(tr("New"));
|
|
|
|
setWindowTitle(tr("New"));
|
|
|
|
|
|
|
|
|
|
|
|
mNameLabel->show();
|
|
|
|
mNameLabel->show();
|
|
|
|
mNameLineEdit->clear();
|
|
|
|
//mNameLineEdit->clear();
|
|
|
|
mNameLineEdit->show();
|
|
|
|
//mNameLineEdit->show();
|
|
|
|
mCreateButton->show();
|
|
|
|
mCreateButton->show();
|
|
|
|
|
|
|
|
|
|
|
|
mButtonBox->setStandardButtons(QDialogButtonBox::Cancel);
|
|
|
|
mButtonBox->setStandardButtons(QDialogButtonBox::Cancel);
|
|
|
|