27 #include <QPushButton>
28 #include <QHBoxLayout>
29 #include <QVBoxLayout>
33 : QDialog( parent, name, modal, fl ),unsavedDocs()
36 setWindowTitle( tr(
"Save the modified files" ) );
52 setSizeGripEnabled( FALSE );
55 label =
new QLabel( tr(
"Select files to be saved" ) );
58 QGroupBox *group =
new QGroupBox( tr(
"Modified Files" ) );
59 QVBoxLayout *checkBoxLayout =
new QVBoxLayout();
60 group->setLayout(checkBoxLayout);
70 spacer =
new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
81 resize( QSize(500, 300).expandedTo(minimumSizeHint()) );
83 setAttribute(Qt::WA_WState_Polished,
false);
94 QListWidgetItem *item =
new QListWidgetItem(text,
fileView);
95 item->setFlags( item->flags() | Qt::ItemIsUserCheckable );
96 item->setCheckState(Qt::Checked);
108 QList<QucsDoc*> unsavable;
109 QMap<QucsDoc*,QListWidgetItem*>::iterator it(
unsavedDocs.begin());
112 if ( it.value()->checkState() == Qt::Checked )
116 unsavable.append(doc);
121 if(unsavable.isEmpty())
QBoxLayout * SaveDialogLayout
void saveSelectedClicked()
QPushButton * dontSaveButton
SaveDialog(QWidget *p=0, const char *n=0, bool modal=true, Qt::WFlags fl=0)
QPushButton * abortClosingButton
bool saveFile(QucsDoc *Doc=0)
QPushButton * saveSelectedButton
QMap< QucsDoc *, QListWidgetItem * > unsavedDocs
void addUnsavedDoc(QucsDoc *doc)
QHBoxLayout * buttonsLayout