DateCluster::DateCluster(QWidget *pParent, const char *pName) : QWidget(pParent)
{
  if(pName)
    setObjectName(pName);

  QSizePolicy tsizePolicy(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
  tsizePolicy.setHorizontalStretch(0);
  tsizePolicy.setVerticalStretch(0);
  tsizePolicy.setHeightForWidth(sizePolicy().hasHeightForWidth());
  setSizePolicy(tsizePolicy);

  QHBoxLayout *mainLayout = new QHBoxLayout(this);
  mainLayout->setSpacing(5);
  mainLayout->setMargin(0);
  mainLayout->setObjectName(QString::fromUtf8("mainLayout"));

  QVBoxLayout *literalLayout = new QVBoxLayout();
  literalLayout->setSpacing(5);
  literalLayout->setMargin(0);
  literalLayout->setObjectName(QString::fromUtf8("literalLayout"));

  _startDateLit = new QLabel(tr("Start Date:"), this);
  _startDateLit->setObjectName("_startDateLit");
  _startDateLit->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
  literalLayout->addWidget(_startDateLit);

  _endDateLit = new QLabel(tr("End Date:"), this);
  _endDateLit->setObjectName("_endDateLit");
  _endDateLit->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
  literalLayout->addWidget(_endDateLit);

  mainLayout->addLayout(literalLayout);

  QVBoxLayout *dataLayout = new QVBoxLayout();
  dataLayout->setSpacing(5);
  dataLayout->setMargin(0);
  dataLayout->setObjectName(QString::fromUtf8("dataLayout"));

  _startDate = new DLineEdit(this);
  _startDate->setObjectName("_startDate");
  dataLayout->addWidget(_startDate);

  _endDate = new DLineEdit(this);
  _endDate->setObjectName("_endDate");
  dataLayout->addWidget(_endDate);

  mainLayout->addLayout(dataLayout);

  _startDateLit->setBuddy(_startDate);
  _endDateLit->setBuddy(_endDate);

  connect(_startDate, SIGNAL(newDate(const QDate &)), this, SIGNAL(updated()));
  connect(_endDate,   SIGNAL(newDate(const QDate &)), this, SIGNAL(updated()));

  //setTabOrder(_startDate, _endDate);
  //setTabOrder(_endDate, _startDate);
  setFocusProxy(_startDate);
}
ConfirmAddressConfigureTabWidget::ConfirmAddressConfigureTabWidget(QWidget *parent)
    : QWidget(parent),
      mIdentity(0)
{
    QVBoxLayout *mainLayout = new QVBoxLayout(this);
    mainLayout->setObjectName(QStringLiteral("mainlayout"));
    mainLayout->setMargin(0);

    QGroupBox *groupBoxDomainName = new QGroupBox(this);
    groupBoxDomainName->setObjectName(QStringLiteral("groupboxdomainname"));
    mainLayout->addWidget(groupBoxDomainName);
    QVBoxLayout *layoutDomainName = new QVBoxLayout(groupBoxDomainName);
    layoutDomainName->setObjectName(QStringLiteral("layoutdomainname"));

    QHBoxLayout *radioButtonLayout = new QHBoxLayout;
    layoutDomainName->addLayout(radioButtonLayout);
    radioButtonLayout->setAlignment(Qt::AlignHCenter);

    mAcceptedDomain = new QRadioButton(i18n("Accepted Domain Name"), this);
    mAcceptedDomain->setObjectName(QStringLiteral("acceptdomainname"));
    radioButtonLayout->addWidget(mAcceptedDomain);
    mAcceptedDomain->setChecked(true);

    mRejectedDomain = new QRadioButton(i18n("Rejected Domain Name"), this);
    mRejectedDomain->setObjectName(QStringLiteral("rejectdomainname"));
    radioButtonLayout->addWidget(mRejectedDomain);

    PimCommon::SimpleStringListEditor::ButtonCode buttonCode =
        static_cast<PimCommon::SimpleStringListEditor::ButtonCode>(PimCommon::SimpleStringListEditor::Add | PimCommon::SimpleStringListEditor::Remove | PimCommon::SimpleStringListEditor::Modify);
    mDomainNameListEditor =
        new PimCommon::SimpleStringListEditor(groupBoxDomainName, buttonCode,
                i18n("A&dd..."), i18n("Re&move"),
                i18n("Mod&ify..."),
                i18n("Enter new domain name:"));
    mDomainNameListEditor->setObjectName(QStringLiteral("domainnamelisteditor"));
    connect(mDomainNameListEditor, &PimCommon::SimpleStringListEditor::changed,
            this, &ConfirmAddressConfigureTabWidget::configureChanged);
    layoutDomainName->addWidget(mDomainNameListEditor);

    QGroupBox *groupBoxWhiteList = new QGroupBox(i18n("Whitelist of Addresses"), this);
    groupBoxWhiteList->setObjectName(QStringLiteral("groupboxwhitelist"));
    mainLayout->addWidget(groupBoxWhiteList);
    QVBoxLayout *layoutWhiteList = new QVBoxLayout(groupBoxWhiteList);
    layoutWhiteList->setObjectName(QStringLiteral("layoutwhitelist"));

    buttonCode =
        static_cast<PimCommon::SimpleStringListEditor::ButtonCode>(PimCommon::SimpleStringListEditor::Add | PimCommon::SimpleStringListEditor::Remove | PimCommon::SimpleStringListEditor::Modify);
    mWhiteListEditor =
        new PimCommon::SimpleStringListEditor(groupBoxWhiteList, buttonCode,
                i18n("A&dd..."), i18n("Re&move"),
                i18n("Mod&ify..."),
                i18n("Enter new email address:"));
    mWhiteListEditor->setObjectName(QStringLiteral("whitelisteditor"));
    layoutWhiteList->addWidget(mWhiteListEditor);
    connect(mWhiteListEditor, &PimCommon::SimpleStringListEditor::changed,
            this, &ConfirmAddressConfigureTabWidget::configureChanged);
}
Example #3
0
URLWatcherPlugin::URLWatcherPlugin()
{
	viewer_ = new QWidget();
	QVBoxLayout *vboxLayout;
	QFrame *frame;
	QLabel *label;
	vboxLayout = new QVBoxLayout(viewer_);
	vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
	frame = new QFrame(viewer_);
	frame->setObjectName(QString::fromUtf8("frame"));
	frame->setFrameShape(QFrame::StyledPanel);
	frame->setFrameShadow(QFrame::Raised);
	viewerText_ = new QTextEdit(frame);
	viewerText_->setObjectName(QString::fromUtf8("text"));
	viewerText_->setReadOnly(true);

	

	label = new QLabel(viewer_);
	label->setObjectName(QString::fromUtf8("label"));
	label->setText("URLs");
	vboxLayout->addWidget(label);
	vboxLayout->addWidget(viewerText_);
	viewer_->show();
}
    void setupUi(QDialog *Dialog)
    {
    Dialog->setObjectName(QString::fromUtf8("Dialog"));
    verticalLayout = new QWidget(Dialog);
    verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
    verticalLayout->setGeometry(QRect(9, 9, 215, 89));
    vboxLayout = new QVBoxLayout(verticalLayout);
    vboxLayout->setSpacing(6);
    vboxLayout->setMargin(0);
    vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
    labelTimeLeft = new QLabel(verticalLayout);
    labelTimeLeft->setObjectName(QString::fromUtf8("labelTimeLeft"));
    vboxLayout->addWidget(labelTimeLeft);
    
    labelImages = new QLabel(verticalLayout);
    labelImages->setObjectName(QString::fromUtf8("labelImages"));
    vboxLayout->addWidget(labelImages);

    progressBar = new QProgressBar(verticalLayout);
    progressBar->setObjectName(QString::fromUtf8("progressBar"));
    progressBar->setValue(0);
    progressBar->setOrientation(Qt::Horizontal);

    vboxLayout->addWidget(progressBar);


    retranslateUi(Dialog);

    QSize size(236, 111);
    size = size.expandedTo(Dialog->minimumSizeHint());
    Dialog->resize(size);


    QMetaObject::connectSlotsByName(Dialog);
    } // setupUi
Example #5
0
void SofaModeler::createTab()
{
    QWidget *newtab = new QWidget();
    tabGraph = newtab;
    QVBoxLayout *currentTabLayout = new QVBoxLayout(newtab);
    currentTabLayout->setObjectName(QString("ModelerScene"));
    sceneTab->addTab(newtab, QString("New Scene"));
    GraphModeler* modelerGraph = new GraphModeler(newtab,"Modeler");
    mapGraph.insert(std::make_pair(newtab, modelerGraph));
    mapGraph[newtab] = modelerGraph;
    graph = modelerGraph;

    graph->setAcceptDrops(true);
    currentTabLayout->addWidget(graph,0,0);

    graph->setSofaLibrary(library);
    graph->setPropertyWidget(propertyWidget);
    graph->setPreset(preset);
    fileNew();

    connect(graph, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(changeInformation(QTreeWidgetItem *,QTreeWidgetItem*)));
    connect(graph, SIGNAL( fileOpen(const QString&)), this, SLOT(fileOpen(const QString&)));
    connect(graph, SIGNAL( undoEnabled(bool)), this, SLOT(setUndoEnabled(bool)));
    connect(graph, SIGNAL( redoEnabled(bool)), this, SLOT(setRedoEnabled(bool)));
    connect(graph, SIGNAL( graphModified(bool)), this, SLOT(graphModifiedNotification(bool)));
    connect(graph, SIGNAL( displayMessage(const std::string&)), this, SLOT(displayMessage(const std::string &)));
}
Example #6
0
void TwitterApiShowThread::setupUi()
{
    kDebug();
    QVBoxLayout *gridLayout;
    QScrollArea *scrollArea;
    QWidget *scrollAreaWidgetContents;
    QVBoxLayout *verticalLayout_2;
    QSpacerItem *verticalSpacer;
    gridLayout = new QVBoxLayout(this);
    gridLayout->setMargin(0);
    gridLayout->setObjectName("gridLayout");
    scrollArea = new QScrollArea(this);
    scrollArea->setObjectName("scrollArea");
    scrollArea->setFrameShape(QFrame::NoFrame);
    scrollArea->setWidgetResizable(true);
    scrollAreaWidgetContents = new QWidget();
    scrollAreaWidgetContents->setObjectName("scrollAreaWidgetContents");
    scrollAreaWidgetContents->setGeometry(QRect(0, 0, 254, 300));
    verticalLayout_2 = new QVBoxLayout(scrollAreaWidgetContents);
    verticalLayout_2->setMargin(1);
    d->mainLayout = new QVBoxLayout();
    verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

    d->mainLayout->addItem(verticalSpacer);
    d->mainLayout->setSpacing(3);
    d->mainLayout->setMargin(1);

    verticalLayout_2->addLayout(d->mainLayout);

    scrollArea->setWidget(scrollAreaWidgetContents);

    gridLayout->addWidget(scrollArea);
}
Example #7
0
void TabDeckEditor::createFiltersDock()
{
    filterModel = new FilterTreeModel();
    filterModel->setObjectName("filterModel");
    databaseDisplayModel->setFilterTree(filterModel->filterTree());
    databaseDisplayModel->setObjectName("databaseDisplayModel");
    filterView = new QTreeView;
    filterView->setObjectName("filterView");
    filterView->setModel(filterModel);
    filterView->setUniformRowHeights(true);
    filterView->setHeaderHidden(true);
    filterView->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(filterModel, SIGNAL(layoutChanged()), filterView, SLOT(expandAll()));
    connect(filterView, SIGNAL(customContextMenuRequested(const QPoint &)),this, SLOT(filterViewCustomContextMenu(const QPoint &)));

    FilterBuilder *filterBuilder = new FilterBuilder;
    filterBuilder->setObjectName("filterBuilder");
    connect(filterBuilder, SIGNAL(add(const CardFilter *)), filterModel, SLOT(addFilter(const CardFilter *)));

    QToolButton *filterDelOne = new QToolButton();
    filterDelOne->setObjectName("filterDelOne");
    filterDelOne->setDefaultAction(aClearFilterOne);
    filterDelOne->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);

    QToolButton *filterDelAll = new QToolButton();
    filterDelAll->setObjectName("filterDelAll");
    filterDelAll->setDefaultAction(aClearFilterAll);
    filterDelAll->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);

    QGridLayout *filterLayout = new QGridLayout;
    filterLayout->setObjectName("filterLayout");
    filterLayout->setContentsMargins(0,0,0,0);
    filterLayout->addWidget(filterBuilder, 0, 0, 1, 3);
    filterLayout->addWidget(filterView, 1, 0, 1, 3);
    filterLayout->addWidget(filterDelOne, 2, 0, 1, 1);
    filterLayout->addWidget(filterDelAll, 2, 2, 1, 1);

    filterBox = new QWidget();
    filterBox->setObjectName("filterBox");
    filterBox->setLayout(filterLayout);

    QVBoxLayout *filterFrame = new QVBoxLayout;
    filterFrame->setObjectName("filterFrame");
    filterFrame->addWidget(filterBox);

    filterDock = new QDockWidget(MainWindow);
    filterDock->setObjectName("filterDock");

    filterDock->setFeatures(QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable);
    QWidget *filterDockContents = new QWidget(MainWindow);
    filterDockContents->setObjectName("filterDockContents");
    filterDockContents->setLayout(filterFrame);
    filterDock->setWidget(filterDockContents);    

    connect(btnFilter,SIGNAL(toggled(bool)),filterDock,SLOT(setVisible(bool)));
    filterDock->installEventFilter(this);
}
Example #8
0
void BasicSettingsDlg::setupUI(QDialog *dlg, enum PerformanceLevel lvl) {
  // Erase old layout/info.
  qDeleteAll(dlg->children());

  dlg->setWindowTitle("ImageVis3D Settings");
  dlg->setObjectName(QString::fromUtf8("BasicSettingsDlg"));
  dlg->setWindowModality(Qt::ApplicationModal);
  dlg->resize(300, 150);
  dlg->setContextMenuPolicy(Qt::DefaultContextMenu);
  dlg->setSizeGripEnabled(true);
  dlg->setModal(true);

  QVBoxLayout* vlayout = new QVBoxLayout(this);
  vlayout->setObjectName(QString::fromUtf8("vlayout"));

  // perf / slider / and a description of the current setting
  QHBoxLayout* hPerf = new QHBoxLayout();
  QLabel* lPerf = new QLabel("Performance:");
  this->slPerf = new QSlider();
  this->slPerf->setOrientation(Qt::Horizontal);
  this->slPerf->setMinimum(MAX_RESPONSIVENESS);
  this->slPerf->setMaximum(MAX_PERFORMANCE);
  this->slPerf->setMinimumSize(QSize(75, 20));
  this->slPerf->setTickPosition(QSlider::TicksBelow);
  this->slPerf->setTickInterval(1);
  this->slPerf->setValue(int(lvl));
  this->lDesc = new QLabel("Favor more responsive behavior.");
  QSizePolicy lblPol(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
  lblPol.setHorizontalStretch(1);
  lblPol.setVerticalStretch(1);
  this->lDesc->setSizePolicy(lblPol);
  this->lDesc->setAlignment(Qt::AlignJustify | Qt::AlignVCenter);
  this->lDesc->setWordWrap(true);
  hPerf->addWidget(lPerf);
  hPerf->addWidget(this->slPerf);
  hPerf->addWidget(this->lDesc);

  // buttons: we put them in a layout so we can add an 'advanced' one.
  QHBoxLayout* hbuttons = new QHBoxLayout();
  QDialogButtonBox* bbox = new QDialogButtonBox();
  QPushButton* btnAdvanced = new QPushButton("Advanced");
  bbox->setOrientation(Qt::Horizontal);
  bbox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
  hbuttons->addWidget(btnAdvanced);
  hbuttons->addWidget(bbox);

  vlayout->addLayout(hPerf);
  vlayout->addLayout(hbuttons);
  this->setLayout(vlayout);

  connect(slPerf, SIGNAL(valueChanged(int)), dlg, SLOT(PerfLevelChanged(int)));
  connect(bbox, SIGNAL(accepted()), dlg, SLOT(accept()));
  connect(bbox, SIGNAL(rejected()), dlg, SLOT(reject()));
  connect(btnAdvanced, SIGNAL(clicked()), dlg, SLOT(AdvancedFeatures()));
  this->PerfLevelChanged(int(lvl));
}
PrintSelectPageWidget::PrintSelectPageWidget(QWidget *parent)
    : QWidget(parent)
{
    QVBoxLayout *mainLayout = new QVBoxLayout(this);
    mainLayout->setObjectName(QStringLiteral("mainlayout"));
    mainLayout->setMargin(0);

    mListPage = new QListWidget(this);
    mListPage->setObjectName(QStringLiteral("listpage"));
    mainLayout->addWidget(mListPage);
}
Example #10
0
/**
 * Initialize the User interface
 */
void Doppelclick::initializeUi(void) 
{
	/* Settings for the Main Window */
	setWindowTitle("Doppelclick Spiel");

	/* Settings for the MainLayout */
	QVBoxLayout *mainLayout = new QVBoxLayout(this);
	mainLayout->setObjectName("MainLayout");

	/* Layout for Button and smilies */
	QHBoxLayout *doppelLayout = new QHBoxLayout();
	doppelLayout->setObjectName("DoppelLayout");

	/* Settings for the doppelButton */
	doppelButton = new QPushButton("Doppelclick");
	doppelButton->setObjectName("DoppelButton");
	doppelButton->setMinimumHeight(100);
	doppelButton->setMinimumWidth(100);

	gameIcon = new QLabel(NEUTRAL);

	/* Settings for Difficulty Slider*/
	diffiSlider = new QSlider();
	diffiSlider->setMinimum(1);
    diffiSlider->setMaximum(3);

	doppelLayout->addWidget(doppelButton);
	doppelLayout->addWidget(gameIcon);

	/* Place for the difficult settings */
	QGroupBox *difficultBox = new QGroupBox(tr("Schwierigkeit"));
	QHBoxLayout *difficultLayout = new QHBoxLayout();
	QVBoxLayout *tickLabelLayout = new QVBoxLayout();

	tickLabelLayout->addWidget(new QLabel("Schwer"));
	tickLabelLayout->addWidget(new QLabel("Normal"));
	tickLabelLayout->addWidget(new QLabel("Leicht"));
	
	difficultLayout->addWidget(diffiSlider);
	difficultLayout->addLayout(tickLabelLayout);
	difficultBox->setLayout(difficultLayout);


	doppelLayout->addWidget(difficultBox);
	
	/* Settings for the gameState */
	QLabel *line = new QLabel("<hr>");
	gameStateLabel = new QLabel("<b>Bereit ...</b>");

	/* Add widgets to the MainLayout */
	mainLayout->insertLayout(-1, doppelLayout, 0);
	mainLayout->addWidget(line);
	mainLayout->addWidget(gameStateLabel);
}
Example #11
0
    void setupUi(QDialog *ExportToDialog)
    {
        if (ExportToDialog->objectName().isEmpty())
            ExportToDialog->setObjectName(QString::fromUtf8("ExportToDialog"));
        ExportToDialog->resize(289, 300);
        vboxLayout = new QVBoxLayout(ExportToDialog);
#ifndef Q_OS_MAC
        vboxLayout->setSpacing(6);
#endif
#ifndef Q_OS_MAC
        vboxLayout->setContentsMargins(9, 9, 9, 9);
#endif
        vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
        label = new QLabel(ExportToDialog);
        label->setObjectName(QString::fromUtf8("label"));

        vboxLayout->addWidget(label);

        formats_listWidget = new QListWidget(ExportToDialog);
        formats_listWidget->setObjectName(QString::fromUtf8("formats_listWidget"));

        vboxLayout->addWidget(formats_listWidget);

        hboxLayout = new QHBoxLayout();
#ifndef Q_OS_MAC
        hboxLayout->setSpacing(6);
#endif
        hboxLayout->setContentsMargins(0, 0, 0, 0);
        hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
        spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum);

        hboxLayout->addItem(spacerItem);

        okButton = new QPushButton(ExportToDialog);
        okButton->setObjectName(QString::fromUtf8("okButton"));

        hboxLayout->addWidget(okButton);

        cancelButton = new QPushButton(ExportToDialog);
        cancelButton->setObjectName(QString::fromUtf8("cancelButton"));

        hboxLayout->addWidget(cancelButton);


        vboxLayout->addLayout(hboxLayout);


        retranslateUi(ExportToDialog);
        QObject::connect(okButton, SIGNAL(clicked()), ExportToDialog, SLOT(accept()));
        QObject::connect(cancelButton, SIGNAL(clicked()), ExportToDialog, SLOT(reject()));

        QMetaObject::connectSlotsByName(ExportToDialog);
    } // setupUi
