|
|
|
@ -25,28 +25,32 @@ |
|
|
|
|
CEditGroupDialog::CEditGroupDialog(IDatabase* database,IGroupHandle* Handle,QWidget* parent, Qt::WFlags fl) |
|
|
|
|
: QDialog(parent,fl) |
|
|
|
|
{ |
|
|
|
|
setupUi(this); |
|
|
|
|
db = database; |
|
|
|
|
handle = Handle; |
|
|
|
|
group = new CGroup(); |
|
|
|
|
group->Title = handle->title(); |
|
|
|
|
group->Image = handle->image(); |
|
|
|
|
connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) ); |
|
|
|
|
connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) ); |
|
|
|
|
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() )); |
|
|
|
|
adjustSize(); |
|
|
|
|
setMaximumSize(size()); |
|
|
|
|
setMinimumSize(size()); |
|
|
|
|
|
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* parent, Qt::WFlags fl) |
|
|
|
|
: QDialog(parent,fl) |
|
|
|
|
{ |
|
|
|
|
setupUi(this); |
|
|
|
|
db = database; |
|
|
|
|
group=Group; |
|
|
|
|
handle = NULL; |
|
|
|
|
group = Group; |
|
|
|
|
|
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CEditGroupDialog::~CEditGroupDialog(){ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CEditGroupDialog::init() { |
|
|
|
|
setupUi(this); |
|
|
|
|
|
|
|
|
|
connect( ButtonBox, SIGNAL( accepted() ), this, SLOT( OnOK() ) ); |
|
|
|
|
connect( ButtonBox, SIGNAL( rejected() ), this, SLOT( OnCancel() ) ); |
|
|
|
|
connect( Button_Icon, SIGNAL( clicked() ), this, SLOT( OnIconDlg() )); |
|
|
|
@ -57,11 +61,13 @@ CEditGroupDialog::CEditGroupDialog(IDatabase* database,CGroup* Group,QWidget* pa |
|
|
|
|
ComboIconPicker->insertItem(i,db->icon(i),""); |
|
|
|
|
} |
|
|
|
|
ComboIconPicker->setCurrentIndex(group->Image); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
CEditGroupDialog::~CEditGroupDialog(){ |
|
|
|
|
adjustSize(); |
|
|
|
|
setMaximumSize(size()); |
|
|
|
|
setMinimumSize(size()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CEditGroupDialog::OnOK() |
|
|
|
|
{ |
|
|
|
|
int r=1; |
|
|
|
|