Exemple #1
0
void CSVWorld::SceneSubView::handleDrop (const std::vector< CSMWorld::UniversalId >& data)
{
    CSVRender::PagedWorldspaceWidget* pagedNewWidget = NULL;
    CSVRender::UnpagedWorldspaceWidget* unPagedNewWidget = NULL;
    CSVWidget::SceneToolbar* toolbar = NULL;

    CSVRender::WorldspaceWidget::DropType type = CSVRender::WorldspaceWidget::getDropType (data);

    switch (mScene->getDropRequirements (type))
    {
        case CSVRender::WorldspaceWidget::canHandle:
            mScene->handleDrop (data, type);
            break;

        case CSVRender::WorldspaceWidget::needPaged:
            pagedNewWidget = new CSVRender::PagedWorldspaceWidget(this, mDocument);
            toolbar = makeToolbar(pagedNewWidget, widget_Paged);
            makeConnections(pagedNewWidget);
            replaceToolbarAndWorldspace(pagedNewWidget, toolbar);
            mScene->handleDrop (data, type);
            break;

        case CSVRender::WorldspaceWidget::needUnpaged:
            unPagedNewWidget = new CSVRender::UnpagedWorldspaceWidget(data.begin()->getId(), mDocument, this);
            toolbar = makeToolbar(unPagedNewWidget, widget_Unpaged);
            makeConnections(unPagedNewWidget);
            replaceToolbarAndWorldspace(unPagedNewWidget, toolbar);
            cellSelectionChanged(*(data.begin()));
            break;

        case CSVRender::WorldspaceWidget::ignored:
            return;
    }
}
Exemple #2
0
CSVWorld::SceneSubView::SceneSubView (const CSMWorld::UniversalId& id, CSMDoc::Document& document)
: SubView (id), mLayout(new QHBoxLayout), mDocument(document), mScene(NULL), mToolbar(NULL)
{
    QVBoxLayout *layout = new QVBoxLayout;

    layout->setContentsMargins (QMargins (0, 0, 0, 0));

    layout->addWidget (mBottom =
        new TableBottomBox (NullCreatorFactory(), document.getData(), document.getUndoStack(), id,
        this), 0);

    mLayout->setContentsMargins (QMargins (0, 0, 0, 0));

    CSVRender::WorldspaceWidget* wordspaceWidget = NULL;
    widgetType whatWidget;

    if (id.getId()=="sys::default")
    {
        whatWidget = widget_Paged;

        CSVRender::PagedWorldspaceWidget *newWidget = new CSVRender::PagedWorldspaceWidget (this, document);

        wordspaceWidget = newWidget;

        makeConnections(newWidget);
    }
    else
    {
        whatWidget = widget_Unpaged;

        CSVRender::UnpagedWorldspaceWidget *newWidget = new CSVRender::UnpagedWorldspaceWidget (id.getId(), document, this);

        wordspaceWidget = newWidget;

        makeConnections(newWidget);
    }

    replaceToolbarAndWorldspace(wordspaceWidget, makeToolbar(wordspaceWidget, whatWidget));

    layout->insertLayout (0, mLayout, 1);

    CSVFilter::FilterBox *filterBox = new CSVFilter::FilterBox (document.getData(), this);

    layout->insertWidget (0, filterBox);

    QWidget *widget = new QWidget;

    widget->setLayout (layout);

    setWidget (widget);
}
Solid::Control::ModemGsmUssdInterface::ModemGsmUssdInterface(const ModemGsmUssdInterface &ussdinterface)
    : ModemInterface(*new ModemGsmUssdInterfacePrivate(this), ussdinterface)
{
    Q_D(ModemGsmUssdInterface);
    d->setBackendObject(ussdinterface.d_ptr->backendObject());
    makeConnections(ussdinterface.d_ptr->backendObject());
}
// full constructor
C_NNcluster2d::C_NNcluster2d(const vector<vector<double> > & x1,const vector<vector<double> > & wx1
        , const vector<int> & ip1
        , const double fx1[2] , const string & tn1, const string & sn1, const string & cn1) {
  typeName = tn1;
  setName = sn1;
  contigName = cn1;
  Nmin=1;
  Smin[0]=-1;
  Smin[1]=-1;
  NC=0;
  cluster.clear();
  fx[0]=fx1[0]; // neighborhood scale
  fx[1]=fx1[1]; 
  x=x1;
  wx=wx1;
  ip=ip1;
  N=x.size();
  dx[0]=0;
  dx[1]=0;
  for (int i=0; i<N; i++) {
      wx[i][0]*=fx[0];
      wx[i][1]*=fx[1];
      if ( wx[i][0]>dx[0] ) { dx[0]=wx[i][0]; }  
      if ( wx[i][1]>dx[1] ) { dx[1]=wx[i][1]; }  
  }
  init();
  makeConnections();
  makeClusters();
}
Exemple #5
0
bool Editor::init()
{
    // Initialize managers
    mColorManager = new ColorManager(this);
    mLayerManager = new LayerManager(this);
    mToolManager = new ToolManager(this);
    mPlaybackManager = new PlaybackManager(this);
    mViewManager = new ViewManager(this);
    mPreferenceManager = new PreferenceManager(this);
    mSoundManager = new SoundManager(this);

    mAllManagers =
    {
        mColorManager,
        mToolManager,
        mLayerManager,
        mPlaybackManager,
        mViewManager,
        mPreferenceManager,
        mSoundManager
    };

    for (BaseManager* pManager : mAllManagers)
    {
        pManager->init();
    }
    //setAcceptDrops( true ); // TODO: drop event

    makeConnections();

    mIsAutosave = mPreferenceManager->isOn(SETTING::AUTO_SAVE);
    mAutosaveNumber = mPreferenceManager->getInt(SETTING::AUTO_SAVE_NUMBER);

    return true;
}
SGMEnergyPositionTestView::SGMEnergyPositionTestView(SGMEnergyPosition *energyPosition, QWidget *parent) : QWidget(parent)
{
    energyPosition_ = energyPosition;
    setupUi();
    setupData();
    makeConnections();
}
Solid::Control::CdmaNetworkInterface::CdmaNetworkInterface(QObject *backendObject)
    : SerialNetworkInterface(*new CdmaNetworkInterfacePrivate(this), backendObject)
{
    Q_D(CdmaNetworkInterface);
    d->setBackendObject(backendObject);
    makeConnections( backendObject );
}
AccountingForm::AccountingForm(const int& pat_id) : m_patient(pat_id)
{
	createLayout();
	makeConnections();
	initDB();
	initialUpdate();
}
GameEngine::GameEngine(GameState *game, QWidget *parent) :
    QWidget(parent),
    _gamestate(game),
    _exit(false)
{
    //set up interval in microseconds
    float interval = (1.0f / 60.0f);
    _interval_usec = (int)(interval * 1000000.0f);

    _interval_msec = (int)(_interval_usec / 1000);



    _loopControl = new QTimer(this);
    //_loopControl->setInterval(interval_msec);
    connect( _loopControl, SIGNAL(timeout()),
             this, SLOT(slotRun()) );

    _gamestate->setParent(this);
    //Constructs the game
    _gamestate->buildAssets();
    setupUi();
    makeConnections();

    //Start up the game
    _gamestate->startGame();
    //Start timeres
    _timer.start();
    _loopControl->start(_interval_msec);
}
Solid::Control::WirelessNetworkInterfaceNm09::WirelessNetworkInterfaceNm09(WirelessNetworkInterfaceNm09Private &dd, QObject *backendObject)
    : NetworkInterfaceNm09(dd, backendObject)
{
    Q_D(WirelessNetworkInterfaceNm09);
    makeConnections( backendObject );
    d->readAccessPoints();
}
Solid::Control::WirelessNetworkInterfaceNm09::WirelessNetworkInterfaceNm09(WirelessNetworkInterfaceNm09Private &dd, const WirelessNetworkInterfaceNm09 &networkinterface)
    : NetworkInterfaceNm09(dd, networkinterface.d_ptr->backendObject())
{
    Q_D(WirelessNetworkInterfaceNm09);
    makeConnections( networkinterface.d_ptr->backendObject() );
    d->readAccessPoints();
}
Solid::Control::ModemGsmUssdInterface::ModemGsmUssdInterface(QObject *backendObject)
    : ModemInterface(*new ModemGsmUssdInterfacePrivate(this), backendObject)
{
    Q_D(ModemGsmUssdInterface);
    d->setBackendObject(backendObject);
    makeConnections( backendObject );
}
Exemple #13
0
MainWindow2::MainWindow2( QWidget *parent ) : QMainWindow( parent )
{
    ui = new Ui::MainWindow2;
    ui->setupUi( this );

    mBackground = new BackgroundWidget( this );

    mScribbleArea = new ScribbleArea( mBackground );
    mScribbleArea->setFocusPolicy( Qt::StrongFocus );

    // Show the UI over the background
    //
    QVBoxLayout* layout = new QVBoxLayout();
    layout->setSpacing(0);
    layout->setMargin(0);
    layout->setContentsMargins(0,0,0,0);
    layout->addWidget(mScribbleArea);

    mBackground->setLayout(layout);

    // Central widget
    setCentralWidget(mBackground);


    Object* object = new Object();
    object->init();

    mEditor = new Editor( this );
    mEditor->setScribbleArea(mScribbleArea);
    mEditor->init();
    mEditor->setObject( object );

    mScribbleArea->setCore( mEditor );
    mScribbleArea->init();

    mEditor->setScribbleArea( mScribbleArea );
    makeConnections( mEditor, mScribbleArea );

    mCommands = new CommandCenter( this );
    mCommands->setCore( mEditor );

    createDockWidgets();
    createMenus();
    setupKeyboardShortcuts();

    readSettings();

    connect( mEditor, &Editor::needSave, this, &MainWindow2::saveDocument );
    connect( mToolBox, &ToolBoxWidget::clearButtonClicked, mEditor, &Editor::clearCurrentFrame );

    //connect( mScribbleArea, &ScribbleArea::refreshPreview, mPreview, &PreviewWidget::updateImage );

    mEditor->setCurrentLayer( mEditor->object()->getLayerCount() - 1 );
    mEditor->tools()->setDefaultTool();

    mBackground->init(mEditor->preference());

    mEditor->updateObject();
    mEditor->color()->setColorNumber(0);
}
BioXASFourElementVortexDetector::BioXASFourElementVortexDetector(const QString &name, const QString &description, QObject *parent)
	: AMXspress3XRFDetector(name, description, parent)
{
	// Stuff required by AMXRFDetector.
	acquireControl_ = new AMSinglePVControl("Acquisition Time", "BL1607-5-I22:SetPort_1", this, 0.5);
	acquisitionStatusControl_ = new AMReadOnlyPVControl("Status", "DXP1607-801:DetectorState_RBV", this);
	acquireTimeControl_ = new AMSinglePVControl("Integration Time", "BL1607-5-I22:SetPort_1.HIGH", this, 0.001);
	elapsedTimeControl_ = 0;

	for (int i = 0; i < 4; i++){

		channelEnableControls_.append(new AMSinglePVControl(QString("Channel Enable %1").arg(i+1), QString("DXP1607-801:C%1_PluginControlVal").arg(i+1), this, 0.1));
		spectraControls_.append(new AMReadOnlyPVControl(QString("Raw Spectrum %1").arg(i+1), QString("DXP1607-801:ARR%1:ArrayData").arg(i+1), this));
		thresholdControls_.append(new AMPVControl(QString("Threshold %1").arg(i+1), QString("DXP1607-801:C%1_SCA4_THRESHOLD_RBV").arg(i+1), QString("DXP1607-801:C%1_SCA4_THRESHOLD").arg(i+1), QString(), this, 0.5));
	}

	initializationControl_ = new AMSinglePVControl("Initialization", "DXP1607-801:Acquire", this, 0.1);
	eraseControl_ = new AMSinglePVControl("EraseControl", "DXP1607-801:ERASE", this, 0.5);
	updateControl_ = new AMSinglePVControl("UpdateControl", "DXP1607-801:UPDATE", this, 0.5);
	statusMessageControl_ = new AMReadOnlyPVControl("StatusMessage", "DXP1607-801:StatusMessage_RBV", this);
	currentFrameCountControl_ = new AMReadOnlyPVControl("CurrentFrame", "DXP1607-801:ArrayCounter_RBV", this);
	framesPerAcquisitionControl_ = new AMPVControl("FramesPerAcquisition", "DXP1607-801:NumImages_RBV", "DXP1607-801:NumImages", QString(), this, 0.5);

	makeConnections();
}
Exemple #15
0
void MenuBar::retranslateMenuBar()
{
	actionQuit->setText(QApplication::translate("MainWindow", "&Quit", 0, QApplication::UnicodeUTF8));
	actionClear_Console->setText(QApplication::translate("MainWindow", "&Clear Console", 0, QApplication::UnicodeUTF8));
	actionEDP_load_smb->setText(QApplication::translate("MainWindow", "EDP load", 0, QApplication::UnicodeUTF8));
	actionUnload_All->setText(QApplication::translate("MainWindow", "&Unload All", 0, QApplication::UnicodeUTF8));
	actionSlay_All->setText(QApplication::translate("MainWindow", "&Slay All", 0, QApplication::UnicodeUTF8));
	actionAbout->setText(QApplication::translate("MainWindow", "&About", 0, QApplication::UnicodeUTF8));
	actionall_EDP_Load->setText(QApplication::translate("MainWindow", "EDP &Load", 0, QApplication::UnicodeUTF8));
	actionall_EDP_Unload->setText(QApplication::translate("MainWindow", "EDP &Unload", 0, QApplication::UnicodeUTF8));
	actionall_Synchronisation->setText(QApplication::translate("MainWindow", "&Synchronisation", 0, QApplication::UnicodeUTF8));
	actionall_Synchro_Position->setText(QApplication::translate("MainWindow", "&Synchro Position", 0, QApplication::UnicodeUTF8));
	actionall_Front_Position->setText(QApplication::translate("MainWindow", "&Front Position", 0, QApplication::UnicodeUTF8));
	actionall_Position_0->setText(QApplication::translate("MainWindow", "Position &0", 0, QApplication::UnicodeUTF8));
	actionall_Position_1->setText(QApplication::translate("MainWindow", "Position &1", 0, QApplication::UnicodeUTF8));
	actionall_Position_2->setText(QApplication::translate("MainWindow", "Position &2", 0, QApplication::UnicodeUTF8));
	actionMP_Load->setText(QApplication::translate("MainWindow", "MP &Load", 0, QApplication::UnicodeUTF8));
	actionMP_Unload->setText(QApplication::translate("MainWindow", "MP &Unload", 0, QApplication::UnicodeUTF8));
	actionProcess_Control->setText(QApplication::translate("MainWindow", "&Process Control", 0, QApplication::UnicodeUTF8));
	actionOpen_Configuration->setText(QApplication::translate("MainWindow", "&Open Configuration", 0, QApplication::UnicodeUTF8));
	actionReload_Configuration->setText(QApplication::translate("MainWindow", "&Reload &Configuration", 0, QApplication::UnicodeUTF8));

	menuRobot->setTitle(QApplication::translate("MainWindow", "&Robot", 0, QApplication::UnicodeUTF8));
	menuFile->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));
	menuSpecial->setTitle(QApplication::translate("MainWindow", "&Special", 0, QApplication::UnicodeUTF8));
	menuAll_Robots->setTitle(QApplication::translate("MainWindow", "&All robots", 0, QApplication::UnicodeUTF8));
	menuall_Preset_Positions->setTitle(QApplication::translate("MainWindow", "Pr&eset Positions", 0, QApplication::UnicodeUTF8));
	menuTask->setTitle(QApplication::translate("MainWindow", "&Task", 0, QApplication::UnicodeUTF8));
	menuHelp->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8));

	makeConnections();
}
Solid::Control::ModemGsmSmsInterface::ModemGsmSmsInterface(const ModemGsmSmsInterface &smsinterface)
    : ModemInterface(*new ModemGsmSmsInterfacePrivate(this), smsinterface)
{
    Q_D(ModemGsmSmsInterface);
    d->setBackendObject(smsinterface.d_ptr->backendObject());
    makeConnections( smsinterface.d_ptr->backendObject() );
}
Solid::Control::CdmaNetworkInterface::CdmaNetworkInterface(const CdmaNetworkInterface &networkinterface)
    : SerialNetworkInterface(*new CdmaNetworkInterfacePrivate(this), networkinterface)
{
    Q_D(CdmaNetworkInterface);
    d->setBackendObject(networkinterface.d_ptr->backendObject());
    makeConnections( networkinterface.d_ptr->backendObject() );
}
Exemple #18
0
AM2DScanView::AM2DScanView(AMScanSetModel* model, QWidget *parent)
	: QWidget(parent)
{
	scansModel_ = model;
	if(scansModel_ == 0)
		scansModel_ = new AMScanSetModel(this);

	spectrumViewIsVisible_ = false;

	setupUI();
	makeConnections();

	exclusiveScanBars_->setModel(scansModel_);
	multiScanBars_->setModel(scansModel_);

	currentExclusiveDataSource_ = 0;

	exclusiveModeAnim_ = new QPropertyAnimation(gExclusiveView_->graphicsWidget(), "geometry", this);
	exclusiveModeAnim_->setDuration(500);
	exclusiveModeAnim_->setEasingCurve(QEasingCurve::InOutCubic);

	multiViewModeAnim_ = new QPropertyAnimation(gMultiView_->graphicsWidget(), "geometry", this);
	multiViewModeAnim_->setDuration(500);
	multiViewModeAnim_->setEasingCurve(QEasingCurve::InOutCubic);
}
Solid::Control::ModemGsmNetworkInterface::ModemGsmNetworkInterface(const ModemGsmNetworkInterface &networkinterface)
    : ModemInterface(*new ModemGsmNetworkInterfacePrivate(this), networkinterface)
{
    Q_D(ModemGsmNetworkInterface);
    d->setBackendObject(networkinterface.d_ptr->backendObject());
    makeConnections( networkinterface.d_ptr->backendObject() );
}
Exemple #20
0
void PreferencesDialog::init( PreferenceManager* m )
{
    Q_ASSERT( m != nullptr );
    mPrefManager = m;

    contentsWidget = new QListWidget;
    contentsWidget->setViewMode( QListView::IconMode );
    contentsWidget->setIconSize( QSize( 96, 84 ) );
    contentsWidget->setMovement( QListView::Static );
    contentsWidget->setMaximumWidth( 128 );
    contentsWidget->setSpacing( 12 );

    GeneralPage* general = new GeneralPage( this );
    general->setManager( mPrefManager );
    general->updateValues();
    //connect(mPrefManager, &PreferenceManager::effectChanged, general, &GeneralPage::updateValues);
    
    FilesPage* file = new FilesPage( this );
    file->setManager( mPrefManager );
    
    TimelinePage* timeline = new TimelinePage( this );
    timeline->setManager( mPrefManager );

    ToolsPage* tools = new ToolsPage( this );
    tools->setManager( mPrefManager );
    
    ShortcutsPage* shortcuts = new ShortcutsPage( this );
    shortcuts->setManager( mPrefManager );

    pagesWidget = new QStackedWidget;
    pagesWidget->addWidget( general );
    pagesWidget->addWidget( file );
    pagesWidget->addWidget( timeline );
    pagesWidget->addWidget( tools );
    pagesWidget->addWidget( shortcuts );

    QPushButton* closeButton = new QPushButton( tr( "Close" ) );
    connect( closeButton, &QPushButton::clicked, this, &PreferencesDialog::close );

    createIcons();
    contentsWidget->setCurrentRow( 0 );

    QHBoxLayout* horizontalLayout = new QHBoxLayout;
    horizontalLayout->addWidget( contentsWidget );
    horizontalLayout->addWidget( pagesWidget, 1 );

    QHBoxLayout* buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch( 1 );
    buttonsLayout->addWidget( closeButton );

    QVBoxLayout* mainLayout = new QVBoxLayout;
    mainLayout->addLayout( horizontalLayout );
    mainLayout->addStretch( 1 );
    mainLayout->addSpacing( 12 );
    mainLayout->addLayout( buttonsLayout );
    setLayout( mainLayout );

    makeConnections();
}
bool KvsObject_socket::init(KviKvsRunTimeContext *c,KviKvsVariantList *)
{
	m_pSocket = new QTcpSocket();
	m_pServer = 0;
	m_pContext = c ;
	makeConnections();
	return true;
}
Solid::Control::WirelessNetworkInterfaceNm09::WirelessNetworkInterfaceNm09(const WirelessNetworkInterfaceNm09 &networkinterface)
    : NetworkInterfaceNm09(*new WirelessNetworkInterfaceNm09Private(this), networkinterface)
{
    Q_D(WirelessNetworkInterfaceNm09);
    d->setBackendObject(networkinterface.d_ptr->backendObject());
    makeConnections( networkinterface.d_ptr->backendObject() );
    d->readAccessPoints();
}
Solid::Control::WirelessNetworkInterfaceNm09::WirelessNetworkInterfaceNm09(QObject *backendObject)
    : NetworkInterfaceNm09(*new WirelessNetworkInterfaceNm09Private(this), backendObject)
{
    Q_D(WirelessNetworkInterfaceNm09);
    d->setBackendObject(backendObject);
    makeConnections( backendObject );
    d->readAccessPoints();
}
ToolWidget::ToolWidget(QWidget *parent) :
    QTabWidget(parent),
    _ui(new Ui::TabWidget),
    _conf(NULL)
{
    _ui->setupUi(this);
    makeConnections();
}
Exemple #25
0
bool KvsObject_socket::init(KviKvsRunTimeContext * c, KviKvsVariantList *)
{
	m_pSocket = new QTcpSocket();
	m_pServer = nullptr;
	m_pContext = c;
	makeConnections();
	bIsSetFromExternal = false;
	return true;
}
ApplicationsManager::ApplicationsManager(QPSPManager *application, ApplicationsWidget &view, OptionsManager &options)
:m_view(view), m_application(application), m_options(options)
{
	m_view.setApplications(this);
    makeConnections();
    scanPSP();
    updatePSPGUI();
    scanComputer();
    updateComputerGUI();
}
/*!
    \internal
*/
void QWebSocketPrivate::init()
{
    Q_ASSERT(q_ptr);
    Q_ASSERT(m_pMaskGenerator);

    m_pMaskGenerator->seed();

    if (m_pSocket) {
        makeConnections(m_pSocket.data());
    }
}
// constructor w/o label
C_NNcluster1d::C_NNcluster1d(const vector<double> & x1, const double DX) {
  NC=0;
  cluster.clear();
  dx=DX; // neighborhood scale
  x=x1;
  N=x.size(); 
  init();
  Nmin=1;
  Smin=0;
  makeConnections();
  makeClusters();
}
Exemple #29
0
QPSPManager::QPSPManager(MainWindow &view)
:m_view(view)
{
	m_options = new OptionsManager(m_view.getOptionsView());
	m_applications = new ApplicationsManager(this, m_view.getApplicationsView(), *m_options);
	m_backups = new BackupsManager(this, m_view.getBackupsView(), *m_options);
    m_videos = new VideosManager(this, m_view.getVideosView(), *m_options);
    m_ISOs = new ISOsManager(this, m_view.getISOsView(), *m_options);
    
    makeConnections();
    PSPDirChanged();
}
ConfigWidget::ConfigWidget()
{
    //udpClient = new UDPClient(true);
    udpClient = new UDPClient(false);
    udpClient->setPort(50001);

    contentsWidget = new QListWidget;
    contentsWidget->setViewMode(QListView::IconMode);
    contentsWidget->setIconSize(QSize(64, 64));
    contentsWidget->setMovement(QListView::Static);
    contentsWidget->setMaximumWidth(128);
    contentsWidget->setSpacing(12);

    pagesWidget = new QStackedWidget;
    pagesWidget->setMinimumSize(QSize(800,700));

    networkPage = new NetworkPage;
    networkPage->init(udpClient->otherNodeAddress(), udpClient->otherNodePort());
    settingsPage = new SettingsPage;
    consolePage = new ConsolePage;
    tetrixPage = new TetrixWindow;
    pagesWidget->addWidget(networkPage);
    pagesWidget->addWidget(settingsPage);
    pagesWidget->addWidget(consolePage);
    pagesWidget->addWidget(tetrixPage);

    QPushButton *closeButton = new QPushButton(tr("Close"));

    createIcons();
    contentsWidget->setCurrentRow(0);

    connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));

    makeConnections();

    QHBoxLayout *horizontalLayout = new QHBoxLayout;
    horizontalLayout->addWidget(contentsWidget);
    horizontalLayout->addWidget(pagesWidget, 1);

    QHBoxLayout *buttonsLayout = new QHBoxLayout;
    buttonsLayout->addStretch(1);
    buttonsLayout->addWidget(closeButton);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addLayout(horizontalLayout);
    mainLayout->addStretch(1);
    mainLayout->addSpacing(5);
    //mainLayout->addLayout(buttonsLayout);
    setLayout(mainLayout);

    setWindowTitle(tr("Generic Sensor Interface Client"));
}