void MainWindow::createStartAppDialog() {
    startAppDialog = new QDialog( this );
    startAppDialog->setObjectName( "main startapp" );
    startAppDialog->setWindowTitle( "Start new application" );

    // main layout
    QVBoxLayout *layout = new QVBoxLayout( startAppDialog );
    layout->setObjectName("main find");

    // group box with title
    QGroupBox *groupBox = new QGroupBox();
    groupBox->setObjectName("main start app group");
    groupBox->setTitle( "Start Application:" );

    // groupBox layout
    QGridLayout *groupBoxLayout = new QGridLayout( groupBox );
    groupBoxLayout->setObjectName("main start app group");


    // widgets
    startAppDialogTextLineEdit = new QLineEdit(this);

    startAppDialogWithTestability = new QCheckBox( "With -&testability argument" );
    startAppDialogWithTestability->setObjectName("main startapp withtestability");
    startAppDialogWithTestability->setCheckState( Qt::Checked );

    startAppDialogStartButton = new QPushButton( "&Start", this );
    startAppDialogStartButton->setObjectName("main startapp start");
    startAppDialogStartButton->setDisabled(true);
    startAppDialogStartButton->setDefault( false );
    startAppDialogStartButton->setAutoDefault( false );

    startAppDialogCloseButton = new QPushButton( "&Close", this );
    startAppDialogCloseButton->setObjectName("main startapp close");
    startAppDialogCloseButton->setDefault( false );
    startAppDialogCloseButton->setAutoDefault( false );

    // layout placement

    groupBoxLayout->addWidget( startAppDialogTextLineEdit, 0, 0, 1, 3);
    groupBoxLayout->addWidget( startAppDialogWithTestability, 1, 0);
    groupBoxLayout->addWidget( startAppDialogStartButton, 1, 1);
    groupBoxLayout->addWidget( startAppDialogCloseButton, 1, 2 );

    layout->addWidget( groupBox );

    // signals to slots

    connect( startAppDialogTextLineEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( startAppDialogEnableStartButton(const QString &) ) );
    connect( startAppDialogTextLineEdit, SIGNAL( returnPressed() ), this, SLOT( startAppDialogReturnPress() ) );
    connect( startAppDialogStartButton, SIGNAL( clicked() ), this, SLOT( startApp() ) );
    connect( startAppDialogCloseButton, SIGNAL( clicked() ), this, SLOT( closeStartAppDialog() ) );
}
Example #13
0
void MultisigDialog::on_addDestinationButton_clicked()
{
    QFrame* destinationFrame = new QFrame(ui->destinationsScrollAreaContents);
    destinationFrame->setObjectName(QStringLiteral("destinationFrame"));
    destinationFrame->setFrameShape(QFrame::StyledPanel);
    destinationFrame->setFrameShadow(QFrame::Raised);

    QVBoxLayout* frameLayout = new QVBoxLayout(destinationFrame);
    frameLayout->setObjectName(QStringLiteral("destinationFrameLayout"));
    QHBoxLayout* destinationLayout = new QHBoxLayout();
    destinationLayout->setSpacing(0);
    destinationLayout->setObjectName(QStringLiteral("destinationLayout"));
    QLabel* destinationAddressLabel = new QLabel(destinationFrame);
    destinationAddressLabel->setObjectName(QStringLiteral("destinationAddressLabel"));

    destinationLayout->addWidget(destinationAddressLabel);

    QValidatedLineEdit* destinationAddress = new QValidatedLineEdit(destinationFrame);
    destinationAddress->setObjectName(QStringLiteral("destinationAddress"));

    destinationLayout->addWidget(destinationAddress);

    QSpacerItem* horizontalSpacer = new QSpacerItem(10, 20, QSizePolicy::Fixed, QSizePolicy::Minimum);
    destinationLayout->addItem(horizontalSpacer);

    QLabel* destinationAmountLabel = new QLabel(destinationFrame);
    destinationAmountLabel->setObjectName(QStringLiteral("destinationAmountLabel"));

    destinationLayout->addWidget(destinationAmountLabel);

    BitcoinAmountField* destinationAmount = new BitcoinAmountField(destinationFrame);
    destinationAmount->setObjectName(QStringLiteral("destinationAmount"));

    destinationAddressLabel->setText(QApplication::translate("MultisigDialog", strprintf("%i. Address: ", ui->destinationsList->count()+1).c_str(), 0));
    destinationAmountLabel->setText(QApplication::translate("MultisigDialog", "Amount: ", 0));

    destinationLayout->addWidget(destinationAmount);

    QPushButton* destinationDeleteButton = new QPushButton(destinationFrame);
    destinationDeleteButton->setObjectName(QStringLiteral("destinationDeleteButton"));
    QIcon icon;
    icon.addFile(QStringLiteral(":/icons/remove"), QSize(), QIcon::Normal, QIcon::Off);
    destinationDeleteButton->setIcon(icon);
    destinationDeleteButton->setAutoDefault(false);
    connect(destinationDeleteButton, SIGNAL(clicked()), this, SLOT(deleteFrame()));
    destinationLayout->addWidget(destinationDeleteButton);

    frameLayout->addLayout(destinationLayout);

    ui->destinationsList->addWidget(destinationFrame);
}
    void setupUi(QWidget *HelloWorld)
    {
        HelloWorld->setObjectName(QString::fromUtf8("HelloWorld"));

        vboxLayout = new QVBoxLayout(HelloWorld);
        vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));

        pushButton = new QPushButton(HelloWorld);
        pushButton->setObjectName(QString::fromUtf8("pushButton"));

        vboxLayout->addWidget(pushButton);

        retranslateUi(HelloWorld);
    }
