|
|
@ -513,6 +513,8 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent |
|
|
|
, mpLabel(NULL) |
|
|
|
, mpLabel(NULL) |
|
|
|
, mpLineEdit(NULL) |
|
|
|
, mpLineEdit(NULL) |
|
|
|
, mpButtons(NULL) |
|
|
|
, mpButtons(NULL) |
|
|
|
|
|
|
|
, mpAddButton(NULL) |
|
|
|
|
|
|
|
, mpCancelButton(NULL) |
|
|
|
, mpLayout(NULL) |
|
|
|
, mpLayout(NULL) |
|
|
|
, mpHLayout(NULL) |
|
|
|
, mpHLayout(NULL) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -521,18 +523,26 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent |
|
|
|
|
|
|
|
|
|
|
|
mpLabel = new QLabel(tr("New Folder name:"),this); |
|
|
|
mpLabel = new QLabel(tr("New Folder name:"),this); |
|
|
|
mpLineEdit = new QLineEdit(this); |
|
|
|
mpLineEdit = new QLineEdit(this); |
|
|
|
mpButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); |
|
|
|
mpAddButton = new QPushButton(tr("Add")); |
|
|
|
|
|
|
|
mpAddButton->setDefault(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mpCancelButton = new QPushButton(tr("Cancel")); |
|
|
|
|
|
|
|
mpCancelButton->setAutoDefault(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mpButtons = new QDialogButtonBox(Qt::Horizontal, this); |
|
|
|
mpLayout = new QVBoxLayout(this); |
|
|
|
mpLayout = new QVBoxLayout(this); |
|
|
|
mpHLayout = new QHBoxLayout(this); |
|
|
|
mpHLayout = new QHBoxLayout(this); |
|
|
|
|
|
|
|
|
|
|
|
setLayout(mpLayout); |
|
|
|
setLayout(mpLayout); |
|
|
|
mpLayout->addLayout(mpHLayout, 0); |
|
|
|
mpLayout->addLayout(mpHLayout, 0); |
|
|
|
mpHLayout->addWidget(mpLabel, 0); |
|
|
|
mpHLayout->addWidget(mpLabel, 0); |
|
|
|
mpHLayout->addWidget(mpLineEdit, 1); |
|
|
|
mpHLayout->addWidget(mpLineEdit, 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mpButtons->addButton(mpAddButton,QDialogButtonBox::ActionRole); |
|
|
|
|
|
|
|
mpButtons->addButton(mpCancelButton,QDialogButtonBox::ActionRole); |
|
|
|
mpLayout->addWidget(mpButtons); |
|
|
|
mpLayout->addWidget(mpButtons); |
|
|
|
|
|
|
|
|
|
|
|
connect(mpButtons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(accept())); |
|
|
|
connect(mpAddButton, SIGNAL(clicked()), this, SLOT(accept())); |
|
|
|
connect(mpButtons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(reject())); |
|
|
|
connect(mpCancelButton, SIGNAL(clicked()), this, SLOT(reject())); |
|
|
|
connect(mpLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(text_Changed(const QString &))); |
|
|
|
connect(mpLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(text_Changed(const QString &))); |
|
|
|
connect(mpLineEdit, SIGNAL(textEdited(const QString &)), this, SLOT(text_Edited(const QString &))); |
|
|
|
connect(mpLineEdit, SIGNAL(textEdited(const QString &)), this, SLOT(text_Edited(const QString &))); |
|
|
|
|
|
|
|
|
|
|
@ -545,6 +555,17 @@ UBNewFolderDlg::UBNewFolderDlg(QWidget *parent, const char *name):QDialog(parent |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
UBNewFolderDlg::~UBNewFolderDlg() |
|
|
|
UBNewFolderDlg::~UBNewFolderDlg() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
if(NULL != mpAddButton) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpAddButton; |
|
|
|
|
|
|
|
mpAddButton = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(NULL != mpCancelButton) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
delete mpCancelButton; |
|
|
|
|
|
|
|
mpCancelButton = NULL; |
|
|
|
|
|
|
|
} |
|
|
|
if(NULL != mpButtons) |
|
|
|
if(NULL != mpButtons) |
|
|
|
{ |
|
|
|
{ |
|
|
|
delete mpButtons; |
|
|
|
delete mpButtons; |
|
|
|