Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
newprojdialog.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  newprojdialog.cpp - description
3  -------------------
4  begin : Sun Aug 24 2003
5  copyright : (C) 2003 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "newprojdialog.h"
19 
20 #include <QLabel>
21 #include <QLineEdit>
22 #include <QCheckBox>
23 #include <QPushButton>
24 #include <QGridLayout>
25 
26 
27 NewProjDialog::NewProjDialog(QWidget *parent, const char *name)
28  : QDialog(parent, name, true)
29 {
30  setWindowTitle(tr("Create new project"));
31 
32  gbox = new QGridLayout(this);
33  QLabel *Label1 = new QLabel(tr("Project name:"));
34  gbox->addWidget(Label1,0,0);
35 
36  ProjName = new QLineEdit(this);
37  ProjName->setMinimumWidth(250);
38  gbox->addMultiCellWidget(ProjName,0,0,1,2);
39  OpenProj = new QCheckBox(tr("open new project"));
40  OpenProj->setChecked(true);
41  gbox->addMultiCellWidget(OpenProj,1,1,1,2);
42 
43  ButtonOk = new QPushButton(tr("Create"));
44  gbox->addWidget(ButtonOk,2,1);
45  ButtonCancel = new QPushButton(tr("Cancel"));
46  gbox->addWidget(ButtonCancel,2,2);
47 
48  connect(ButtonOk, SIGNAL(clicked()), SLOT(accept()));
49  connect(ButtonCancel, SIGNAL(clicked()), SLOT(reject()));
50 
51  ButtonOk->setDefault(true);
52  setFocusProxy(ProjName);
53 }
54 
56 {
57  delete gbox;
58 }
NewProjDialog(QWidget *parent=0, const char *name=0)
QCheckBox * OpenProj
Definition: newprojdialog.h:40
QPushButton * ButtonCancel
Definition: newprojdialog.h:43
QLineEdit * ProjName
Definition: newprojdialog.h:39
QPushButton * ButtonOk
Definition: newprojdialog.h:43
QGridLayout * gbox
Definition: newprojdialog.h:44