Example #15
0
BreakpointsWindow::BreakpointsWindow(running_machine* machine, QWidget* parent) :
	WindowQt(machine, nullptr)
{
	setWindowTitle("Debug: All Breakpoints");

	if (parent != nullptr)
	{
		QPoint parentPos = parent->pos();
		setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400);
	}

	//
	// The main frame and its input and breakpoints widgets
	//
	QFrame* mainWindowFrame = new QFrame(this);

	// The main breakpoints view
	m_breakpointsView = new DebuggerView(DVT_BREAK_POINTS, m_machine, this);

	// Layout
	QVBoxLayout* vLayout = new QVBoxLayout(mainWindowFrame);
	vLayout->setObjectName("vlayout");
	vLayout->setSpacing(3);
	vLayout->setContentsMargins(2,2,2,2);
	vLayout->addWidget(m_breakpointsView);

	setCentralWidget(mainWindowFrame);

	//
	// Menu bars
	//
	QActionGroup* typeGroup = new QActionGroup(this);
	typeGroup->setObjectName("typegroup");
	QAction* typeBreak = new QAction("Breakpoints", this);
	typeBreak->setObjectName("typebreak");
	QAction* typeWatch = new QAction("Watchpoints", this);
	typeWatch->setObjectName("typewatch");
	typeBreak->setCheckable(true);
	typeWatch->setCheckable(true);
	typeBreak->setActionGroup(typeGroup);
	typeWatch->setActionGroup(typeGroup);
	typeBreak->setShortcut(QKeySequence("Ctrl+1"));
	typeWatch->setShortcut(QKeySequence("Ctrl+2"));
	typeBreak->setChecked(true);
	connect(typeGroup, &QActionGroup::triggered, this, &BreakpointsWindow::typeChanged);

	// Assemble the options menu
	QMenu* optionsMenu = menuBar()->addMenu("&Options");
	optionsMenu->addActions(typeGroup->actions());
}
Example #16
0
observateurTexte::observateurTexte(Othello * othellier, QPoint  pos) : QLabel(){

	   setWindowTitle("Observateur Texte");
	   this->move(pos.x() + 300, pos.y());
	   Qt::WindowFlags flags = 0;
	   QFont sansFont("Lucida Console", 12);		//police à utiliser
	   sansFont.setWordSpacing(5);
	   flags |= Qt::CustomizeWindowHint;
	   flags |= Qt::WindowTitleHint;
	   setWindowFlags(flags);
	   this->setMinimumWidth(650);
	   this->setFont(sansFont);						//défini la police


	   QHBoxLayout *horizontalLayout;
	   QScrollArea *scrollArea;
	   QWidget *scrollAreaWidgetContents;
	   QVBoxLayout *verticalLayout;

	   horizontalLayout = new QHBoxLayout(this);
       horizontalLayout->setSpacing(6);
       horizontalLayout->setContentsMargins(11, 11, 11, 11);
       horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
       vuePlateau = new QLabel(this);
       vuePlateau->setObjectName(QString::fromUtf8("vuePlateau"));
       horizontalLayout->addWidget(vuePlateau);
       scrollArea = new QScrollArea(this);
       //scrollArea->setFixedWidth(185);
       scrollArea->setMinimumWidth(185);
       scrollArea->setObjectName(QString::fromUtf8("scrollArea"));
       scrollArea->setWidgetResizable(true);
       scrollAreaWidgetContents = new QWidget();
       scrollAreaWidgetContents->setObjectName(QString::fromUtf8("scrollAreaWidgetContents"));
       scrollAreaWidgetContents->setGeometry(QRect(0, 0, 285, 642));
       verticalLayout = new QVBoxLayout(scrollAreaWidgetContents);
       verticalLayout->setSpacing(6);
       verticalLayout->setContentsMargins(11, 11, 11, 11);
       verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
       listeCoups = new QLabel(scrollAreaWidgetContents);
       listeCoups->setObjectName(QString::fromUtf8("listeCoups"));
       listeCoups->setAlignment(Qt::AlignLeft|Qt::AlignTop);
       verticalLayout->addWidget(listeCoups);
       scrollArea->setWidget(scrollAreaWidgetContents);
       vuePlateau->raise();
       listeCoups->raise();
       horizontalLayout->addWidget(scrollArea);

	   oth = othellier;
}
void ScrollableTextDisplay1::setupUI(){


    ui->allRoutesScrollArea->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
    ui->allRoutesscrollAreaWidgetContents->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);

    QGroupBox *wrapper = new QGroupBox();
    wrapper->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
    wrapper->setObjectName("wrapperGroupBox");

    QVBoxLayout *wrapperVerticalLayout = new QVBoxLayout;
    wrapperVerticalLayout->setObjectName("wrapperVerticalLayout");

    QString widgetName = "displayGLText1RouteWidget_";
    QSpacerItem *verticalSpacer = new QSpacerItem(0,50);



    int totalNumberOfRows = 0;

    Route tempRoute;
    SubRoute tempSubRoute;


    //generate as many GL widgets as there are number of routes
    for(int i = 0 ; i < allRoutes->getRoutes().size(); i++){

        totalNumberOfRows = 0;
        //calculate size here
        tempRoute = allRoutes->getRoutes().at(i);
        for(int j = 0 ; j <  tempRoute.getSubRoutes().size(); j++){
            tempSubRoute = tempRoute.getSubRoutes().at(j);
            totalNumberOfRows += tempSubRoute.getLegs().size();
        }

        QSize glWindowSize;
        glWindowSize.setHeight((totalNumberOfRows + 2)*heightPerRow);  // +2 is for the top and bottom margins which will have same height as the rows
        glWindowSize.setWidth(0); // This is dummy, the actual value is set in the widget itself

        DisplayGLText1RouteWidget *displayGLText1RouteWidget = new DisplayGLText1RouteWidget((allRoutes->getRoutes().at(i)),glWindowSize, heightPerRow);
        displayGLText1RouteWidget->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
        displayGLText1RouteWidget->setObjectName(widgetName + QString::number(i));
        wrapperVerticalLayout->addWidget(displayGLText1RouteWidget);
        wrapperVerticalLayout->addSpacerItem(verticalSpacer);
    }

    wrapper->setLayout(wrapperVerticalLayout);
    ui->allRoutesScrollArea->setWidget(wrapper);
}
ZoneListWidget::ZoneListWidget(QWidget* parent):QWidget(parent)
{
    mDragData.Object = 0;
    mDragData.ObjectType = "";
    mDragData.Parameters.clear();

    QVBoxLayout* verticalLayout = new QVBoxLayout(this);

    verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
    QHBoxLayout* horizontalLayout = new QHBoxLayout();
    horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
    filterBox = new QLineEdit(this);
    filterBox->setObjectName(QString::fromUtf8("filterBox"));

    horizontalLayout->addWidget(filterBox);

    clearFilterButton = new QToolButton(this);
    clearFilterButton->setObjectName(QString::fromUtf8("clearFilterButton"));
    clearFilterButton->setIcon(QIcon(":/icons/refresh.svg"));

    horizontalLayout->addWidget(clearFilterButton);
    horizontalLayout->setMargin(0);

    verticalLayout->addLayout(horizontalLayout);

    listWidget = new QListWidget(this);
    listWidget->setViewMode(QListView::IconMode);
    listWidget->setGridSize(QSize(64,64));
    listWidget->setFlow(QListView::LeftToRight);
    listWidget->setIconSize(QSize(48,48));
    listWidget->setDragDropMode(QAbstractItemView::DragOnly);
    listWidget->setWordWrap(true);
    listWidget->setMouseTracking(true);

    verticalLayout->addWidget(listWidget);
    verticalLayout->setMargin(0);

    QObject::connect(clearFilterButton, SIGNAL(clicked()), filterBox, SLOT(clear()));
    QObject::connect(filterBox, SIGNAL(textChanged(QString)), this, SLOT(filterBoxTextChanged(QString)));

    OgitorsRoot::getSingletonPtr()->RegisterDragDropHandler((void*)listWidget, this);

    EventManager::getSingletonPtr()->connectEvent(EventManager::LOAD_STATE_CHANGE, this, true, 0, true, 0, EVENT_CALLBACK(ZoneListWidget, onSceneLoadStateChange));

    /*this->setWindowTitle(QString::fromUtf8("Zones"));
    this->setWindowIconText("../Plugins/Icons/zone.svg");*/
}
void CComputerConfViewPrivate::setupUI()
{
	m_ptrPublic->setObjectName(QString::fromUtf8("ComputerConfView"));
	//////////////////////////////////////////////////////////////////////////
	QVBoxLayout * ptrHorizontalLayout = new QVBoxLayout(m_ptrPublic);
	ptrHorizontalLayout->setContentsMargins(1, 1, 1, 1);
	ptrHorizontalLayout->setSpacing(0);
	ptrHorizontalLayout->setObjectName(QString::fromUtf8("ptrHorizontalLayout"));
	//////////////////////////////////////////////////////////////////////////
	m_ptrScrollArea = new QScrollArea(m_ptrPublic);
	m_ptrScrollArea->setObjectName(QString::fromUtf8("m_ptrScrollArea"));
	m_ptrScrollArea->setFrameShadow(QFrame::Plain);
	m_ptrScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	m_ptrScrollArea->setWidgetResizable(true);

	m_ptrScrollAreaWidgetContents = new QWidget();
	m_ptrScrollAreaWidgetContents->setObjectName(QString::fromUtf8("m_ptrScrollAreaWidgetContents"));
	m_ptrScrollArea->setWidget(m_ptrScrollAreaWidgetContents);
	//////////////////////////////////////////////////////////////////////////
	m_ptrGridLayout = new QGridLayout(m_ptrScrollAreaWidgetContents);
	m_ptrGridLayout->setContentsMargins(1, 1, 1, 1);
	m_ptrGridLayout->setSpacing(4);
	m_ptrGridLayout->setObjectName(QString::fromUtf8("ptrGridLayout"));

	ptrHorizontalLayout->addWidget(m_ptrScrollArea,10);
	//////////////////////////////////////////////////////////////////////////
	QHBoxLayout * ptrHButtonsLayout = new QHBoxLayout;
	
	QSpacerItem * ptrItem = new QSpacerItem(0,0,QSizePolicy::Expanding,QSizePolicy::Expanding);
	ptrHButtonsLayout->addItem(ptrItem);
	QPushButton * ptrAddRow = new QPushButton;
	ptrAddRow->setIcon(QIcon(":/images/plus.png"));
	ptrAddRow->setText("Component");
	connect(ptrAddRow,SIGNAL(clicked ( bool )), this, SLOT(onAddComponent()));
	ptrHButtonsLayout->addWidget(ptrAddRow);

	QPushButton * ptrAddShop = new QPushButton;
	ptrAddShop->setIcon(QIcon(":/images/plus.png"));
	ptrAddShop->setText("Shop");
	connect(ptrAddShop,SIGNAL(clicked ( bool )), this, SLOT(onAddShop()));
	ptrHButtonsLayout->addWidget(ptrAddShop);

	ptrHorizontalLayout->addLayout(ptrHButtonsLayout);
}
Example #20
0
void Listening::createNewTab(QString name)
{
    QWidget *widget = new QWidget();
    widget->setObjectName(QStringLiteral("TAB_TOTO"));

    QVBoxLayout *vertLayout = new QVBoxLayout(widget);
    vertLayout->setSpacing(6);
    vertLayout->setContentsMargins(11, 11, 11, 11);
    vertLayout->setObjectName(QStringLiteral("verticalLayout_14"));

    QTextEdit *textEdit = new QTextEdit(widget);
    textEdit->setObjectName(QStringLiteral("textEdit2"));
    textEdit->setTextInteractionFlags(Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse);

    vertLayout->addWidget(textEdit);

    widget->show();

    this->mainWindow->getUi()->QTabWidget_onglets->addTab(widget, name);
}
Example #21
0
void CSettingsDlgPrivate::setupUI()
{
	m_ptrPublic->setObjectName(QString::fromUtf8("SettingsDlg"));
	mainVerticalLayout = new QVBoxLayout(m_ptrPublic);
	mainVerticalLayout->setObjectName(QString::fromUtf8("mainVerticalLayout"));

	tabWidget = new QTabWidget;
	mainVerticalLayout->addWidget(tabWidget);

	//CSubstituteValuesConfiguration  stSubstituteValuesConfiguration;
  CSubstituteValuesConfigurationDlgInit init_data = 
    { CSubstituteValuesConfiguration(), 
    gSettings->getDigitsConfiguraions(), 
    gSettings->get<std::string>(SELECTED_CONSONANTS_SYSTEM,"").c_str()
    };
	substituteConfiguration.reset(new CSubstituteValuesConfigurationDlg(init_data));
	tabWidget->addTab(substituteConfiguration.get(), "Consonants");

	dictionariesConfiguration.reset(new CDictionariesConfigurationDlg);
	tabWidget->addTab(dictionariesConfiguration.get(), "Dictionaries");
}
Example #22
0
	monthly_care_plan(QWidget* parent):QWidget(parent){
		if (parent->objectName().isEmpty()){
			parent->setObjectName(QString::fromUtf8("monthly_care_plan"));
		}
		parent->resize(800, 480);
		
		QSplitter splitter(Qt::Horizontal);
		
		verticalLayoutWidget = new QWidget(parent);
		verticalLayoutWidget->setObjectName(QString::fromUtf8("verticalLayoutWidget"));
		verticalLayoutWidget->setGeometry(QRect(0, 0, 160, 480));
		verticalLayoutWidget->setMinimumSize(160,480);
		verticalLayout = new QVBoxLayout(verticalLayoutWidget);
		verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
		verticalLayout->setContentsMargins(0, 0, 0, 0);
		care_plan_label = new QLabel(verticalLayoutWidget);
		care_plan_label->setObjectName(QString::fromUtf8("care_plan_label"));
		QFont font;
		font.setPointSize(14);
		care_plan_label->setFont(font);
		care_plan_label->setAlignment(Qt::AlignCenter);

		verticalLayout->addWidget(care_plan_label);

		human_list = new QListWidget(verticalLayoutWidget);
		human_list->setObjectName(QString::fromUtf8("human_list"));
		human_list->setMinimumSize(161,440);
		human_list->setMouseTracking(false);
		human_list->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);

		verticalLayout->addWidget(human_list);

		human_widget = new one_human(this);
		human_widget->setGeometry(161, 0, 800-160, 480);

		this->retranslateUi(parent);

		QMetaObject::connectSlotsByName(parent);
		this->setMinimumSize(300,480);
	}
