Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/dialogs/newprojdialog.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           newprojdialog.cpp  -  description
00003                              -------------------
00004     begin                : Sun Aug 24 2003
00005     copyright            : (C) 2003 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "newprojdialog.h"
00019 
00020 #include <QLabel>
00021 #include <QLineEdit>
00022 #include <QCheckBox>
00023 #include <QPushButton>
00024 #include <QGridLayout>
00025 
00026 
00027 NewProjDialog::NewProjDialog(QWidget *parent, const char *name)
00028                              : QDialog(parent, name, true)
00029 {
00030   setWindowTitle(tr("Create new project"));
00031 
00032   gbox = new QGridLayout(this);
00033   QLabel *Label1 = new QLabel(tr("Project name:"));
00034   gbox->addWidget(Label1,0,0);
00035 
00036   ProjName = new QLineEdit(this);
00037   ProjName->setMinimumWidth(250);
00038   gbox->addMultiCellWidget(ProjName,0,0,1,2);
00039   OpenProj = new QCheckBox(tr("open new project"));
00040   OpenProj->setChecked(true);
00041   gbox->addMultiCellWidget(OpenProj,1,1,1,2);
00042 
00043   ButtonOk = new QPushButton(tr("Create"));
00044   gbox->addWidget(ButtonOk,2,1);
00045   ButtonCancel = new QPushButton(tr("Cancel"));
00046   gbox->addWidget(ButtonCancel,2,2);
00047 
00048   connect(ButtonOk, SIGNAL(clicked()), SLOT(accept()));
00049   connect(ButtonCancel, SIGNAL(clicked()), SLOT(reject()));
00050 
00051   ButtonOk->setDefault(true);
00052   setFocusProxy(ProjName);
00053 }
00054 
00055 NewProjDialog::~NewProjDialog()
00056 {
00057   delete gbox;
00058 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines