My Project  0.0.16
QUCS Mapping
 All Classes Namespaces 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 <qlayout.h>
21 #include <qlabel.h>
22 #include <qlineedit.h>
23 #include <qcheckbox.h>
24 #include <qpushbutton.h>
25 
26 
27 NewProjDialog::NewProjDialog(QWidget *parent, const char *name)
28  : QDialog(parent, name, true)
29 {
30  setCaption(tr("Create new project"));
31 
32  gbox = new QGridLayout(this,3,3,5,5);
33  QLabel *Label1 = new QLabel(tr("Project name:"),this);
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"),this);
40  OpenProj->setChecked(true);
41  gbox->addMultiCellWidget(OpenProj,1,1,1,2);
42 
43  ButtonOk = new QPushButton(tr("Create"),this);
44  gbox->addWidget(ButtonOk,2,1);
45  ButtonCancel = new QPushButton(tr("Cancel"),this);
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 }