Example #23
0
void TabDeckEditor::createCardInfoDock()
{
    cardInfo = new CardFrame();
    cardInfo->setObjectName("cardInfo");
    QVBoxLayout *cardInfoFrame = new QVBoxLayout;
    cardInfoFrame->setObjectName("cardInfoFrame");
    cardInfoFrame->addWidget(cardInfo);

    cardInfoDock = new QDockWidget(MainWindow);
    cardInfoDock->setObjectName("cardInfoDock");    

    cardInfoDock->setMinimumSize(QSize(200, 41));
    cardInfoDock->setAllowedAreas(Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea);
    cardInfoDock->setFeatures(QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable);
    QWidget *cardInfoDockContents = new QWidget();
    cardInfoDockContents->setObjectName("cardInfoDockContents");
    cardInfoDockContents->setLayout(cardInfoFrame);
    cardInfoDock->setWidget(cardInfoDockContents);

    connect(btnCard,SIGNAL(toggled(bool)),cardInfoDock,SLOT(setVisible(bool)));
    cardInfoDock->installEventFilter(this);    
}
Example #24
0
QGraphStatWidget::QGraphStatWidget( QWidget* parent, simulation::Node* node, const QString& title, unsigned numberOfCurves )
    : QWidget( parent )
    , _numberOfCurves( numberOfCurves )
    , _node( node )
{
//        QVBoxLayout *layout = new QVBoxLayout( this, 0, 1, QString( "tabStats" ) + title );
    QVBoxLayout *layout = new QVBoxLayout(this);
    layout->setMargin(0);
    layout->setSpacing(1);
    layout->setObjectName(QString( "tabStats" ) + title);

    _graph = new QwtPlot( QwtText( title ), this );


    _graph->setAxisTitle( QwtPlot::xBottom, "Time (s)" );
    _graph->setTitle( title );
    _graph->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );

    layout->addWidget( _graph );

    _curves.resize( _numberOfCurves );
    _YHistory.resize( _numberOfCurves );
}
Example #25
0
    void setupUI(SAChartNormalSetWidget* par)
    {
        parentClass = par;
        par->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
        chart = nullptr;
        verticalLayout = new QVBoxLayout(par);
        par->setObjectName(QStringLiteral("SAChartNormalSetWidget"));
        //Title
        titleEdit = new SALineEditPropertyItem();
        titleEdit->setObjectName("titleEdit");
        par->connect(titleEdit,&SALineEditPropertyItem::textChanged
                     ,par,&SAChartNormalSetWidget::onTitleTextChanged);
        //Footer
        footerEdit = new SALineEditPropertyItem();
        footerEdit->setObjectName("footerEdit");
        par->connect(footerEdit,&SALineEditPropertyItem::textChanged
                     ,par,&SAChartNormalSetWidget::onFooterTextChanged);
        //Canvas Background
        canvasBackgroundEdit = new SAColorSetPropertyItem();
        par->connect(canvasBackgroundEdit,&SAColorSetPropertyItem::colorChanged
                     ,par,&SAChartNormalSetWidget::onCanvasBackgroundColorChanged);
        //borderRadius
        borderRadiusEdit = new SADoubleSpinBoxPropertyItem();
        par->connect(borderRadiusEdit,&SADoubleSpinBoxPropertyItem::valueChanged
                     ,par,&SAChartNormalSetWidget::onBorderRadiusChanged);

        verticalLayout->setSpacing(8);
        verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
        verticalLayout->setContentsMargins(4, 4, 4, 4);
        verticalLayout->addWidget(titleEdit);
        verticalLayout->addWidget(footerEdit);
        verticalLayout->addWidget(canvasBackgroundEdit);
        verticalLayout->addWidget(borderRadiusEdit);
        verticalLayout->addStretch();

        retranslateUi(par);
    }
