Exemple #1
0
//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);

}
Exemple #2
0
//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);

}
Exemple #3
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    //int scrW = QApplication::desktop()->screenGeometry().width();
    //int scrH = QApplication::desktop()->screenGeometry().height();
    ResourceFileReader *rfReader = new ResourceFileReader();

    int x, y, w, h, interval;
    QString source, mode, streamScriptDir;

    //
    // Check arguments
    //
    if ((argc - 1) == 5)
    {
        parseArgs(argv, &x, &y, &w, &h);
        rfReader->setResourceFile(argv[5]);
    }
    else
    {
        qDebug() << "Slideshow - revert to defaults";// Revert to defaults
        w = 1305; // Set fixed width to 500
        h = 734; // Old fixed height of the text script
        x = 0;
        y = 0;
        rfReader->setResourceFile("/home/pi/enter/resources/multimediawidget.xml");
    }

    mode = rfReader->getResource("mode");
    interval = rfReader->getResourceInt("slideshowInterval");
    streamScriptDir = rfReader->getResource("streamScriptDir");

    if(mode.compare("stream") == 0)
    {
        source = rfReader->getResource("streamURL");
    }
    else if(mode.compare("slideshow") == 0)
    {
        source = rfReader->getResource("multimediaPath");
    }

    MultimediaWidget *s = new MultimediaWidget(mode, source, interval, streamScriptDir);
    s->setDimensions(x, y, w, h);
    //show the images
    s->startWidget();
    QGraphicsView *view = new QGraphicsView(s->getScene());
    s->setView(view);

    //aesthetics: no scrollbars
    view->setGeometry(x, y, w, h);
    view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view->setStyleSheet("background-color:white;");

    view->showNormal();

    return a.exec();
}
Exemple #4
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;}");

}
Exemple #5
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);
}
void Graphics2DHistogrammTest::simpleTest()
{
    QGraphicsView graphicsView;
    QGraphicsScene * scene = new QGraphicsScene();
    graphicsView.setScene(scene);
        graphicsView.setGeometry(0,0, 520, 520);
    graphicsView.show();

    Graphics2DHistogramItem *histogramm = new Graphics2DHistogramItem();
    histogramm->setBrush(QBrush(Qt::red));
    QList<float> absciss, ordinate;
    for(int i = 0; i<=10; ++i){
        absciss.append(-20+2*i);
        ordinate.append(-30+2*i);
    }

    histogramm->setData(absciss, ordinate);

    scene->addItem(histogramm);
    histogramm->setScale(4);
    qApp->exec();
}
Exemple #7
0
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);

}
Exemple #8
0
//-----------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------
void MyVTK::key_canvas(QWidget *key_page)
{
//    QGraphicsScene* scene = new QGraphicsScene(QRect(0, 0, 130, 280));
    QGraphicsScene* scene = new QGraphicsScene(QRect(0, 0, 130, 310));
    QBrush brush;
    QGraphicsTextItem *text;

//    brush.setColor(QColor(255,128,77));
    brush.setColor(QColor(150,100,0));      // dark brown
    brush.setStyle(Qt::SolidPattern);
	scene->addEllipse(10,10,20,20,Qt::NoPen, brush);
	text = scene->addText("FDC");
    text->setPos(35, 10);

//    brush.setColor(QColor(255,77,128));
    brush.setColor(QColor(200,60,100));     // dark red
    brush.setStyle(Qt::SolidPattern);
    scene->addEllipse(10,40,20,20,Qt::NoPen, brush);
    text = scene->addText("MRC");
    text->setPos(35, 40);

    brush.setColor(QColor(30,20,255));      // dark blue
    scene->addEllipse(10,70,20,20,Qt::NoPen, brush);
	text = scene->addText("Naive B cell");
    text->setPos(35, 70);

    brush.setColor(QColor(0,200,255));      // light blue
    scene->addEllipse(10,100,20,20,Qt::NoPen, brush);
	text = scene->addText("CCR7 UP");
    text->setPos(35, 100);

    brush.setColor(QColor(50,255,150));     // light green
    scene->addEllipse(10,130,20,20,Qt::NoPen, brush);
	text = scene->addText("EBI2 UP");
    text->setPos(35, 130);

//    brush.setColor(QColor(255,255,0));      // yellow
    brush.setColor(Qt::yellow );      // yellow
    scene->addEllipse(10,160,20,20,Qt::NoPen, brush);
	text = scene->addText("BCL6 HI");
    text->setPos(35, 160);

    brush.setColor(QColor(0,150,0));        // dark green
    scene->addEllipse(10,190,20,20,Qt::NoPen, brush);
	text = scene->addText("BCL6 LO");
    text->setPos(35, 190);

    brush.setColor(QColor(128,128,128));    // grey
    scene->addEllipse(10,220,20,20,Qt::NoPen, brush);
	text = scene->addText("Max divisions");
    text->setPos(35, 220);

    brush.setColor(QColor(255,0,0));        // red
    scene->addEllipse(10,250,20,20,Qt::NoPen, brush);
	text = scene->addText("Plasma cell");
    text->setPos(35, 250);

    brush.setColor(QColor(255,130,0));      // orange
    scene->addEllipse(10,280,20,20,Qt::NoPen, brush);
    text = scene->addText("CD4 T cell");
    text->setPos(35, 280);

	QGraphicsView* view = new QGraphicsView(key_page);
    view->setScene(scene);
//    view->setGeometry(QRect(0, 0, 150, 300));
    view->setGeometry(QRect(0, 0, 150, 330));
    view->show();
}
Exemple #9
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;");

}