QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsdialog.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdialog.cpp
3  -------------------
4  begin : July 2012
5  copyright : (C) 2012 by Etienne Tourigny
6  email : etourigny dot dev at gmail dot com
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 "qgsdialog.h"
19 
20 QgsDialog::QgsDialog( QWidget *parent, Qt::WFlags fl,
21  QDialogButtonBox::StandardButtons buttons,
22  Qt::Orientation orientation )
23  : QDialog( parent, fl )
24 {
25  // create buttonbox
26  mButtonBox = new QDialogButtonBox( buttons, orientation, this );
27  connect( mButtonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
28  connect( mButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
29 
30  // layout
31  QLayout *layout = 0;
32  if ( orientation == Qt::Horizontal )
33  layout = new QVBoxLayout();
34  else
35  layout = new QHBoxLayout();
36  mLayout = new QVBoxLayout();
37  layout->addItem( mLayout );
38  layout->addWidget( mButtonBox );
39  setLayout( layout );
40 }
41 
43 {
44 }
45