Example #26
0
File: aba.cpp Project: helderc/hIP
Aba::Aba(QWidget *parent) :
    QWidget(parent)
{
    // Layout "mae" do widget
    QVBoxLayout *vertLayout = new QVBoxLayout(this);
    vertLayout->setObjectName(QStringLiteral("verticalLayout"));
    vertLayout->setContentsMargins(0,0,0,0);

    // Area de Texto: Criacao e configuracao
    textEdit = new QPlainTextEdit(this);

    QFont font("Monospace");
    font.setStyleHint(QFont::Monospace);
    font.setPointSize(12);
    textEdit->setFont(font);
    textEdit->setReadOnly(true);

    vertLayout->addWidget(textEdit);

    QHBoxLayout *horLayout = new QHBoxLayout();
    horLayout->setObjectName(QStringLiteral("horizontalLayout"));
    horLayout->setContentsMargins(0,0,0,5);

    btnSalvar = new QPushButton(QIcon(":/new/icones/icones/document-save.png"),
                                "Salvar .csv",
                                this);

    // Espacador par deixar o botao no canto direito
    QSpacerItem *horSpacer = new QSpacerItem(0, 0,
                                             QSizePolicy::Expanding,
                                             QSizePolicy::Minimum);
    horLayout->addItem(horSpacer);
    horLayout->addWidget(btnSalvar);

    vertLayout->addLayout(horLayout);

}
Example #27
0
ComparisonWindow::ComparisonWindow(QWidget *parent, CSample* sample, vector<CSample*>& learn) : QDialog(parent) {
	setupUi(this);
	spectroDraw->setSample(sample, false);
	QVBoxLayout * myVBox = new QVBoxLayout(frame);
	myVBox->setSpacing(1);
	myVBox->setMargin(1);
	myVBox->setObjectName(QString::fromUtf8("myVBox"));

	CCompareResults cr[learn.size()];
	for (uint i=0; i<learn.size(); i++){
		cr[i].sample = learn[i];
		cr[i].diff = cr[i].sample->differ(*sample);
	}
	sort (&cr[0], &cr[learn.size()]);
	spectros.resize(COUNT);
	QString txt;
	char buf[50];
	for (uint i=0; i<COUNT; i++){
		spectros[i] = new SpectroDraw(frame);
		spectros[i]->setObjectName(QString("learningSpectro") + i);
    spectros[i]->setMinimumSize(QSize(250, 160));
		spectros[i]->setSample(cr[i].sample, false);
		sprintf(buf, "%s (%3.2g)", cr[i].sample->getName().c_str(), cr[i].diff);
		spectros[i]->setDescription(buf);
		myVBox->addWidget(spectros[i]);
		sprintf(buf, "Spectro%d (%f)\n", i, cr[i].diff);
		txt += buf;
		int count = min(cr[i].sample->getFreqCount(), sample->getFreqCount());
		for (int j=0; j<count; j++){
			double tmp = sample->getFrequencies()[j].differ(cr[i].sample->getFrequencies()[j]);
			sprintf(buf, "[%d] = %f\n", j, tmp);
			txt += buf;
		}
		txt += '\n';
	}
	textBrowser->setPlainText(txt);
}
Example #28
0
comment::comment( QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl ) :
  QDialog( parent, fl )
{
  if(name)
    setObjectName(name);
  setWindowTitle(tr("Comment"));
  if(modal)
    setWindowModality(Qt::WindowModal);

  _commentid = -1;
  _targetId = -1;
  _mode = cNew;

  if (!name)
    setObjectName("comment");

  QVBoxLayout *moreLayout = new QVBoxLayout(this);
  moreLayout->setContentsMargins(5, 5, 5, 5);
  moreLayout->setSpacing(7);
  moreLayout->setObjectName("moreLayout");

  QHBoxLayout *commentLayout = new QHBoxLayout(this);
  commentLayout->setContentsMargins(5, 5, 5, 5);
  commentLayout->setSpacing(7);
  commentLayout->setObjectName("commentLayout");

  QVBoxLayout *layout11  = new QVBoxLayout(this);
  layout11->setSpacing(5);
  layout11->setObjectName("layout11");

  QHBoxLayout *layout9   = new QHBoxLayout(this);
  layout9->setObjectName("layout9");

  QBoxLayout *layout8    = new QHBoxLayout(this);
  layout8->setSpacing(5);
  layout8->setObjectName("layout8");

  QLabel *_cmnttypeLit = new QLabel(tr("Comment Type:"), this);
  _cmnttypeLit->setObjectName("_cmnttypeLit");
  layout8->addWidget( _cmnttypeLit );

  _cmnttype = new XComboBox( false, this);
  _cmnttype->setObjectName("_cmnttype" );
  layout8->addWidget( _cmnttype );
  layout9->addLayout( layout8 );

  QSpacerItem* spacer = new QSpacerItem( 66, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
  layout9->addItem( spacer );

  _public = new QCheckBox(tr("Public"), this);
  _public->setObjectName("_public");
  if(!(_x_metrics && _x_metrics->boolean("CommentPublicPrivate")))
    _public->hide();
  _public->setChecked(_x_metrics && _x_metrics->boolean("CommentPublicDefault"));
  layout9->addWidget(_public);
  layout11->addLayout( layout9 );

  _comment = new XTextEdit( this);
  _comment->setObjectName("_comment" );
  _comment->setSpellEnable(true);
  layout11->addWidget( _comment );
  commentLayout->addLayout( layout11 );

  QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
  buttonBox->setOrientation(Qt::Vertical);
  buttonBox->setStandardButtons(QDialogButtonBox::Save | QDialogButtonBox::Cancel);

  _close = buttonBox->button(QDialogButtonBox::Cancel);
  _close->setObjectName("_close");

  _save = buttonBox->button(QDialogButtonBox::Save);
  _save->setObjectName("_save");

  _prev = buttonBox->addButton(tr("&Previous"), QDialogButtonBox::ActionRole);
  _prev->setObjectName("_prev");

  _next = buttonBox->addButton(tr("&Next"), QDialogButtonBox::ActionRole);
  _next->setObjectName("_next");

  _more = buttonBox->addButton(tr("&More"), QDialogButtonBox::ActionRole);
  _more->setObjectName("_more");
  _more->setCheckable(true);

  commentLayout->addWidget(buttonBox);

  moreLayout->addLayout(commentLayout);

  _comments = new Comments(this);
  _comments->setObjectName("_comments");
  _comments->setReadOnly(true);
  _comments->findChild<XCheckBox*>("_verbose")->setForgetful(true);
  _comments->findChild<XCheckBox*>("_verbose")->hide();
  _comments->findChild<XCheckBox*>("_verbose")->setChecked(false);
  _comments->_newComment->setVisible(false);
  _comments->setVerboseCommentList(true);
  _comments->setVisible(false);
  _comments->setEditable(false);
  moreLayout->addWidget(_comments);

  resize( QSize(524, 270).expandedTo(minimumSizeHint()) );
  //clearWState( WState_Polished );

  connect(buttonBox, SIGNAL(accepted()), this, SLOT(sSave()));
  connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
  connect(_next, SIGNAL(clicked()), this, SLOT(sNextComment()));
  connect(_prev, SIGNAL(clicked()), this, SLOT(sPrevComment()));
  connect(_more, SIGNAL(toggled(bool)), _comments, SLOT(setVisible(bool)));

  setTabOrder( _cmnttype, _comment );
  setTabOrder( _comment, _save );
  setTabOrder( _save, _close );

  _sourcetype = "";
  _cmnttype->setAllowNull(true);

  shortcuts::setStandardKeys(this);
}
Example #29
0
void
MainWindow::makeUI()
{
    setObjectName(QString::fromUtf8("MainWindow"));

#if 0
    action_Print = new QAction(this);
    action_Print->setObjectName(QString::fromUtf8("action_Print"));
#endif

#if 1
    action_Exit = new QAction(this);
    action_Exit->setObjectName(QString::fromUtf8("action_Exit"));
	//connect(action_Exit, SIGNAL(triggered()), qApp, SLOT(quit()));
	connect(action_Exit, SIGNAL(triggered()), this, SLOT(close()));
#endif

    action_Multiplot = new QAction(this);
    action_Multiplot->setObjectName(QString::fromUtf8("action_Multiplot"));
	connect(action_Multiplot, SIGNAL(triggered()), this, SLOT(showMultiplot()));

    action_Archivesheet = new QAction(this);
    action_Archivesheet->setObjectName(QString::fromUtf8("action_Archivesheet"));
	connect(action_Archivesheet, SIGNAL(triggered()), this, SLOT(showArchivesheet()));

    action_Archiverviewer = new QAction(this);
    action_Archiverviewer->setObjectName(QString::fromUtf8("action_Archiverviewer"));
	connect(action_Archiverviewer, SIGNAL(triggered()), this, SLOT(showArchiverviewer()));

    action_SignalDB = new QAction(this);
    action_SignalDB->setObjectName(QString::fromUtf8("action_SignalDB"));
	connect(action_SignalDB, SIGNAL(triggered()), this, SLOT(showSignalDB()));

    action_PVListV = new QAction(this);
    action_PVListV->setObjectName(QString::fromUtf8("action_PVListV"));
	connect(action_PVListV, SIGNAL(triggered()), this, SLOT(showPVListViewer()));

	action_Manual = new QAction(this);
	action_Manual->setObjectName(QString::fromUtf8("action_Manual"));
	connect(action_Manual, SIGNAL(triggered()), this, SLOT(showManual()));

	action_AboutECH = new QAction(this);
	action_AboutECH->setObjectName(QString::fromUtf8("action_AboutECH"));
	connect(action_AboutECH, SIGNAL(triggered()), this, SLOT(showAboutECH()));

    centralwidget = new QWidget(this);
    centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
    //centralwidget->setGeometry(QRect(0, 0, 1280, 821));
	
    widget = new QWidget(centralwidget);
    widget->setObjectName(QString::fromUtf8("widget"));
    widget->setGeometry(QRect(200, 0, 1080, 821));
    widget->setMinimumSize(QSize(400, 0));
    vboxLayout = new QVBoxLayout(widget);
    vboxLayout->setSpacing(0);
    vboxLayout->setMargin(0);
    vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
    dockWidget = new QDockWidget(widget);
    dockWidget->setObjectName(QString::fromUtf8("dockWidget"));
    QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7));
    sizePolicy.setHorizontalStretch(0);
    sizePolicy.setVerticalStretch(0);
    sizePolicy.setHeightForWidth(dockWidget->sizePolicy().hasHeightForWidth());
    dockWidget->setSizePolicy(sizePolicy);
    //dockWidget->setFeatures(QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable|QDockWidget::NoDockWidgetFeatures);
    //dockWidget->setFeatures(QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable);
    //dockWidget->setAllowedAreas(Qt::AllDockWidgetAreas);
    dockWidgetContents = new QWidget(dockWidget);
    dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents"));

    vdockLayout = new QVBoxLayout(widget);
    vdockLayout->setSpacing(0);
    vdockLayout->setMargin(0);
    vdockLayout->setObjectName(QString::fromUtf8("vdockLayout"));

    stackedWidget = new QStackedWidget(dockWidgetContents);
    stackedWidget->setObjectName(QString::fromUtf8("stackedWidget"));
    stackedWidget->setGeometry(QRect(0, 0, 1080, 821));
    dockWidget->setWidget(dockWidgetContents);

    vboxLayout->addWidget(dockWidget);

	dockWidgetContents->setLayout(vdockLayout);
	vdockLayout->addWidget(stackedWidget);

    tabWidget = new QTabWidget(centralwidget);
    tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
    tabWidget->setGeometry(QRect(0, 0, 200, 821));
    QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
    sizePolicy1.setHorizontalStretch(0);
    sizePolicy1.setVerticalStretch(0);
    sizePolicy1.setHeightForWidth(tabWidget->sizePolicy().hasHeightForWidth());

