Example #1
0
File: widget.cpp Project: Qmax/PT6
//void Widget::HardwareInitializtaion(){
//qDebug()<<"AWG Hardware Initialisation";
//}
void Widget::enableRichGUI(){
	QWidget *m_objWidget=new QWidget(this);
	QGraphicsScene *entireScene = new QGraphicsScene(0,0,800,600);
	QGraphicsView  *entireView =  new QGraphicsView(m_objWidget);
	QPixmap obj1 = QPixmap(":/bg.png");
	QBrush obj2 = QBrush(obj1);
	obj2.setStyle(Qt::TexturePattern);
	obj2.setTexture(obj1);
	entireView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setFrameStyle(QFrame::Plain|QFrame::Sunken);
	entireView->setBackgroundBrush(obj2);
	entireView->setScene(entireScene);
	entireView->setGeometry(0,0,800,600);

	ui->groupBox->setParent(m_objWidget);
	ui->groupBox_2->setParent(m_objWidget);
	ui->groupBox_3->setParent(m_objWidget);
	ui->grpGeneral->setParent(m_objWidget);
	ui->grpSettings->setParent(m_objWidget);
	ui->grpWaveConfiguration->setParent(m_objWidget);
	ui->grpWaveWindow->setParent(m_objWidget);

	ui->grpGeneral->setGeometry(20,0,271,160);
	ui->groupBox->setGeometry(510,430,271,90);
	ui->groupBox_2->setGeometry(310,350,191,170);
	ui->grpSettings->setGeometry(310,0,471,101);
	ui->grpWaveConfiguration->setGeometry(20,164,271,356);
	ui->groupBox_3->setGeometry(510,360,271,77);
	ui->grpWaveWindow->setGeometry(310,100,471,250);

}
Example #2
0
File: widget.cpp Project: Qmax/PT6
//void Widget::HardwareInitializtaion(){
//qDebug()<<"ICM Hardware Initialisation";
//}
void Widget::enableRichGUI(){
	QWidget *m_objWidget=new QWidget(this);
	QGraphicsScene *entireScene = new QGraphicsScene(0,0,800,600);
	QGraphicsView  *entireView =  new QGraphicsView(m_objWidget);
	QPixmap obj1 = QPixmap(":/bg.png");
	QBrush obj2 = QBrush(obj1);
	obj2.setStyle(Qt::TexturePattern);
	obj2.setTexture(obj1);
	entireView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setFrameStyle(QFrame::Plain|QFrame::Sunken);
	entireView->setBackgroundBrush(obj2);
	entireView->setScene(entireScene);
	entireView->setGeometry(0,0,800,600);

	ui->grpGeneral->setParent(m_objWidget);
	ui->groupBox->setParent(m_objWidget);
	ui->grpSettings->setParent(m_objWidget);
	ui->groupBox_2->setParent(m_objWidget);
	ui->groupBox_4->setParent(m_objWidget);
	ui->groupBox_3->setParent(m_objWidget);


	ui->grpGeneral->setGeometry  (20,  0,   271, 161);
	ui->groupBox->setGeometry    (20,  160, 271, 360);
	ui->grpSettings->setGeometry (309, 0,   474, 131);
	ui->groupBox_2->setGeometry  (309, 130, 474, 91 );
	ui->groupBox_4->setGeometry  (310, 230, 171, 290);
	ui->groupBox_3->setGeometry  (489, 220, 294, 300);

}
Example #3
0
void PTPSoCTestJigInterface2::enableRichGUI(){
	QWidget *m_objWidget=new QWidget(this);
	QGraphicsScene *entireScene = new QGraphicsScene(0,0,800,600);
	QGraphicsView  *entireView =  new QGraphicsView(m_objWidget);
	QPixmap obj1 = QPixmap(":/bg.png");
	QBrush obj2 = QBrush(obj1);
	obj2.setStyle(Qt::TexturePattern);
	obj2.setTexture(obj1);
	entireView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setFrameStyle(QFrame::Plain|QFrame::Sunken);
	entireView->setBackgroundBrush(obj2);
	entireView->setScene(entireScene);
	entireView->setGeometry(0,0,800,600);


	ui.groupBox_3->setParent(m_objWidget);
	ui.groupBox_4->setParent(m_objWidget);
	ui.groupBox_6->setParent(m_objWidget);
	ui.groupBox_7->setParent(m_objWidget);
	ui.groupBox_10->setParent(m_objWidget);
	ui.groupBox_11->setParent(m_objWidget);
	ui.groupBox_12->setParent(m_objWidget);
	ui.groupBox_13->setParent(m_objWidget);
	ui.groupBox_14->setParent(m_objWidget);
	ui.groupBox_15->setParent(m_objWidget);
	ui.label_9->setParent(m_objWidget);
    ui.comboBox_10->setParent(m_objWidget);
    ui.switchSRCIMP->setParent(m_objWidget);
    ui.switchFLY->setParent(m_objWidget);;

	ui.groupBox_3->setGeometry(10,10,161,70);
	ui.groupBox_4->setGeometry(180,10,161,71);
	ui.groupBox_6->setGeometry(350,10,161,70);
	ui.groupBox_7->setGeometry(10,180,771,211);
	ui.groupBox_10->setGeometry(10,90,391,80);
	ui.groupBox_11->setGeometry(420,90,151,80);
	ui.groupBox_12->setGeometry(590,90,191,80);
	ui.groupBox_13->setGeometry(590,200,170,61);
	ui.groupBox_14->setGeometry(520,10,261,70);
	ui.groupBox_15->setGeometry(10,400,321,80);
	ui.label_9->setGeometry(500,410,251,20);
    ui.comboBox_10->setGeometry(40,430,125,30);
    ui.switchSRCIMP->setGeometry(210,426,84,40);
    ui.switchFLY->setGeometry(350,426,111,40);

    m_objWidget->setStyleSheet("QLabel{color:white;}");

}
Example #4
0
void ADHighAccuracy::enableRichGUI(){
	QWidget *m_objWidget=new QWidget(this);
	QGraphicsScene *entireScene = new QGraphicsScene(0,0,800,600);
	QGraphicsView  *entireView =  new QGraphicsView(m_objWidget);
	QPixmap obj1 = QPixmap(":/bg.png");
	QBrush obj2 = QBrush(obj1);
	obj2.setStyle(Qt::TexturePattern);
	obj2.setTexture(obj1);
	entireView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setFrameStyle(QFrame::Plain|QFrame::Sunken);
	entireView->setBackgroundBrush(obj2);
	entireView->setScene(entireScene);
	entireView->setGeometry(0,0,800,600);

	ui->groupBox->setParent(m_objWidget);
	ui->groupBox_2->setParent(m_objWidget);
	ui->groupBox_3->setParent(m_objWidget);
	ui->groupBox_57->setParent(m_objWidget);
	ui->groupBox_62->setParent(m_objWidget);
	ui->groupBox_63->setParent(m_objWidget);
	ui->groupBox_64->setParent(m_objWidget);
	ui->groupBox_65->setParent(m_objWidget);
	ui->groupBox_66->setParent(m_objWidget);
	ui->groupBox_67->setParent(m_objWidget);
//	ui->groupBox_68->setParent(m_objWidget);
	ui->GPCon->setParent(m_objWidget);
        ui->settings->setParent(m_objWidget);

	ui->groupBox->setGeometry(585,288,197,99);
	ui->groupBox_2->setGeometry(663,459,118,63);
	ui->groupBox_3->setGeometry(340,390,440,60);
	ui->groupBox_57->setGeometry(10,0,321,281);
	ui->groupBox_62->setGeometry(10,280,321,161);
        ui->groupBox_63->setGeometry(10,440,230,81);
	ui->groupBox_64->setGeometry(340,0,231,201);
	ui->groupBox_65->setGeometry(340,200,231,80);
	ui->groupBox_66->setGeometry(340,280,241,91);
	ui->groupBox_67->setGeometry(580,0,201,281);
//	ui->groupBox_68->setGeometry(320,450,341,71);
	ui->GPCon->setGeometry(320,450,341,71);
        ui->settings->setGeometry(240,450,70,70);
}
Example #5
0
File: widget.cpp Project: Qmax/PT6
void Widget::enableRichGUI() {
	QWidget *m_objWidget = new QWidget(this);
	QGraphicsScene *entireScene = new QGraphicsScene(0, 0, 800, 600);
	QGraphicsView *entireView = new QGraphicsView(m_objWidget);
	QPixmap obj1 = QPixmap(":/bg.png");
	QBrush obj2 = QBrush(obj1);
	obj2.setStyle(Qt::TexturePattern);
	obj2.setTexture(obj1);
	entireView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setFrameStyle(QFrame::Plain | QFrame::Sunken);
	entireView->setBackgroundBrush(obj2);
	entireView->setScene(entireScene);
	entireView->setGeometry(0, 0, 800, 600);

	ui->grpGeneral->setParent(m_objWidget);
	ui->tableWidget->setParent(m_objWidget);

	ui->grpGeneral->setGeometry(20, 10, 310, 181);
        ui->tableWidget->setGeometry(400, 20, 320, 490);

}
Example #6
0
void JobViewServer::setupUi() {

  // Paar allgemeine Parameter
  setBackgroundHints(DefaultBackground);
  setHasConfigurationInterface(true);
  setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
  resize(400, 80);

  // Rahmen, der das Hauptlayout enthält
  Plasma::Frame* frame = new Plasma::Frame();
  frame->setFrameShadow(Plasma::Frame::Sunken);
  QGraphicsLinearLayout* fullSpaceLayout = new QGraphicsLinearLayout();
  fullSpaceLayout->setContentsMargins(0,0,0,0);
  setLayout(fullSpaceLayout);
  fullSpaceLayout->addItem(frame);
  QGraphicsLinearLayout* layout = new QGraphicsLinearLayout();
  layout->setContentsMargins(0,0,0,0);
  frame->setLayout(layout);

  // Icon mit History und Queue Indicator
  iconWidget = new Plasma::IconWidget();
  iconWidget->setPreferredWidth(25);
  iconWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
  iconWidget->setIcon(KIcon("arrow-down"));
  layout->addItem(iconWidget);

  // Layout mit Progressbars
  meterContainer = new Plasma::Label();
  meterContainer->nativeWidget()->setWordWrap(true);
  meterLayout = new QGraphicsLinearLayout();
  meterContainer->setLayout(meterLayout);
  layout->addItem(meterContainer);

  // Popup erzeugen
  popup = new Plasma::Dialog();
  QVBoxLayout* popupLayout = new QVBoxLayout();
  popupLayout->setContentsMargins(0,0,0,0);
  popup->setLayout(popupLayout);
  popup->setWindowFlags(Qt::Popup);
  popup->resize(400, 300);

  // GraphicsView und GraphicsScene erzeugen
  QGraphicsScene* popupScene = new QGraphicsScene();
  QGraphicsView* popupView = new QGraphicsView();
  popupView->setScene(popupScene);
  popupView->setFrameStyle(QFrame::NoFrame);
  popupView->setStyleSheet("background-color: transparent;");
  popupView->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
  popupView->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
  popupView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
  popupLayout->addWidget(popupView);

  // Container mit dem GridLayout zur Scene hinzufügen
  jobViewContainer = new QGraphicsWidget();
  jobViewLayout = new QGraphicsLinearLayout(Qt::Vertical);
  jobViewLayout->setContentsMargins(5,5,5,5);
  jobViewContainer->setLayout(jobViewLayout);
  popupScene->addItem(jobViewContainer);

  // Überschrift-/Nachrichtenbereich
  popupHeadline = new Plasma::Label();
  popupHeadline->nativeWidget()->setAlignment(Qt::AlignCenter);
  jobViewLayout->addItem(popupHeadline);

  QObject::connect(iconWidget, SIGNAL(clicked()), this, SLOT(showPopup()));
}
MainWindow::MainWindow() : QMainWindow()
{
    //CSS codes...
    this->setStyleSheet("background-color:gray;");
    //

    // add drop down menus
    QMenu*  fileMenu = menuBar()->addMenu( "&File" );
    //QMenu*  editMenu = menuBar()->addMenu( "&Edit" );
    //QMenu*  viewMenu = menuBar()->addMenu( "&View" );
    //menuBar()->addMenu( "&Simulate" );
    //menuBar()->addMenu( "&Help" );

    // create file menu options
    //QAction* newAction     = fileMenu->addAction( "&New",              this, SLOT(fileNew()) );
    //QAction* saveAction    = fileMenu->addAction( "&Save As...",       this, SLOT(fileSaveAs()) );
    //QAction* openAction    = fileMenu->addAction( "&Open ...",         this, SLOT(fileOpen()) );
    //fileMenu->addSeparator();
    //QAction* previewAction = fileMenu->addAction( "Print pre&view...", this, SLOT(filePrintPreview()) );
    //QAction* printAction   = fileMenu->addAction( "&Print...",         this, SLOT(filePrint()) );
    //fileMenu->addSeparator();
    fileMenu->addAction( "&Quit",             this, SLOT(close()) );
    //newAction->setShortcut( QKeySequence::New );
    //saveAction->setShortcut( QKeySequence::Save );
    //openAction->setShortcut( QKeySequence::Open );
    //printAction->setShortcut( QKeySequence::Print );

    // create undo stack and associated menu actions
    m_undoStack = new QUndoStack( this );
    m_undoView  = 0;
    //viewMenu->addAction( "Undo stack", this, SLOT(showUndoStack()) );
    QAction* undoAction = m_undoStack->createUndoAction( this );
    QAction* redoAction = m_undoStack->createRedoAction( this );
    undoAction->setShortcut( QKeySequence::Undo );
    redoAction->setShortcut( QKeySequence::Redo );
    //editMenu->addAction( undoAction );
    //editMenu->addAction( redoAction );

    // create toolbar, set icon size, and add actions
    //QToolBar*   toolBar = addToolBar( "Standard" );
    QStyle*     style   = this->style();
    QSize       size    = style->standardIcon(QStyle::SP_DesktopIcon).actualSize( QSize(99,99) );
    //toolBar->setIconSize( size );
    //newAction->setIcon( style->standardIcon(QStyle::SP_DesktopIcon) );
    //openAction->setIcon( style->standardIcon(QStyle::SP_DialogOpenButton) );
    //saveAction->setIcon( style->standardIcon(QStyle::SP_DialogSaveButton) );
    //previewAction->setIcon( style->standardIcon(QStyle::SP_FileDialogContentsView) );
    //printAction->setIcon( style->standardIcon(QStyle::SP_ComputerIcon) );
    //undoAction->setIcon( style->standardIcon(QStyle::SP_ArrowBack) );
    //redoAction->setIcon( style->standardIcon(QStyle::SP_ArrowForward) );
    //toolBar->addAction( newAction );
    //toolBar->addAction( openAction );
    //toolBar->addAction( saveAction );
    //toolBar->addSeparator();
    //toolBar->addAction( previewAction );
    //toolBar->addAction( printAction );
    //toolBar->addSeparator();
    //toolBar->addAction( undoAction );
    //toolBar->addAction( redoAction );

    // create scene and central widget view of scene
    m_scene               = new Scene( m_undoStack );
    QGraphicsView*   view = new QGraphicsView( m_scene );
    view->setAlignment( Qt::AlignLeft | Qt::AlignTop );
    view->setFrameStyle( 0 );
    setCentralWidget( view );

    // connect message signal from scene to showMessage slot
    connect( m_scene, SIGNAL(message(QString)), this, SLOT(showMessage(QString)) );

    // add status bar message
    statusBar()->showMessage("You are now attempting in vain to evade several murderous asteroids. Survive if possible. ");

    //sets window size by default
    setFixedSize(WINDOW_WIDTH, WINDOW_HEIGHT);
}
Example #8
0
void DDSWidget::enableRichGUI() {
	QWidget *m_objWidget = new QWidget(this);
	QGraphicsScene *entireScene = new QGraphicsScene(0, 0, 800, 600);
	QGraphicsView *entireView = new QGraphicsView(m_objWidget);
	QPixmap obj1 = QPixmap(":/bg.png");
	QBrush obj2 = QBrush(obj1);
	obj2.setStyle(Qt::TexturePattern);
	obj2.setTexture(obj1);
	entireView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	entireView->setFrameStyle(QFrame::Plain | QFrame::Sunken);
	entireView->setBackgroundBrush(obj2);
	entireView->setScene(entireScene);
	entireView->setGeometry(0, 0, 800, 600);

	ui->grpBarRep->setParent(m_objWidget);
	ui->grpDDS->setParent(m_objWidget);
	ui->grpDrive->setParent(m_objWidget);
	ui->grpGeneral->setParent(m_objWidget);
	ui->grpPPT->setParent(m_objWidget);
	ui->grpTimeBase->setParent(m_objWidget);
	ui->grpAD5293->setParent(m_objWidget);

	ui->grpGeneral->setGeometry(10, 10, 280, 121);
        ui->grpTimeBase->setGeometry(310, 10, 471, 187);
        ui->grpDDS->setGeometry(10, 200, 280, 320);
        ui->grpPPT->setGeometry(310, 200, 470, 130);
        ui->grpDrive->setGeometry(310, 460, 470, 60);
        ui->grpBarRep->setGeometry(310, 333, 470, 130);
        ui->grpAD5293->setGeometry(10, 130, 281, 71);

	m_objLE_ADDR->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_DATA->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_BTU->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_BD->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_OPFreq->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_OPPhase->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_STDLY->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_WDP->setStyleSheet(
                "QLineEdit{border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;}QLineEdit::disabled{border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: dark gray;     selection-background-color: yellow;   color:white;     font: bold 14px;}");
	m_objLE_STOPDLY->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
	m_objLE_DPC->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;");
        m_objLE_DDSCycle->setStyleSheet(
                "QLineEdit{border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;}QLineEdit::disabled{border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: dark gray;     selection-background-color: yellow;   color:white;     font: bold 14px;}");
        m_objLE_DDSVoltage->setStyleSheet(
                "QLineEdit{border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: black;     selection-background-color: yellow;   color:white;     font: bold 14px;}QLineEdit::disabled{border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: dark gray;     selection-background-color: yellow;   color:white;     font: bold 14px;}");
	ui->leFS->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: gray;     selection-background-color: yellow;   color:yellow;     font: bold 14px;");
	ui->leOutputTime->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: gray;     selection-background-color: yellow;   color:yellow;     font: bold 14px;");
	ui->leTickFrequency->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: gray;     selection-background-color: yellow;   color:yellow;     font: bold 14px;");
	ui->leTickTime->setStyleSheet(
			"border-width: 2px;border-style: outset;border-color: gray; border-radius: 10px;  padding: 0 8px;     background: gray;     selection-background-color: yellow;   color:yellow;     font: bold 14px;");

}