SettingWindow Class Reference

class for settings window More...

#include <settingwindow.h>

List of all members.

Public Member Functions

 SettingWindow (QWidget *parent=0)
 the constructor
 ~SettingWindow ()
 the deconstructor
void setPointWidget (Point3dWidget *pw)
 set pointWidget


Detailed Description

class for settings window

Definition at line 50 of file settingwindow.h.


Constructor & Destructor Documentation

SettingWindow::SettingWindow QWidget *  parent = 0  ) 
 

the constructor

Definition at line 42 of file settingwindow.cpp.

00043     : QMainWindow( parent )
00044 {
00045     setWindowTitle("Settings");
00046 
00047     // central widget containing all other components
00048     QWidget *centralWidget = new QWidget(this);
00049 
00050     // use vertical layout for this
00051     QVBoxLayout *vLayout = new QVBoxLayout;
00052 
00053     // visual box with vertical layout as well
00054     visualBox = new QGroupBox("Visualization");
00055     vLayout->addWidget(visualBox, 1);
00056 
00057     camera = new QCheckBox("View Camera");
00058     camera->setChecked(true);
00059     connect(camera, SIGNAL(toggled(bool)), this, SLOT(changeView(bool)));
00060 
00061     bound = new QCheckBox("View bounding box");
00062     bound->setChecked(true);
00063     connect(bound, SIGNAL(toggled(bool)), this, SLOT(changeBound(bool)));
00064 
00065     movingStatus = new QCheckBox("View model while moving");
00066     movingStatus->setChecked(true);
00067     connect(movingStatus, SIGNAL(toggled(bool)), this, SLOT(changeMoving(bool)));
00068 
00069     colorSelector = new QPushButton("Background Color");
00070     connect(colorSelector, SIGNAL(clicked()), this, SLOT(selectColor()));
00071 
00072     initCam = new QPushButton("Init camera");
00073     connect(initCam, SIGNAL(clicked()), this, SLOT(initCamera()));
00074 
00075     QVBoxLayout *vsLayout = new QVBoxLayout;
00076     vsLayout->addWidget(camera);
00077     vsLayout->addWidget(bound);
00078     vsLayout->addWidget(movingStatus);
00079     vsLayout->addWidget(colorSelector);
00080     vsLayout->addWidget(initCam);
00081 
00082     visualBox->setLayout(vsLayout);
00083 
00084     // primitive settings with vertical layout
00085     primitives = new QGroupBox("3D Primitives");
00086     vLayout->addWidget(primitives, 1);
00087 
00088     QRadioButton *pointBtn = new QRadioButton("Points");
00089     pointBtn->setChecked(true);
00090     connect(pointBtn, SIGNAL(toggled(bool)), this, SLOT(toPoint(bool)));
00091 
00092     QRadioButton *cubeBtn = new QRadioButton("Cubes");
00093     connect(cubeBtn, SIGNAL(toggled(bool)), this, SLOT(toCube(bool)));
00094 
00095     QLabel *cubeWidthLbl = new QLabel("Width");
00096     cubeWidthSpin = new QSpinBox;
00097     cubeWidthSpin->setRange( 0 , 60);
00098     cubeWidthSpin->setSingleStep(1);
00099     cubeWidthSpin->setValue(10);
00100     connect(cubeWidthSpin, SIGNAL(valueChanged(int)), this, SLOT(changeCubeWidth(int)));
00101 
00102     QHBoxLayout *cubeLayout = new QHBoxLayout;
00103     cubeLayout->addWidget(cubeBtn);
00104     cubeLayout->addWidget(cubeWidthLbl);
00105     cubeLayout->addWidget(cubeWidthSpin);
00106 
00107     QCheckBox *orgColor = new QCheckBox("Original Color");
00108     orgColor->setChecked(true);
00109     connect(orgColor, SIGNAL(toggled(bool)), this, SLOT(initColor(bool)));
00110 
00111     alterColor = new QPushButton("Change Color");
00112     connect(alterColor, SIGNAL(clicked()), this, SLOT(changeColor()));
00113     alterColor->setEnabled(false);
00114 
00115     QHBoxLayout *colorBoxLo = new QHBoxLayout;
00116     colorBoxLo->addWidget(orgColor);
00117     colorBoxLo->addWidget(alterColor);
00118 
00119     QVBoxLayout *prLayout = new QVBoxLayout;
00120     prLayout->addWidget(pointBtn);
00121     prLayout->addLayout(cubeLayout);
00122     prLayout->addLayout(colorBoxLo);
00123 
00124     primitives->setLayout(prLayout);
00125 
00126     centralWidget->setLayout(vLayout);
00127 
00128     // set centralWidget as main widget
00129     setCentralWidget(centralWidget);
00130 }

SettingWindow::~SettingWindow  ) 
 

the deconstructor

Definition at line 135 of file settingwindow.cpp.

00136 {
00137 }


Member Function Documentation

void SettingWindow::setPointWidget Point3dWidget pw  ) 
 

set pointWidget

Parameters:
Point3dWidget *pw
Returns:
void

Definition at line 239 of file settingwindow.cpp.

Referenced by MainWidget::MainWidget().

00239                                                    {
00240     point3dWidget = pw;
00241     connect(point3dWidget, SIGNAL(cubeWidthChanged(int)), cubeWidthSpin, SLOT(setValue(int)));
00242     point3dWidget->updateGL();
00243 }


The documentation for this class was generated from the following files:
Generated on Mon Aug 14 10:44:22 2006 for S3DViewer by  doxygen 1.4.4