#if 1
	/* TabWidget color setting */
    QPalette palettetw;

    QBrush brushtw1(QColor(60, 76, 100, 255));
    brushtw1.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::Window, brushtw1);
    //palettetw.setBrush(QPalette::Inactive, QPalette::Window, brushtw1);
    //palettetw.setBrush(QPalette::Disabled, QPalette::Window, brushtw1);

    QBrush brushtw2(QColor(60, 76, 100, 255));
    brushtw2.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::Base, brushtw2);
    //palettetw.setBrush(QPalette::Inactive, QPalette::Base, brushtw2);
    //palettetw.setBrush(QPalette::Disabled, QPalette::Base, brushtw2);

    palettetw.setBrush(QPalette::Active, QPalette::Button, brushtw1);
    //palettetw.setBrush(QPalette::Inactive, QPalette::Button, brushtw1);
    //palettetw.setBrush(QPalette::Disabled, QPalette::Button, brushtw1);

    QBrush brushtw3(QColor(255, 255, 255, 255));
    brushtw3.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::ButtonText, brushtw3);
    //palettetw.setBrush(QPalette::Inactive, QPalette::ButtonText, brushtw3);
    //palettetw.setBrush(QPalette::Disabled, QPalette::ButtonText, brushtw3);

    palettetw.setBrush(QPalette::Active, QPalette::WindowText, brushtw3);
    //palettetw.setBrush(QPalette::Inactive, QPalette::WindowText, brushtw3);
    //palettetw.setBrush(QPalette::Disabled, QPalette::WindowText, brushtw3);

    tabWidget->setPalette(palettetw);

#endif

#if 0
    QPalette palettetw;
    QBrush brushtw1(QColor(0, 0, 55, 200));
    brushtw1.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::Window, brushtw1);
    QBrush brushtw2(QColor(96, 96, 129, 200));
    brushtw2.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::Base, brushtw2);
    QBrush brushtw3(QColor(100, 100, 100, 255));
    brushtw3.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::WindowText, brushtw3);
    //QBrush brushtw4(QColor(255, 255, 255, 50));
    QBrush brushtw4(QColor(55, 55, 55, 100));
    brushtw4.setStyle(Qt::SolidPattern);
    palettetw.setBrush(QPalette::Active, QPalette::Button, brushtw4);
    tabWidget->setPalette(palettetw);
#endif

    tabWidget->setSizePolicy(sizePolicy1);
    tabWidget->setMaximumSize(QSize(16777215, 16777215));
    tabWidget->setTabPosition(QTabWidget::West);
    tabWidget->setTabShape(QTabWidget::Triangular);
    tabWidget->setElideMode(Qt::ElideNone);

    tab_0 = new QWidget();
    tab_0->setObjectName(QString::fromUtf8("tab_0"));
    QFont font;
    font.setPointSize(14);
    vboxLayout0 = new QVBoxLayout(tab_0);
    vboxLayout0->setSpacing(6);
    vboxLayout0->setMargin(4);
    vboxLayout0->setAlignment(Qt::AlignTop);
    vboxLayout0->setObjectName(QString::fromUtf8("vboxLayout0"));

    QPalette paletteb;
    QBrush brushb(QColor(211, 197, 179, 255));
    brushb.setStyle(Qt::SolidPattern);
    paletteb.setBrush(QPalette::Active, QPalette::Button, brushb);
    //paletteb.setBrush(QPalette::Inactive, QPalette::Button, brushb);
    //paletteb.setBrush(QPalette::Disabled, QPalette::Button, brushb);

    QBrush brushbt(QColor(106, 88, 62, 255));
    brushbt.setStyle(Qt::SolidPattern);
    paletteb.setBrush(QPalette::Active, QPalette::ButtonText, brushbt);
    //paletteb.setBrush(QPalette::Inactive, QPalette::ButtonText, brushbt);
    //paletteb.setBrush(QPalette::Disabled, QPalette::ButtonText, brushbt);

    pushButton[0] = new QPushButton(tab_0);
    pushButton[0]->setObjectName(QString::fromUtf8("pushButton_0"));
    pushButton[0]->setFont(font);
    pushButton[0]->setText(QApplication::translate("MainWindow", "Operation", 0, QApplication::UnicodeUTF8));
    pushButton[0]->setPalette(paletteb);
    vboxLayout0->addWidget(pushButton[0]);

    pushButton[1] = new QPushButton(tab_0);
    pushButton[1]->setObjectName(QString::fromUtf8("pushButton_1"));
    pushButton[1]->setFont(font);
    pushButton[1]->setText(QApplication::translate("MainWindow", "Interlock", 0, QApplication::UnicodeUTF8));
    pushButton[1]->setPalette(paletteb);
    vboxLayout0->addWidget(pushButton[1]);

    pushButton[2] = new QPushButton(tab_0);
    pushButton[2]->setObjectName(QString::fromUtf8("pushButton_2"));
    pushButton[2]->setFont(font);
    pushButton[2]->setText(QApplication::translate("MainWindow", "DAQ", 0, QApplication::UnicodeUTF8));
    pushButton[2]->setPalette(paletteb);
    vboxLayout0->addWidget(pushButton[2]);

#if 0
    pushButton[3] = new QPushButton(tab_0);
    pushButton[3]->setObjectName(QString::fromUtf8("pushButton_3"));
    pushButton[3]->setFont(font);
    pushButton[3]->setText(QApplication::translate("MainWindow", "Waveform Graph2", 0, QApplication::UnicodeUTF8));
    pushButton[3]->setPalette(paletteb);
    vboxLayout0->addWidget(pushButton[3]);
#endif

#if 0
    spacerItem0 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding);
    vboxLayout0->addItem(spacerItem0);
#endif
    frame = new QFrame(tab_0);
    frame->setObjectName(QString::fromUtf8("frame"));
    QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
    sizePolicy2.setHorizontalStretch(1);
    sizePolicy2.setVerticalStretch(0);
    sizePolicy2.setHeightForWidth(frame->sizePolicy().hasHeightForWidth());
    frame->setSizePolicy(sizePolicy2);
    frame->setMinimumSize(QSize(16, 704));
    frame->setFrameShape(QFrame::StyledPanel);
    frame->setFrameShadow(QFrame::Raised);

    vboxLayout0->addWidget(frame);
	QVBoxLayout *vfboxLayout = new QVBoxLayout(frame);
	vfboxLayout->setSpacing(0);
	vfboxLayout->setMargin(0);
	vfboxLayout->setObjectName(QString::fromUtf8("vfboxLayout"));

	QUiLoader m_loader;
	QFile *file = new QFile("/usr/local/opi/ui/ECH_Menu_Area.ui");
	file->open(QFile::ReadOnly);
	QWidget *m_widget = m_loader.load(file);
	file->close();
	vfboxLayout->addWidget(m_widget);

	AttachChannelAccess *pattachECHMenu = new AttachChannelAccess(frame);

/* TG remove 20130704
    tab_1 = new QWidget();
    tab_1->setObjectName(QString::fromUtf8("tab_1"));
    vboxLayout1 = new QVBoxLayout(tab_1);
    vboxLayout1->setSpacing(6);
    vboxLayout1->setMargin(4);
    vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1"));

    pushButton[3] = new QPushButton(tab_1);
    pushButton[3]->setObjectName(QString::fromUtf8("pushButton_3"));
    pushButton[3]->setFont(font);
    pushButton[3]->setText(QApplication::translate("MainWindow", "DAQ WavePattern", 0, QApplication::UnicodeUTF8));
    pushButton[3]->setPalette(paletteb);
    vboxLayout1->addWidget(pushButton[3]);

	spacerItem1 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding);
	vboxLayout1->addItem(spacerItem1);


    frame2 = new QFrame(tab_1);
    frame2->setObjectName(QString::fromUtf8("frame2"));
    QSizePolicy sizePolicy3(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
    sizePolicy3.setHorizontalStretch(1);
    sizePolicy3.setVerticalStretch(0);
    sizePolicy3.setHeightForWidth(frame2->sizePolicy().hasHeightForWidth());
    frame2->setSizePolicy(sizePolicy3);
    frame2->setMinimumSize(QSize(16, 704));
    frame2->setFrameShape(QFrame::StyledPanel);
    frame2->setFrameShadow(QFrame::Raised);

    vboxLayout1->addWidget(frame2);
	QVBoxLayout *vfboxLayout1 = new QVBoxLayout(frame2);
	vfboxLayout1->setSpacing(0);
	vfboxLayout1->setMargin(0);
	vfboxLayout1->setObjectName(QString::fromUtf8("vfboxLayout1"));
	QUiLoader m_loader1;
	QFile *file1 = new QFile("/usr/local/opi/ui/ECH_Menu_Area.ui");
	file1->open(QFile::ReadOnly);
	QWidget *m_widget1 = m_loader1.load(file1);
	file1->close();
	vfboxLayout1->addWidget(m_widget1);

	AttachChannelAccess *pattachECHSubMenu = new AttachChannelAccess(frame2);

*/

	/*
    spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Fixed, QSizePolicy::Fixed);
    vfboxLayout->addItem(spacerItem1);

	QUiLoader m_loader2;
	QFile *file2 = new QFile("/usr/local/opi/ui/ECH_Menu_Area2.ui");
	file2->open(QFile::ReadOnly);
	QWidget *m_widget2 = m_loader2.load(file2);
	file2->close();
	vfboxLayout->addWidget(m_widget2);
	*/




    tabWidget->addTab(tab_0, QApplication::translate("MainWindow", "ECH Main panels", 0, QApplication::UnicodeUTF8));
//    tabWidget->addTab(tab_1, QApplication::translate("MainWindow", "ECH Sub panels", 0, QApplication::UnicodeUTF8));

    menubar = new QMenuBar(this);
    menubar->setObjectName(QString::fromUtf8("menubar"));
    menubar->setGeometry(QRect(0, 0, 1280, 30));
    menu_File = new QMenu(menubar);
    menu_File->setObjectName(QString::fromUtf8("menu_File"));
    menu_Util = new QMenu(menubar);
    menu_Util->setObjectName(QString::fromUtf8("menu_Util"));
	menu_Help = new QMenu(menubar);
	menu_Help->setObjectName(QString::fromUtf8("menu_Help"));
    setMenuBar(menubar);

    QLabel *slabel1 = new QLabel("Set your mouse on the dynamic value to read PVNAME.");
    slabel1->setAlignment(Qt::AlignHCenter);
    slabel1->setMinimumSize(slabel1->sizeHint());
    slabel1->setFrameStyle(QFrame::Panel | QFrame::Plain);

    QFrame *sframe = new QFrame();
    QVBoxLayout *svlayout = new QVBoxLayout(sframe);
    svlayout->setSpacing(1);
    svlayout->setMargin(2);

    statusBar()->addWidget(sframe,1);
    
    toolBar = new QToolBar(this);
    toolBar->setObjectName(QString::fromUtf8("toolBar"));

    QPalette palette;
    QBrush brush(QColor(108, 147, 255, 100));
    brush.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Active, QPalette::Base, brush);
    palette.setBrush(QPalette::Active, QPalette::AlternateBase, brush);
    QBrush brush1(QColor(44, 51, 91, 100));
    brush1.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Active, QPalette::Window, brush1);
    QBrush brush2(QColor(108, 147, 255, 100));
    brush2.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Inactive, QPalette::Base, brush2);
    QBrush brush3(QColor(44, 51, 91, 100));
    brush3.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Inactive, QPalette::Window, brush3);
    QBrush brush4(QColor(44, 51, 91, 100));
    brush4.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Disabled, QPalette::Base, brush4);
    QBrush brush5(QColor(44, 51, 91, 100));
    brush5.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Disabled, QPalette::Window, brush5);
    toolBar->setPalette(palette);
    toolBar->setOrientation(Qt::Horizontal);
    addToolBar(static_cast<Qt::ToolBarArea>(4), toolBar);

    menubar->addAction(menu_File->menuAction());
    menubar->addAction(menu_Util->menuAction());
    //menubar->addAction(menu_View->menuAction());
	menubar->addSeparator();
    menubar->addAction(menu_Help->menuAction());
#if 0
    menu_File->addAction(action_Print);
#endif
    menu_File->addAction(action_Exit);

    menu_Util->addAction(action_Multiplot);
    menu_Util->addAction(action_Archivesheet);
    menu_Util->addAction(action_Archiverviewer);
    menu_Util->addAction(action_SignalDB);
    menu_Util->addAction(action_PVListV);

#if 0
	menu_Help->addAction(action_Manual);
#endif
	menu_Help->addAction(action_AboutECH);

#if 1
    QFrame *tbframe = new QFrame();
    toolBar->addWidget(tbframe);

    QHBoxLayout *tblayout = new QHBoxLayout(tbframe);
    tblayout->QLayout::setAlignment(Qt::AlignRight|Qt::AlignVCenter);
    tblayout->setSpacing(0);
    tblayout->setMargin(0);
    tblayout->setObjectName(QString::fromUtf8("toolBarLayout"));

    QSpacerItem *tbspacer = new QSpacerItem(1000, 10, QSizePolicy::Fixed, QSizePolicy::Fixed);
    QSpacerItem *tbspacer2 = new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed);

	//CAGraphic *ioc1HB = new CAGraphic();
	ioc1HB = new CAGraphic();
	ioc1HB->setLineWidth(2);
	ioc1HB->setMinimumSize(QSize(20,20));
	ioc1HB->setMaximumSize(QSize(20,20));
	ioc1HB->setFillColor(QColor("white"));
	ioc1HB->setLineColor(QColor("black"));
	ioc1HB->setFillMode(StaticGraphic::Solid);
	ioc1HB->setPvname("ECH_HEARTBEAT");
	ioc1HB->setFillDisplayMode(CAGraphic::ActInact);
	ioc1HB->setObjectName("CAGraphic_ioc1HB");
	ioc1HB->setToolTip("ECH IOC HEART BEAT");

	//CAGraphic *ioc2HB = new CAGraphic();
/*
	ioc2HB = new CAGraphic();
	ioc2HB->setLineWidth(2);
	ioc2HB->setMinimumSize(QSize(20,20));
	ioc2HB->setMaximumSize(QSize(20,20));
	ioc2HB->setFillColor(QColor("white"));
	ioc2HB->setLineColor(QColor("black"));
	ioc2HB->setFillMode(StaticGraphic::Solid);
	ioc2HB->setPvname("ECH_LTU_HEARTBEAT");
	ioc2HB->setFillDisplayMode(CAGraphic::ActInact);
	ioc2HB->setObjectName("CAGraphic_ioc2HB");
	ioc2HB->setToolTip("ECH LTU HEART BEAT");
*/

    font.setPointSize(12);
    //CAWclock *wclock1 = new CAWclock();
    wclock1 = new CAWclock();
	wclock1->setMinimumSize(QSize(160,20));
	wclock1->setMaximumSize(QSize(160,20));
	wclock1->setPvname("ECH_IOC_WCLOCK.RVAL");
	wclock1->setFont(font);
	wclock1->setObjectName("CAWclock_wclock1");
	
    //QLabel *logo = new QLabel("KSTAR logo");
    logo = new QLabel("KSTAR logo");
    logo->setPixmap(QPixmap::fromImage(QImage(":/images/kstar.png")));

    tblayout->addItem(tbspacer);
    tblayout->addWidget(wclock1);
    tblayout->addItem(tbspacer2);
	tblayout->addWidget(ioc1HB);
//	tblayout->addWidget(ioc2HB);
    tblayout->addItem(tbspacer2);
    tblayout->addWidget(logo);
	AttachChannelAccess *pattachTB = new AttachChannelAccess(tbframe);
#endif

    QSize size(1280, 1024);
    size = size.expandedTo(minimumSizeHint());
    resize(size);
    tabWidget->setCurrentIndex(0);
    QMetaObject::connectSlotsByName(this);

    msgframe = new QFrame(centralwidget);
    msgframe->setObjectName(QString::fromUtf8("msgframe"));
    QSizePolicy sizePolicy4(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5));
    sizePolicy4.setHorizontalStretch(0);
    sizePolicy4.setVerticalStretch(0);
    sizePolicy4.setHeightForWidth(frame->sizePolicy().hasHeightForWidth());
//TG    msgframe->setGeometry(QRect(19, 820, 1255, 90));
    //msgframe->setSizePolicy(sizePolicy4);
    msgframe->setGeometry(QRect(10, 880, 1254, 70));
    //msgframe->setMinimumSize(QSize(1164, 90));
    //msgframe->setFrameShape(QFrame::StyledPanel);
    //msgframe->setFrameShadow(QFrame::Raised);

	vboxLayout2 = new QVBoxLayout(msgframe);
	vboxLayout2->setSpacing(0);
	vboxLayout2->setMargin(0);


/*
	QUiLoader m_loader2;
	QFile *file2 = new QFile("/usr/local/opi/ui/ECH_message.ui");
	file2->open(QFile::ReadOnly);
	QWidget *m_widget2 = m_loader2.load(file2);
	file2->close();
	vboxLayout2->addWidget(m_widget2);
*/

	QHBoxLayout *vhLayout = new QHBoxLayout();
	vhLayout->setSpacing(0);
	vhLayout->setMargin(0);

	CADisplayer *ioc1_interlock = new CADisplayer();
	ioc1_interlock->setMinimumSize(QSize(160,20));
	ioc1_interlock->setMaximumSize(QSize(160,20));
	ioc1_interlock->setPvname("ECH_IOC1_INTERLOCK");
	ioc1_interlock->setObjectName("CADisplayer_ioc1_interlock");
	ioc1_interlock->setVisible(false);
	vhLayout->addWidget(ioc1_interlock);

	CADisplayer *ioc2_interlock = new CADisplayer();
	ioc2_interlock->setMinimumSize(QSize(160,20));
	ioc2_interlock->setMaximumSize(QSize(160,20));
	ioc2_interlock->setPvname("ECH_IOC2_INTERLOCK");
	ioc2_interlock->setObjectName("CADisplayer_ioc2_interlock");
	ioc2_interlock->setVisible(false);
	vhLayout->addWidget(ioc2_interlock);
	vboxLayout2->addLayout(vhLayout);

	textEdit = new QTextEdit(this);
	textEdit->setObjectName(QString::fromUtf8("textEdit"));
	//textEdit->setGeometry(QRect(0, 0, 1000, 50)); 
	//textEdit->setGeometry(QRect(16, 900, 1000, 70)); 
	textEdit->setFontPointSize(12);
	textEdit->setAutoFormatting(QTextEdit::AutoAll);
	textEdit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);

	vboxLayout2->addWidget(textEdit);

	//AttachChannelAccess *pattach_msg = new AttachChannelAccess(msgframe);
	setCentralWidget(centralwidget);

	QObject::connect(ioc1_interlock, SIGNAL(valueChanged(QString)), this,  SLOT(changeText(QString))); 

	QObject::connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(setDefaultIndex(int))); 


	// Set Object Text.
	setWindowTitle(QApplication::translate("MainWindow", "ECH (KSTAR 84GHz ECH System)", 0, QApplication::UnicodeUTF8));
	setWindowIcon(QIcon(QString::fromUtf8("/usr/local/opi/images/ECH.xpm")));
#if 0
    action_Print->setText(QApplication::translate("MainWindow", "&Print", 0, QApplication::UnicodeUTF8));
#endif
    action_Exit->setText(QApplication::translate("MainWindow", "e&Xit", 0, QApplication::UnicodeUTF8));
    action_Multiplot->setText(QApplication::translate("MainWindow", "&Multiplot", 0, QApplication::UnicodeUTF8));
    action_Archivesheet->setText(QApplication::translate("MainWindow", "&Archivesheet", 0, QApplication::UnicodeUTF8));
    action_Archiverviewer->setText(QApplication::translate("MainWindow", "a&Rchiveviewer", 0, QApplication::UnicodeUTF8));
    action_SignalDB->setText(QApplication::translate("MainWindow", "&SignalDB", 0, QApplication::UnicodeUTF8));
    action_PVListV->setText(QApplication::translate("MainWindow", "&PVListviewer", 0, QApplication::UnicodeUTF8));
    action_Manual->setText(QApplication::translate("MainWindow", "ma&Nual", 0, QApplication::UnicodeUTF8));
    action_AboutECH->setText(QApplication::translate("MainWindow", "About &ECH", 0, QApplication::UnicodeUTF8));
    tabWidget->setTabText(tabWidget->indexOf(tab_0), QApplication::translate("MainWindow", "ECH main panels", 0, QApplication::UnicodeUTF8));
//    tabWidget->setTabText(tabWidget->indexOf(tab_1), QApplication::translate("MainWindow", "ECH sub panels", 0, QApplication::UnicodeUTF8));
    menu_File->setTitle(QApplication::translate("MainWindow", "&File", 0, QApplication::UnicodeUTF8));
    menu_Util->setTitle(QApplication::translate("MainWindow", "&Util", 0, QApplication::UnicodeUTF8));
    //menu_View->setTitle(QApplication::translate("MainWindow", "&View", 0, QApplication::UnicodeUTF8));
    menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", 0, QApplication::UnicodeUTF8));

} // setupUi
ConnectionProperties::ConnectionProperties(Database *database, MainWin *mainwin)
{
    QPushButton *pBOK;
    QPushButton *pBCancel;
    QWidget *layoutWidget;
    QVBoxLayout *verticalLayout;

    setWindowFlags(Qt::FramelessWindowHint);
    this->setAttribute(Qt::WA_DeleteOnClose);
    resize(256, 288);
    setModal(true);
    setParent(mainwin);
    setWindowFlags(Qt::Window);
    setWindowModality(Qt::WindowModal);
    pBOK = new QPushButton(this);
    pBOK->setObjectName(QString::fromUtf8("pBOK"));
    pBOK->setAutoDefault(false);
    pBOK->setGeometry(QRect(30, 250, 75, 23));
    QFont font;
    font.setFamily(QString::fromUtf8("Verdana"));
    pBOK->setFont(font);
    pBCancel = new QPushButton(this);
    pBCancel->setObjectName(QString::fromUtf8("pBCancel"));
    pBCancel->setGeometry(QRect(140, 250, 75, 23));
    pBCancel->setFont(font);
    pBCancel->setAutoDefault(false);
    setDb(new QLineEdit(this));
    getDb()->setObjectName(QString::fromUtf8("lEDb"));
    getDb()->setGeometry(QRect(100, 90, 133, 20));
    getDb()->setFont(font);
    getDb()->setAutoFillBackground(true);
    getDb()->setInputMethodHints(Qt::ImhNone);
    setSrv(new QLineEdit(this));
    getSrv()->setObjectName(QString::fromUtf8("lESrv"));
    getSrv()->setGeometry(QRect(100, 47, 133, 20));
    getSrv()->setFont(font);
    setPort(new QLineEdit(this));
    getPort()->setObjectName(QString::fromUtf8("lEPort"));
    getPort()->setGeometry(QRect(100, 130, 133, 20));
    getPort()->setFont(font);
    getPort()->setInputMethodHints(Qt::ImhFormattedNumbersOnly);
    getPort()->setInputMask("00000");
    setUser(new QLineEdit(this));
    getUser()->setObjectName(QString::fromUtf8("lEUser"));
    getUser()->setGeometry(QRect(100, 171, 133, 20));
    getUser()->setFont(font);
    setPass(new QLineEdit(this));
    getPass()->setObjectName(QString::fromUtf8("lEPass"));
    getPass()->setGeometry(QRect(100, 213, 133, 20));
    getPass()->setEchoMode(QLineEdit::Password);
    getPass()->setFont(font);
    layoutWidget = new QWidget(this);
    layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
    layoutWidget->setGeometry(QRect(20, 40, 71, 201));
    verticalLayout = new QVBoxLayout(layoutWidget);
    verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
    verticalLayout->setContentsMargins(0, 0, 0, 0);
    lSrv = new QLabel(layoutWidget);
    lSrv->setObjectName(QString::fromUtf8("lSrv"));
    lSrv->setFont(font);
    verticalLayout->addWidget(lSrv);
    lDb = new QLabel(layoutWidget);
    lDb->setObjectName(QString::fromUtf8("lDb"));
    lDb->setFont(font);
    verticalLayout->addWidget(lDb);
    lPort = new QLabel(layoutWidget);
    lPort->setObjectName(QString::fromUtf8("lPort"));
    lPort->setFont(font);
    verticalLayout->addWidget(lPort);
    lUser = new QLabel(layoutWidget);
    lUser->setObjectName(QString::fromUtf8("lUser"));
    lUser->setFont(font);
    verticalLayout->addWidget(lUser);
    lPass = new QLabel(layoutWidget);
    lPass->setObjectName(QString::fromUtf8("lPass"));
    lPass->setFont(font);
    verticalLayout->addWidget(lPass);
    lTitle = new QLabel(this);
    lTitle->setObjectName(QString::fromUtf8("lTitle"));
    lTitle->setGeometry(QRect(20, 10, 211, 21));
    lTitle->setAlignment(Qt::AlignHCenter);
    QFont font1;
    font1.setFamily(QString::fromUtf8("Verdana"));
    font1.setPointSize(14);
    lTitle->setFont(font1);
    QWidget::setTabOrder(getSrv(), getDb());
    QWidget::setTabOrder(getDb(), getPort());
    QWidget::setTabOrder(getPort(), getUser());
    QWidget::setTabOrder(getUser(), getPass());
    QWidget::setTabOrder(getPass(), pBOK);
    QWidget::setTabOrder(pBOK, pBCancel);
    QObject::connect(pBCancel, SIGNAL(clicked()), this, SLOT(close()));
    QObject::connect(pBOK, SIGNAL(clicked()), this, SLOT(okslot()));
    QObject::connect(this, SIGNAL(oksignal(QString,qint32,QString,QString,QString)),
                     mainwin, SLOT(newDatabase(QString,qint32,QString,QString,QString)));
    QObject::connect(getSrv(), SIGNAL(returnPressed()), getDb(), SLOT(setFocus()));
    QObject::connect(getDb(), SIGNAL(returnPressed()), getPort(), SLOT(setFocus()));
    QObject::connect(getPort(), SIGNAL(returnPressed()), getUser(), SLOT(setFocus()));
    QObject::connect(getUser(), SIGNAL(returnPressed()), getPass(), SLOT(setFocus()));
    QObject::connect(getPass(), SIGNAL(returnPressed()), pBOK, SLOT(setFocus()));
    setWindowTitle(QApplication::translate("Connection", "Connection", 0, QApplication::UnicodeUTF8));
    pBOK->setText(QApplication::translate("Connection", "OK", 0, QApplication::UnicodeUTF8));
    pBCancel->setText(QApplication::translate("Connection", "Cancel", 0, QApplication::UnicodeUTF8));
    if(!database->getDatabaseStatus()) {
        getSrv()->setText(database->getHost());
        getDb()->setText(database->getName());
        getPort()->setText(database->getPort());
        getUser()->setText(database->getUser());
        getPass()->setText(database->getPassword());
    }
    else {
        QSqlDatabase database_connection = QSqlDatabase::database(QString("base").append(QString::number(database->getId())));
        getSrv()->setText(database_connection.hostName());
        getDb()->setText(database->getName());
        getPort()->setText(QString::number(database_connection.port()));
        getUser()->setText(database_connection.userName());
        getPass()->setText(database_connection.password());
    }
    lTitle->setText(QApplication::translate("Connection", "Connection", 0, QApplication::UnicodeUTF8));
    lSrv->setText(QApplication::translate("Connection", "Server", 0, QApplication::UnicodeUTF8));
    lDb->setText(QApplication::translate("Connection", "Database", 0, QApplication::UnicodeUTF8));
    lPort->setText(QApplication::translate("Connection", "Port", 0, QApplication::UnicodeUTF8));
    lUser->setText(QApplication::translate("Connection", "Username", 0, QApplication::UnicodeUTF8));
    lPass->setText(QApplication::translate("Connection", "Password", 0, QApplication::UnicodeUTF8));
}