コード例 #1
0
CommandEditor::CommandEditor( QWidget* parent )
:QWidget(parent)
{
   m_ui = new Ui_CommandEditor();
   m_ui->setupUi(this);

   connect( m_ui->command_selector, SIGNAL( currentIndexChanged( int ) ),
            this, SLOT( commandChanged(int ) ) );

    m_rn_form   = new RegisterNameForm( m_ui->command, "with key" ); 
    m_tn_form   = new RegisterNameForm( m_ui->command, "to key" ); 
    m_tran_form = new TransferForm( m_ui->command );
    m_issue_form = new IssueForm( m_ui->command );

    QSizePolicy sizePolicy2(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
    sizePolicy2.setHorizontalStretch(0);
    sizePolicy2.setVerticalStretch(0);
    sizePolicy2.setHeightForWidth(m_tran_form->sizePolicy().hasHeightForWidth());
    m_tran_form->setSizePolicy(sizePolicy2);
    m_tran_form->setMinimumSize(QSize(600, 0));

    m_ui->command_layout->addWidget(m_tran_form);
    m_ui->command_layout->addWidget(m_rn_form);
    m_ui->command_layout->addWidget(m_tn_form);
    m_ui->command_layout->addWidget(m_issue_form);
    m_rn_form->hide();
    m_tn_form->hide();
    m_issue_form->hide();

    connect( m_ui->add, SIGNAL( clicked() ), this, SIGNAL( append() ) );
    connect( m_ui->remove, SIGNAL( clicked() ), this, SLOT( deleteLater() ) );

    m_cur = dynamic_cast<AbstractCommandForm*>(m_tran_form);
    m_tran_form->requiredSignaturesChanged.connect(requiredSignaturesChanged);
    m_rn_form->requiredSignaturesChanged.connect(requiredSignaturesChanged);
    m_tn_form->requiredSignaturesChanged.connect(requiredSignaturesChanged);
    m_issue_form->requiredSignaturesChanged.connect(requiredSignaturesChanged);
}
コード例 #2
0
ファイル: mainwindow.cpp プロジェクト: bkchr/Rockete
MainWindow::MainWindow()
{
	ui.setupUi(this);

	this->setWindowTitle(tr("Texture Atlas Maker v0.96  (18-08-2011)"));

	readSettings();

///////////////////////////////////////////////
	QGridLayout *gridLayout_2 = new QGridLayout(ui.page_textures);



	TextureListWidget *listViewTextures = new TextureListWidget(ui.page_textures);
	listViewTextures->setObjectName(QString::fromUtf8("listViewTextures"));
			QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Expanding);
			sizePolicy2.setHorizontalStretch(0);
			sizePolicy2.setVerticalStretch(0);
			sizePolicy2.setHeightForWidth(listViewTextures->sizePolicy().hasHeightForWidth());
			listViewTextures->setSizePolicy(sizePolicy2);
	gridLayout_2->addWidget(listViewTextures, 0, 0, 1, 4);


	QToolButton *toolButtonAddFile = new QToolButton(ui.page_textures);
	toolButtonAddFile->setText(tr("add file"));
	toolButtonAddFile->setObjectName(QString::fromUtf8("toolButtonAddFile"));
	gridLayout_2->addWidget(toolButtonAddFile, 1, 0, 1, 2);

	QToolButton *toolButtonAddFolder = new QToolButton(ui.page_textures);
	toolButtonAddFolder->setText(tr("add folder"));
	toolButtonAddFolder->setObjectName(QString::fromUtf8("toolButtonAddFolder"));
	gridLayout_2->addWidget(toolButtonAddFolder, 2, 0, 1, 2);

	QToolButton *toolExport = new QToolButton(ui.page_textures);
	toolExport->setText(tr("export"));
	toolExport->setToolTip(tr("Export selected images"));
	gridLayout_2->addWidget(toolExport, 1, 2, 1, 2);


	QToolButton *toolButtonClear = new QToolButton(ui.page_textures);
	toolButtonClear->setText(tr("clear"));
	toolButtonClear->setObjectName(QString::fromUtf8("toolButtonClear"));
	gridLayout_2->addWidget(toolButtonClear, 2, 2, 1, 2);




	comboBoxResolution = new QComboBox(ui.page_textures);
	comboBoxResolution->setObjectName(QString::fromUtf8("comboBoxResolution"));
	gridLayout_2->addWidget(comboBoxResolution, 3, 0, 1, 2);




	QToolButton *toolButtonAddResolution = new QToolButton(ui.page_textures);
	toolButtonAddResolution->setText(tr("+"));
	toolButtonAddResolution->setObjectName(QString::fromUtf8("toolButtonAddResolution"));
	toolButtonAddResolution->setArrowType(Qt::NoArrow);

	gridLayout_2->addWidget(toolButtonAddResolution, 3, 2, 1, 1);
////////////////////////////////////////

	/////////////////


	comboBoxResolution->addItem("2048*2048", 2048);
	comboBoxResolution->addItem("1024*1024", 1024);
	comboBoxResolution->addItem("512*512", 512);
	comboBoxResolution->addItem("256*256", 256);
	comboBoxResolution->addItem("128*128", 128);

	textureModel = new TextureModel(this);

	listViewTextures->setModel(textureModel);

	ui.workArea->setAcceptDrops(true);
	ui.workArea->setTextureModel(textureModel);
	ui.workArea->setUpdatesEnabled(true);
	ui.workArea->update();


	connect(toolButtonAddFile,SIGNAL(clicked(bool)), this,SLOT(AddFile()));
	connect(toolButtonAddFolder,SIGNAL(clicked(bool)), this,SLOT(AddFolder()));
	connect(toolButtonClear,SIGNAL(clicked(bool)), textureModel,SLOT(clear()));
	connect(toolExport,SIGNAL(clicked(bool)), listViewTextures,SLOT(saveSelectedImages()));


	connect(comboBoxResolution,SIGNAL(currentIndexChanged(int)), this,SLOT(resolutionAtlasChange()));
	connect(toolButtonAddResolution,SIGNAL(clicked(bool)), this,SLOT(AddNewResolution()));



	QAction *bindingAction = ui.toolBar->addAction(tr("binding"));
	bindingAction->setCheckable(true);
	bindingAction->setChecked(false);
	connect(bindingAction, SIGNAL(triggered(bool)), ui.workArea,SLOT(setBinding(bool)));

	QAction *remakeAction = ui.toolBar->addAction(tr("remake"));
	connect(remakeAction,SIGNAL(triggered(bool)), textureModel,SLOT(arrangeImages()));


	QAction *autoRemakeAction = ui.toolBar->addAction(tr("auto arrange"));
	autoRemakeAction->setCheckable(true);
	autoRemakeAction->setChecked(textureModel->isAutoArrangeImages());
	connect(autoRemakeAction, SIGNAL(triggered(bool)), textureModel,SLOT(setAutoArrangeImages(bool)));


	QAction *loadAction = new QAction(tr("&Open"), this);
	connect(loadAction,SIGNAL(triggered(bool)), this,SLOT(loadFile()));
	loadAction->setShortcut(QKeySequence::Open);

	QAction *saveAction = new QAction(tr("&Save"), this);
	saveAction->setShortcut(QKeySequence::Save);
	connect(saveAction,SIGNAL(triggered(bool)), this,SLOT(save()));

	QAction *saveAsAct = new QAction(tr("Save &As..."), this);
	saveAsAct->setShortcuts(QKeySequence::SaveAs);
	saveAsAct->setStatusTip(tr("Save the atlas under a new name"));
	connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));

	QAction *exitAct = new QAction(tr("E&xit"), this);
	exitAct->setShortcuts(QKeySequence::Quit);
	exitAct->setStatusTip(tr("Exit the application"));
	connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));

	QMenu *fileMenuAct = ui.menubar->addMenu(tr("File"));
	fileMenuAct->addAction(loadAction);
	fileMenuAct->addSeparator();
	fileMenuAct->addAction(saveAction);
	fileMenuAct->addAction(saveAsAct);
	fileMenuAct->addSeparator();
	fileMenuAct->addAction(exitAct);


	ui.workArea->setBinding(bindingAction->isChecked());


	connect(textureModel,SIGNAL(cantMakeAtlas()), this,SLOT(CantMakeAtlas()));

	comboBoxResolution->setCurrentIndex(1);
	resolutionAtlasChange();
}
コード例 #3
0
ファイル: MainWindow.cpp プロジェクト: ICoderXI/icqdesktop
    MainWindow::MainWindow(QApplication* app)
		: main_page_(nullptr)
		, login_page_(nullptr)
#ifdef __APPLE__
        , accounts_page_(nullptr)
#endif //_APPLE__
		, app_(app)
		, event_filter_(new TitleWidgetEventFilter(this))
		, tray_icon_(new TrayIcon(this))
                , backgroundPixmap_(QPixmap())
        , Shadow_(0)
        , SkipRead_(false)
        , TaskBarIconHidden_(false)
        , liveChats_(new LiveChats(this))
	{
        Utils::InterConnector::instance().setMainWindow(this);

#ifdef _WIN32
        Utils::init_crash_handlers_in_core();
        core::dump::crash_handler chandler;
        chandler.set_process_exception_handlers();
        chandler.set_thread_exception_handlers();
#endif //_WIN32

		setStyleSheet(Utils::LoadStyle(":/main_window/main_window.qss", Utils::get_scale_coefficient(), true));
#ifdef __APPLE__
        mac_support_ = new MacSupport(this);
        mac_support_->enableMacCrashReport();
#endif

        app_->installNativeEventFilter(this);

        if (this->objectName().isEmpty())
            this->setObjectName(QStringLiteral("main_window"));
        this->resize(329, 331);
        QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
        this->setSizePolicy(sizePolicy);
        this->setLayoutDirection(Qt::LeftToRight);
        this->setAutoFillBackground(false);
        main_widget_ = new QWidget(this);
        main_widget_->setObjectName(QStringLiteral("main_widget"));
        sizePolicy.setHeightForWidth(main_widget_->sizePolicy().hasHeightForWidth());
        main_widget_->setSizePolicy(sizePolicy);
        vertical_layout_ = new QVBoxLayout(main_widget_);
        vertical_layout_->setSpacing(0);
        vertical_layout_->setObjectName(QStringLiteral("verticalLayout_9"));
        vertical_layout_->setSizeConstraint(QLayout::SetDefaultConstraint);
        vertical_layout_->setContentsMargins(0, 0, 0, 0);
        title_widget_ = new QWidget(main_widget_);
        title_widget_->setObjectName(QStringLiteral("title_widget"));
        QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
        sizePolicy1.setHeightForWidth(title_widget_->sizePolicy().hasHeightForWidth());
        title_widget_->setSizePolicy(sizePolicy1);
        title_widget_->setProperty("TitleWidget", QVariant(true));
        horizontal_layout_ = new QHBoxLayout(title_widget_);
        horizontal_layout_->setSpacing(0);
        horizontal_layout_->setObjectName(QStringLiteral("horizontalLayout"));
        horizontal_layout_->setContentsMargins(0, 0, 0, 0);
        logo_ = new QPushButton(title_widget_);
        logo_->setObjectName(QStringLiteral("logo"));
        QSizePolicy sizePolicy2(QSizePolicy::Fixed, QSizePolicy::Fixed);
        sizePolicy2.setHorizontalStretch(0);
        sizePolicy2.setVerticalStretch(0);
        sizePolicy2.setHeightForWidth(logo_->sizePolicy().hasHeightForWidth());
        logo_->setSizePolicy(sizePolicy2);
        logo_->setProperty("WindowIcon", QVariant(true));
        horizontal_layout_->addWidget(logo_);
        title_ = new QLabel(title_widget_);
        title_->setObjectName(QStringLiteral("title"));
        title_->setProperty("Title", QVariant(true));
        horizontal_layout_->addWidget(title_);
        horizontal_spacer_ = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        horizontal_layout_->addItem(horizontal_spacer_);
        hide_button_ = new QPushButton(title_widget_);
        hide_button_->setObjectName(QStringLiteral("hide_button"));
        hide_button_->setProperty("HideButton", QVariant(true));
        horizontal_layout_->addWidget(hide_button_);
        maximize_button_ = new QPushButton(title_widget_);
        maximize_button_->setObjectName(QStringLiteral("maximize_button"));
        sizePolicy2.setHeightForWidth(maximize_button_->sizePolicy().hasHeightForWidth());
        maximize_button_->setSizePolicy(sizePolicy2);
        maximize_button_->setProperty("MaximizeButton", QVariant(true));
        horizontal_layout_->addWidget(maximize_button_);
        close_button_ = new QPushButton(title_widget_);
        close_button_->setObjectName(QStringLiteral("close_button"));
        sizePolicy2.setHeightForWidth(close_button_->sizePolicy().hasHeightForWidth());
        close_button_->setSizePolicy(sizePolicy2);
        close_button_->setProperty("CloseButton", QVariant(true));
        horizontal_layout_->addWidget(close_button_);
        vertical_layout_->addWidget(title_widget_);
        stacked_widget_ = new BackgroundWidget(main_widget_, "");
        stacked_widget_->setObjectName(QStringLiteral("stacked_widget"));

        QPixmap p(":/resources/main_window/pat_100.png");
        setBackgroundPixmap(p, true);

        //Utils::InterConnector::instance().setMainWindow(this);
        get_qt_theme_settings()->setOrLoadDefaultTheme();
        vertical_layout_->addWidget(stacked_widget_);
        this->setCentralWidget(main_widget_);

        logo_->setText(QString());
        hide_button_->setText(QString());
        maximize_button_->setText(QString());
        close_button_->setText(QString());

        stacked_widget_->setCurrentIndex(-1);
        QMetaObject::connectSlotsByName(this);

        if (!get_gui_settings()->get_value(settings_keep_logged_in, true))// || !get_gui_settings()->contains_value(settings_keep_logged_in))
        {
            showLoginPage();
        }
        else
        {
            showMainPage();
        }

		title_widget_->installEventFilter(event_filter_);
		title_->setText("ICQ");
		title_->setAttribute(Qt::WA_TransparentForMouseEvents);
		logo_->setAttribute(Qt::WA_TransparentForMouseEvents);

		setWindowTitle("ICQ");
#ifdef _WIN32
        setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint | Qt::WindowMinimizeButtonHint);
        fake_parent_window_ = Utils::create_fake_parent_window();
#else
        title_widget_->hide();
#endif

		title_->setMouseTracking(true);

		connect(hide_button_, SIGNAL(clicked()), this, SLOT(minimize()), Qt::QueuedConnection);
		connect(maximize_button_, SIGNAL(clicked()), this, SLOT(maximize()), Qt::QueuedConnection);
		connect(close_button_, SIGNAL(clicked()), this, SLOT(hideWindow()), Qt::QueuedConnection);

		hide_button_->setCursor(Qt::PointingHandCursor);
		maximize_button_->setCursor(Qt::PointingHandCursor);
		close_button_->setCursor(Qt::PointingHandCursor);

		connect(event_filter_, SIGNAL(doubleClick()), this, SLOT(maximize()), Qt::QueuedConnection);
		connect(event_filter_, SIGNAL(moveRequest(QPoint)), this, SLOT(moveRequest(QPoint)), Qt::QueuedConnection);

        connect(&Ui::GetDispatcher()->getVoipController(), SIGNAL(onVoipResetComplete()), this, SLOT(onVoipResetComplete()), Qt::QueuedConnection);

		connect(Ui::GetDispatcher(), SIGNAL(needLogin()), this, SLOT(showLoginPage()), Qt::DirectConnection);
		connect(&Utils::InterConnector::instance(), SIGNAL(showIconInTaskbar(bool)), this, SLOT(showIconInTaskbar(bool)), Qt::QueuedConnection);

        connect(this, SIGNAL(needActivate()), this, SLOT(activate()), Qt::QueuedConnection);

        connect(get_gui_settings(), SIGNAL(changed(QString)), this, SLOT(guiSettingsChanged(QString)), Qt::QueuedConnection);

		QFont f = QApplication::font();
		f.setStyleStrategy(QFont::PreferAntialias);
		QApplication::setFont(f);

        if (platform::is_windows())
        {
            int shadowWidth = get_gui_settings()->get_shadow_width();
            QBrush b = stacked_widget_->palette().background();
            QMatrix m;
            m.translate(shadowWidth, title_widget_->height() + shadowWidth);
            b.setMatrix(m);
            Shadow_ = new ShadowWindow(b, shadowWidth);
            QPoint pos = mapToGlobal(QPoint(rect().x(), rect().y()));
            Shadow_->move(pos.x(), pos.y());
            Shadow_->resize(rect().width(), rect().height());
            Shadow_->setActive(true);
            Shadow_->show();
        }

        initSettings();
#ifdef _WIN32
        DragAcceptFiles((HWND)winId(), TRUE);
#endif //_WIN32

        if (!get_gui_settings()->get_value<bool>(settings_show_in_taskbar, true))
            hide_taskbar_icon();

#ifdef __APPLE__
        mac_support_->enableMacUpdater();
        mac_support_->enableMacPreview(this->winId());
#endif

	}
コード例 #4
0
ファイル: MainWindow.cpp プロジェクト: Sangil-Lee/RefCode
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
コード例 #5
0
SocioTwitterwidget::SocioTwitterwidget(const QRectF &rect, QWidget *widget):
    DesktopWidget(rect, widget)
{


    if (SocioTwitterwidget->objectName().isEmpty())
        SocioTwitterwidget->setObjectName(QString::fromUtf8("SocioTwitterClass"));
    SocioTwitterwidget->resize(272, 415);
    QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    sizePolicy.setHorizontalStretch(0);
    sizePolicy.setVerticalStretch(0);
    sizePolicy.setHeightForWidth(SocioTwitterClass->sizePolicy().hasHeightForWidth());
    SocioTwitterwidget->setSizePolicy(sizePolicy);
    SocioTwitterwidget->setCursor(QCursor(Qt::ArrowCursor));
    SocioTwitterwidget->setAcceptDrops(true);
    SocioTwitterwidget->setWindowTitle(QString::fromUtf8("SocioTwitter"));
    SocioTwitterwidget->setAutoFillBackground(false);
    SocioTwitterwidget->setStyleSheet(QString::fromUtf8("QWidget{   \n"
                                      "background:transparent;\n"
                                      "transparent-color:black;\n"
                                      "background-color:qlineargradient(spread:pad, x1:0.604, y1:0.409, x2:0.193, y2:0.938, stop:0.233503 rgba(1, 0, 		0,255))\n"
                                      "\n"
                                      "\n"
                                      "  }"));

    lineEdit = new QLineEdit(SocioTwitterwidget);
    lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
    lineEdit->setGeometry(QRect(0, 370, 271, 41));
    QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
    sizePolicy1.setHorizontalStretch(0);
    sizePolicy1.setVerticalStretch(0);
    sizePolicy1.setHeightForWidth(lineEdit->sizePolicy().hasHeightForWidth());

    lineEdit->setSizePolicy(sizePolicy1);
    lineEdit->setFocusPolicy(Qt::StrongFocus);
    lineEdit->setStyleSheet(QString::fromUtf8("QLineEdit {     \n"
                            " border: 1px solid gray;     \n"
                            " border-radius: 5px;     \n"
                            " padding: 0 8px;     \n"
                            " background: beige;     \n"
                            " selection-background-color: darkgray;\n"
                            "  }"));

    scrollArea = new QScrollArea(SocioTwitterwidget);
    scrollArea->setObjectName(QString::fromUtf8("scrollArea"));
    scrollArea->setGeometry(QRect(0, 40, 271, 331));

    QSizePolicy sizePolicy2(QSizePolicy::Fixed, QSizePolicy::Fixed);

    sizePolicy2.setHorizontalStretch(10);
    sizePolicy2.setVerticalStretch(0);
    sizePolicy2.setHeightForWidth(scrollArea->sizePolicy().hasHeightForWidth());

    scrollArea->setSizePolicy(sizePolicy2);
    scrollArea->setAcceptDrops(true);
    scrollArea->setAutoFillBackground(true);
    scrollArea->setFrameShape(QFrame::NoFrame);
    scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
    scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    scrollArea->setWidgetResizable(true);
    scrollArea->setAlignment(Qt::AlignHCenter | Qt::AlignTop);

    scrollAreaWidgetContents = new QWidget();
    scrollAreaWidgetContents->setObjectName(QString::fromUtf8("scrollAreaWidgetContents"));
    scrollAreaWidgetContents->setGeometry(QRect(0, 0, 267, 327));

    graphicsView = new QGraphicsView(scrollAreaWidgetContents);
    graphicsView->setObjectName(QString::fromUtf8("graphicsView"));
    graphicsView->setGeometry(QRect(10, 20, 61, 51));
    graphicsView->setFrameShadow(QFrame::Raised);
    graphicsView->setLineWidth(1);
    graphicsView->setMidLineWidth(0);
    graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    graphicsView_2 = new QGraphicsView(scrollAreaWidgetContents);
    graphicsView_2->setObjectName(QString::fromUtf8("graphicsView_2"));
    graphicsView_2->setGeometry(QRect(10, 80, 61, 51));
    graphicsView_2->setFrameShape(QFrame::StyledPanel);

    graphicsView_3 = new QGraphicsView(scrollAreaWidgetContents);
    graphicsView_3->setObjectName(QString::fromUtf8("graphicsView_3"));
    graphicsView_3->setGeometry(QRect(10, 140, 61, 51));
    graphicsView_3->setFrameShape(QFrame::NoFrame);

    graphicsView_4 = new QGraphicsView(scrollAreaWidgetContents);
    graphicsView_4->setObjectName(QString::fromUtf8("graphicsView_4"));
    graphicsView_4->setGeometry(QRect(10, 200, 61, 51));
    graphicsView_4->setFrameShape(QFrame::StyledPanel);

    graphicsView_5 = new QGraphicsView(scrollAreaWidgetContents);
    graphicsView_5->setObjectName(QString::fromUtf8("graphicsView_5"));
    graphicsView_5->setGeometry(QRect(10, 260, 61, 51));
    graphicsView_5->setFrameShape(QFrame::NoFrame);

    textBrowser = new QTextBrowser(scrollAreaWidgetContents);
    textBrowser->setObjectName(QString::fromUtf8("textBrowser"));
    textBrowser->setGeometry(QRect(80, 20, 181, 51));
    textBrowser->setFrameShape(QFrame::Box);

    textBrowser_2 = new QTextBrowser(scrollAreaWidgetContents);
    textBrowser_2->setObjectName(QString::fromUtf8("textBrowser_2"));
    textBrowser_2->setGeometry(QRect(80, 80, 181, 51));
    textBrowser_2->setFrameShape(QFrame::NoFrame);

    textBrowser_3 = new QTextBrowser(scrollAreaWidgetContents);
    textBrowser_3->setObjectName(QString::fromUtf8("textBrowser_3"));
    textBrowser_3->setGeometry(QRect(80, 140, 181, 51));
    textBrowser_3->setFrameShape(QFrame::NoFrame);

    textBrowser_4 = new QTextBrowser(scrollAreaWidgetContents);
    textBrowser_4->setObjectName(QString::fromUtf8("textBrowser_4"));
    textBrowser_4->setGeometry(QRect(80, 200, 181, 51));
    textBrowser_4->setFrameShape(QFrame::NoFrame);

    textBrowser_5 = new QTextBrowser(scrollAreaWidgetContents);
    textBrowser_5->setObjectName(QString::fromUtf8("textBrowser_5"));
    textBrowser_5->setGeometry(QRect(80, 260, 181, 51));
    textBrowser_5->setFrameShape(QFrame::NoFrame);

    scrollArea->setWidget(scrollAreaWidgetContents);

    pushButton = new QPushButton(SocioTwitterClass);
    pushButton->setObjectName(QString::fromUtf8("pushButton"));
    pushButton->setGeometry(QRect(10, 10, 71, 41));

    QFont font;
    font.setBold(true);
    font.setWeight(75);

    pushButton->setFont(font);
    pushButton->setCursor(QCursor(Qt::PointingHandCursor));
    pushButton->setMouseTracking(false);
    pushButton->setFocusPolicy(Qt::StrongFocus);

    OPtions = new QPushButton(SocioTwitterClass);
    OPtions->setObjectName(QString::fromUtf8("OPtions"));
    OPtions->setEnabled(true);
    OPtions->setGeometry(QRect(80, 10, 71, 41));

    QPalette palette;
    QLinearGradient gradient(0.604, 0.409, 0.193, 0.938);

    gradient.setSpread(QGradient::PadSpread);
    gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
    gradient.setColorAt(0.233503, QColor(1, 0, 0, 255));
    QBrush brush(gradient);

    palette.setBrush(QPalette::Active, QPalette::Button, brush);
    QBrush brush1(QColor(169, 169, 169, 255));
    brush1.setStyle(Qt::SolidPattern);
    palette.setBrush(QPalette::Active, QPalette::Highlight, brush1);
    QLinearGradient gradient1(0.604, 0.409, 0.193, 0.938);
    gradient1.setSpread(QGradient::PadSpread);
    gradient1.setCoordinateMode(QGradient::ObjectBoundingMode);
    gradient1.setColorAt(0.233503, QColor(1, 0, 0, 255));

    QBrush brush2(gradient1);
    palette.setBrush(QPalette::Inactive, QPalette::Button, brush2);
    palette.setBrush(QPalette::Inactive, QPalette::Highlight, brush1);
    QLinearGradient gradient2(0.604, 0.409, 0.193, 0.938);

    gradient2.setSpread(QGradient::PadSpread);
    gradient2.setCoordinateMode(QGradient::ObjectBoundingMode);
    gradient2.setColorAt(0.233503, QColor(1, 0, 0, 255));

    QBrush brush3(gradient2);
    palette.setBrush(QPalette::Disabled, QPalette::Button, brush3);
    palette.setBrush(QPalette::Disabled, QPalette::Highlight, brush1);
    OPtions->setPalette(palette);

    QFont font1;
    font1.setFamily(QString::fromUtf8("Sans Serif"));
    font1.setPointSize(10);
    font1.setBold(true);
    font1.setWeight(75);

    OPtions->setFont(font1);
    OPtions->setCursor(QCursor(Qt::PointingHandCursor));
    OPtions->setAutoDefault(false);
    OPtions->setDefault(false);
    OPtions->setFlat(false);

    retranslateUi(SocioTwitterClass);

    QMetaObject::connectSlotsByName(SocioTwitterClass);
}
コード例 #6
0
void ProviderWindow::setWindow()
{

QFont f( font() );
f.setPixelSize(12);
f.setStyleStrategy(QFont::PreferAntialias);
 setFont( f );  

    setObjectName(QString::fromUtf8("ProviderWindow"));
    resize(QSize(534, 435).expandedTo(this->minimumSizeHint()));
    setSizeIncrement(QSize(0, 0));
    gridLayout = new QGridLayout(this);
    gridLayout->setSpacing(2);
    gridLayout->setMargin(2);
    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
    mainTab = new QTabWidget(this);
    mainTab->setObjectName(QString::fromUtf8("mainTab"));
    mainTab->setEnabled(true);
    QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7));
    sizePolicy.setHorizontalStretch(0);
    sizePolicy.setVerticalStretch(0);
    sizePolicy.setHeightForWidth(mainTab->sizePolicy().hasHeightForWidth());
    mainTab->setSizePolicy(sizePolicy);
    mainTab->setTabShape(QTabWidget::Rounded);
    nameTab = new QWidget();
    nameTab->setObjectName(QString::fromUtf8("nameTab"));
    gridLayout1 = new QGridLayout(nameTab);
    gridLayout1->setSpacing(6);
    gridLayout1->setMargin(9);
    gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
    chartFrame = new QFrame(nameTab);
    chartFrame->setObjectName(QString::fromUtf8("chartFrame"));
    QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy1.setHorizontalStretch(0);
    sizePolicy1.setVerticalStretch(0);
    sizePolicy1.setHeightForWidth(chartFrame->sizePolicy().hasHeightForWidth());
    chartFrame->setSizePolicy(sizePolicy1);
    chartFrame->setFrameShape(QFrame::StyledPanel);
    chartFrame->setFrameShadow(QFrame::Plain);
    gridLayout2 = new QGridLayout(chartFrame);
    gridLayout2->setSpacing(2);
    gridLayout2->setMargin(2);
    gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
    codemessageLabel = new QLabel(chartFrame);
    codemessageLabel->setObjectName(QString::fromUtf8("codemessageLabel"));
    codemessageLabel->setWordWrap(true);

    gridLayout2->addWidget(codemessageLabel, 0, 1, 1, 1);

    gridLayout3 = new QGridLayout();
    gridLayout3->setSpacing(2);
    gridLayout3->setMargin(0);
    gridLayout3->setObjectName(QString::fromUtf8("gridLayout3"));
    provideractiveCheckBox = new QCheckBox(chartFrame);
    provideractiveCheckBox->setObjectName(QString::fromUtf8("provideractiveCheckBox"));
    provideractiveCheckBox->setChecked(true);

    gridLayout3->addWidget(provideractiveCheckBox, 1, 0, 1, 1);

    spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout3->addItem(spacerItem, 1, 1, 1, 1);

    spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout3->addItem(spacerItem1, 1, 2, 1, 1);

    codeLabel = new QLabel(chartFrame);
    codeLabel->setObjectName(QString::fromUtf8("codeLabel"));

    gridLayout3->addWidget(codeLabel, 0, 0, 1, 1);

    codeEdit = new QLineEdit(chartFrame);
    codeEdit->setObjectName(QString::fromUtf8("codeEdit"));
    QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(0));
    sizePolicy2.setHorizontalStretch(0);
    sizePolicy2.setVerticalStretch(0);
    sizePolicy2.setHeightForWidth(codeEdit->sizePolicy().hasHeightForWidth());
    codeEdit->setSizePolicy(sizePolicy2);
    codeEdit->setMaximumSize(QSize(60, 16777215));
    codeEdit->setMaxLength(4);

    gridLayout3->addWidget(codeEdit, 0, 1, 1, 1);

    spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout3->addItem(spacerItem2, 0, 2, 1, 1);


    gridLayout2->addLayout(gridLayout3, 0, 0, 1, 1);


    gridLayout1->addWidget(chartFrame, 0, 0, 1, 1);

    nameaddressFrame = new QFrame(nameTab);
    nameaddressFrame->setObjectName(QString::fromUtf8("nameaddressFrame"));
    QSizePolicy sizePolicy3(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy3.setHorizontalStretch(0);
    sizePolicy3.setVerticalStretch(0);
    sizePolicy3.setHeightForWidth(nameaddressFrame->sizePolicy().hasHeightForWidth());
    nameaddressFrame->setSizePolicy(sizePolicy3);
    nameaddressFrame->setFrameShape(QFrame::StyledPanel);
    nameaddressFrame->setFrameShadow(QFrame::Plain);
    gridLayout4 = new QGridLayout(nameaddressFrame);
    gridLayout4->setSpacing(2);
    gridLayout4->setMargin(2);
    gridLayout4->setObjectName(QString::fromUtf8("gridLayout4"));
    gridLayout5 = new QGridLayout();
    gridLayout5->setSpacing(2);
    gridLayout5->setMargin(0);
    gridLayout5->setObjectName(QString::fromUtf8("gridLayout5"));
    firstnameLabel = new QLabel(nameaddressFrame);
    firstnameLabel->setObjectName(QString::fromUtf8("firstnameLabel"));

    gridLayout5->addWidget(firstnameLabel, 1, 0, 1, 1);

    streetLabel = new QLabel(nameaddressFrame);
    streetLabel->setObjectName(QString::fromUtf8("streetLabel"));

    gridLayout5->addWidget(streetLabel, 2, 0, 1, 1);

    stateEdit = new QLineEdit(nameaddressFrame);
    stateEdit->setObjectName(QString::fromUtf8("stateEdit"));
    QSizePolicy sizePolicy4(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy4.setHorizontalStretch(1);
    sizePolicy4.setVerticalStretch(0);
    sizePolicy4.setHeightForWidth(stateEdit->sizePolicy().hasHeightForWidth());
    stateEdit->setSizePolicy(sizePolicy4);
    stateEdit->setMinimumSize(QSize(30, 0));
    stateEdit->setMaximumSize(QSize(35, 16777215));
    stateEdit->setMaxLength(2);

    gridLayout5->addWidget(stateEdit, 4, 7, 1, 1);

    lastnameLabel = new QLabel(nameaddressFrame);
    lastnameLabel->setObjectName(QString::fromUtf8("lastnameLabel"));

    gridLayout5->addWidget(lastnameLabel, 0, 0, 1, 1);

    zipLabel = new QLabel(nameaddressFrame);
    zipLabel->setObjectName(QString::fromUtf8("zipLabel"));

    gridLayout5->addWidget(zipLabel, 5, 0, 1, 1);

    cityLabel = new QLabel(nameaddressFrame);
    cityLabel->setObjectName(QString::fromUtf8("cityLabel"));

    gridLayout5->addWidget(cityLabel, 4, 0, 1, 1);

    countryLabel = new QLabel(nameaddressFrame);
    countryLabel->setObjectName(QString::fromUtf8("countryLabel"));

    gridLayout5->addWidget(countryLabel, 5, 5, 1, 2);

    hboxLayout = new QHBoxLayout();
    hboxLayout->setSpacing(4);
    hboxLayout->setMargin(0);
    hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
    zipcodeEdit = new QLineEdit(nameaddressFrame);
    zipcodeEdit->setObjectName(QString::fromUtf8("zipcodeEdit"));
    QSizePolicy sizePolicy5(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy5.setHorizontalStretch(0);
    sizePolicy5.setVerticalStretch(0);
    sizePolicy5.setHeightForWidth(zipcodeEdit->sizePolicy().hasHeightForWidth());
    zipcodeEdit->setSizePolicy(sizePolicy5);
    zipcodeEdit->setMinimumSize(QSize(65, 0));
    zipcodeEdit->setMaximumSize(QSize(65, 16777215));
    zipcodeEdit->setMaxLength(5);

    hboxLayout->addWidget(zipcodeEdit);

    zipdashLabel = new QLabel(nameaddressFrame);
    zipdashLabel->setObjectName(QString::fromUtf8("zipdashLabel"));
    QSizePolicy sizePolicy6(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(5));
    sizePolicy6.setHorizontalStretch(0);
    sizePolicy6.setVerticalStretch(0);
    sizePolicy6.setHeightForWidth(zipdashLabel->sizePolicy().hasHeightForWidth());
    zipdashLabel->setSizePolicy(sizePolicy6);

    hboxLayout->addWidget(zipdashLabel);

    zipextEdit = new QLineEdit(nameaddressFrame);
    zipextEdit->setObjectName(QString::fromUtf8("zipextEdit"));
    QSizePolicy sizePolicy7(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy7.setHorizontalStretch(0);
    sizePolicy7.setVerticalStretch(0);
    sizePolicy7.setHeightForWidth(zipextEdit->sizePolicy().hasHeightForWidth());
    zipextEdit->setSizePolicy(sizePolicy7);
    zipextEdit->setMinimumSize(QSize(45, 0));
    zipextEdit->setMaximumSize(QSize(45, 16777215));
    zipextEdit->setMaxLength(4);

    hboxLayout->addWidget(zipextEdit);


    gridLayout5->addLayout(hboxLayout, 5, 1, 1, 4);

    stateLabel = new QLabel(nameaddressFrame);
    stateLabel->setObjectName(QString::fromUtf8("stateLabel"));

    gridLayout5->addWidget(stateLabel, 4, 6, 1, 1);

    spacerItem3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout5->addItem(spacerItem3, 1, 9, 1, 1);

    middleiEdit = new QLineEdit(nameaddressFrame);
    middleiEdit->setObjectName(QString::fromUtf8("middleiEdit"));
    QSizePolicy sizePolicy8(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0));
    sizePolicy8.setHorizontalStretch(0);
    sizePolicy8.setVerticalStretch(0);
    sizePolicy8.setHeightForWidth(middleiEdit->sizePolicy().hasHeightForWidth());
    middleiEdit->setSizePolicy(sizePolicy8);
    middleiEdit->setMinimumSize(QSize(20, 0));
    middleiEdit->setMaximumSize(QSize(20, 16777215));
    middleiEdit->setMaxLength(1);

    gridLayout5->addWidget(middleiEdit, 1, 8, 1, 1);

    middleiLabel = new QLabel(nameaddressFrame);
    middleiLabel->setObjectName(QString::fromUtf8("middleiLabel"));

    gridLayout5->addWidget(middleiLabel, 1, 7, 1, 1);

    countryEdit = new QLineEdit(nameaddressFrame);
    countryEdit->setObjectName(QString::fromUtf8("countryEdit"));
    countryEdit->setMaxLength(20);

    gridLayout5->addWidget(countryEdit, 5, 7, 1, 5);

    street1Edit = new QLineEdit(nameaddressFrame);
    street1Edit->setObjectName(QString::fromUtf8("street1Edit"));
    street1Edit->setMaxLength(30);

    gridLayout5->addWidget(street1Edit, 2, 1, 1, 12);

    street2Edit = new QLineEdit(nameaddressFrame);
    street2Edit->setObjectName(QString::fromUtf8("street2Edit"));
    street2Edit->setMaxLength(30);

    gridLayout5->addWidget(street2Edit, 3, 1, 1, 12);

    firstnameEdit = new QLineEdit(nameaddressFrame);
    firstnameEdit->setObjectName(QString::fromUtf8("firstnameEdit"));
    QSizePolicy sizePolicy9(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(0));
    sizePolicy9.setHorizontalStretch(0);
    sizePolicy9.setVerticalStretch(0);
    sizePolicy9.setHeightForWidth(firstnameEdit->sizePolicy().hasHeightForWidth());
    firstnameEdit->setSizePolicy(sizePolicy9);
    firstnameEdit->setMaxLength(15);

    gridLayout5->addWidget(firstnameEdit, 1, 1, 1, 6);

    cityEdit = new QLineEdit(nameaddressFrame);
    cityEdit->setObjectName(QString::fromUtf8("cityEdit"));
    cityEdit->setMaxLength(20);

    gridLayout5->addWidget(cityEdit, 4, 1, 1, 5);

    lastnameEdit = new QLineEdit(nameaddressFrame);
    lastnameEdit->setObjectName(QString::fromUtf8("lastnameEdit"));
    lastnameEdit->setMaxLength(20);

    gridLayout5->addWidget(lastnameEdit, 0, 1, 1, 7);


    gridLayout4->addLayout(gridLayout5, 0, 0, 1, 1);


    gridLayout1->addWidget(nameaddressFrame, 1, 0, 1, 1);

    phonecontactGroupBox = new QGroupBox(nameTab);
    phonecontactGroupBox->setObjectName(QString::fromUtf8("phonecontactGroupBox"));
    QSizePolicy sizePolicy10(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy10.setHorizontalStretch(0);
    sizePolicy10.setVerticalStretch(0);
    sizePolicy10.setHeightForWidth(phonecontactGroupBox->sizePolicy().hasHeightForWidth());
    phonecontactGroupBox->setSizePolicy(sizePolicy10);
    gridLayout6 = new QGridLayout(phonecontactGroupBox);
    gridLayout6->setSpacing(2);
    gridLayout6->setMargin(2);
    gridLayout6->setObjectName(QString::fromUtf8("gridLayout6"));
    gridLayout7 = new QGridLayout();
    gridLayout7->setSpacing(2);
    gridLayout7->setMargin(0);
    gridLayout7->setObjectName(QString::fromUtf8("gridLayout7"));
    workphoneEdit = new QLineEdit(phonecontactGroupBox);
    workphoneEdit->setObjectName(QString::fromUtf8("workphoneEdit"));
    workphoneEdit->setMinimumSize(QSize(112, 0));
    workphoneEdit->setMaxLength(13);

    gridLayout7->addWidget(workphoneEdit, 0, 1, 1, 1);

    workphoneLabel = new QLabel(phonecontactGroupBox);
    workphoneLabel->setObjectName(QString::fromUtf8("workphoneLabel"));

    gridLayout7->addWidget(workphoneLabel, 0, 0, 1, 1);

    workextEdit = new QLineEdit(phonecontactGroupBox);
    workextEdit->setObjectName(QString::fromUtf8("workextEdit"));
    workextEdit->setMinimumSize(QSize(40, 0));
    workextEdit->setMaxLength(4);

    gridLayout7->addWidget(workextEdit, 0, 2, 1, 1);

    faxLabel = new QLabel(phonecontactGroupBox);
    faxLabel->setObjectName(QString::fromUtf8("faxLabel"));

    gridLayout7->addWidget(faxLabel, 1, 0, 1, 1);

    faxEdit = new QLineEdit(phonecontactGroupBox);
    faxEdit->setObjectName(QString::fromUtf8("faxEdit"));
    faxEdit->setMinimumSize(QSize(112, 0));
    faxEdit->setMaxLength(13);

    gridLayout7->addWidget(faxEdit, 1, 1, 1, 1);

    faxextEdit = new QLineEdit(phonecontactGroupBox);
    faxextEdit->setObjectName(QString::fromUtf8("faxextEdit"));
    faxextEdit->setMinimumSize(QSize(40, 0));
    faxextEdit->setMaxLength(4);

    gridLayout7->addWidget(faxextEdit, 1, 2, 1, 1);


    gridLayout6->addLayout(gridLayout7, 0, 1, 1, 2);

    gridLayout8 = new QGridLayout();
    gridLayout8->setSpacing(2);
    gridLayout8->setMargin(0);
    gridLayout8->setObjectName(QString::fromUtf8("gridLayout8"));
    homeextEdit = new QLineEdit(phonecontactGroupBox);
    homeextEdit->setObjectName(QString::fromUtf8("homeextEdit"));
    homeextEdit->setMinimumSize(QSize(40, 0));
    homeextEdit->setMaxLength(4);

    gridLayout8->addWidget(homeextEdit, 0, 2, 1, 1);

    mobileextEdit = new QLineEdit(phonecontactGroupBox);
    mobileextEdit->setObjectName(QString::fromUtf8("mobileextEdit"));
    mobileextEdit->setMinimumSize(QSize(40, 0));
    mobileextEdit->setMaxLength(4);

    gridLayout8->addWidget(mobileextEdit, 1, 2, 1, 1);

    homephoneLabel = new QLabel(phonecontactGroupBox);
    homephoneLabel->setObjectName(QString::fromUtf8("homephoneLabel"));

    gridLayout8->addWidget(homephoneLabel, 0, 0, 1, 1);

    mobilephoneLabel = new QLabel(phonecontactGroupBox);
    mobilephoneLabel->setObjectName(QString::fromUtf8("mobilephoneLabel"));

    gridLayout8->addWidget(mobilephoneLabel, 1, 0, 1, 1);

    homephoneEdit = new QLineEdit(phonecontactGroupBox);
    homephoneEdit->setObjectName(QString::fromUtf8("homephoneEdit"));
    homephoneEdit->setMinimumSize(QSize(112, 0));
    homephoneEdit->setMaxLength(13);

    gridLayout8->addWidget(homephoneEdit, 0, 1, 1, 1);

    mobilephoneEdit = new QLineEdit(phonecontactGroupBox);
    mobilephoneEdit->setObjectName(QString::fromUtf8("mobilephoneEdit"));
    mobilephoneEdit->setMinimumSize(QSize(112, 0));
    mobilephoneEdit->setMaxLength(13);

    gridLayout8->addWidget(mobilephoneEdit, 1, 1, 1, 1);


    gridLayout6->addLayout(gridLayout8, 0, 0, 1, 1);

    hboxLayout1 = new QHBoxLayout();
    hboxLayout1->setSpacing(6);
    hboxLayout1->setMargin(0);
    hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
    emailLabel = new QLabel(phonecontactGroupBox);
    emailLabel->setObjectName(QString::fromUtf8("emailLabel"));

    hboxLayout1->addWidget(emailLabel);

    emailEdit = new QLineEdit(phonecontactGroupBox);
    emailEdit->setObjectName(QString::fromUtf8("emailEdit"));
    emailEdit->setMaxLength(35);

    hboxLayout1->addWidget(emailEdit);


    gridLayout6->addLayout(hboxLayout1, 1, 0, 1, 2);


    gridLayout1->addWidget(phonecontactGroupBox, 2, 0, 1, 1);

    mainTab->addTab(nameTab, QApplication::translate("ProviderWindow", "Name/Co&ntact Information", 0, QApplication::UnicodeUTF8));
    otherTab = new QWidget();
    otherTab->setObjectName(QString::fromUtf8("otherTab"));
    gridLayout9 = new QGridLayout(otherTab);
    gridLayout9->setSpacing(6);
    gridLayout9->setMargin(9);
    gridLayout9->setObjectName(QString::fromUtf8("gridLayout9"));
    otherinfoFrame1 = new QFrame(otherTab);
    otherinfoFrame1->setObjectName(QString::fromUtf8("otherinfoFrame1"));
    QSizePolicy sizePolicy11(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy11.setHorizontalStretch(0);
    sizePolicy11.setVerticalStretch(0);
    sizePolicy11.setHeightForWidth(otherinfoFrame1->sizePolicy().hasHeightForWidth());
    otherinfoFrame1->setSizePolicy(sizePolicy11);
    otherinfoFrame1->setFrameShape(QFrame::StyledPanel);
    otherinfoFrame1->setFrameShadow(QFrame::Plain);
    gridLayout10 = new QGridLayout(otherinfoFrame1);
    gridLayout10->setSpacing(2);
    gridLayout10->setMargin(2);
    gridLayout10->setObjectName(QString::fromUtf8("gridLayout10"));
    sofdateLabel = new QLabel(otherinfoFrame1);
    sofdateLabel->setObjectName(QString::fromUtf8("sofdateLabel"));

    gridLayout10->addWidget(sofdateLabel, 3, 4, 1, 1);

    sofdateEdit = new QDateEdit(otherinfoFrame1);
    sofdateEdit->setObjectName(QString::fromUtf8("sofdateEdit"));
    QSizePolicy sizePolicy12(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
    sizePolicy12.setHorizontalStretch(0);
    sizePolicy12.setVerticalStretch(0);
    sizePolicy12.setHeightForWidth(sofdateEdit->sizePolicy().hasHeightForWidth());
    sofdateEdit->setSizePolicy(sizePolicy12);

    gridLayout10->addWidget(sofdateEdit, 3, 5, 1, 2);

    birthdateEdit = new QDateEdit(otherinfoFrame1);
    birthdateEdit->setObjectName(QString::fromUtf8("birthdateEdit"));
    QSizePolicy sizePolicy13(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
    sizePolicy13.setHorizontalStretch(0);
    sizePolicy13.setVerticalStretch(0);
    sizePolicy13.setHeightForWidth(birthdateEdit->sizePolicy().hasHeightForWidth());
    birthdateEdit->setSizePolicy(sizePolicy13);

    gridLayout10->addWidget(birthdateEdit, 4, 2, 1, 2);

    ssnLabel = new QLabel(otherinfoFrame1);
    ssnLabel->setObjectName(QString::fromUtf8("ssnLabel"));

    gridLayout10->addWidget(ssnLabel, 0, 0, 1, 1);

    line = new QFrame(otherinfoFrame1);
    line->setObjectName(QString::fromUtf8("line"));
    line->setFrameShape(QFrame::HLine);

    gridLayout10->addWidget(line, 2, 0, 1, 6);

    datecreatedLabel = new QLabel(otherinfoFrame1);
    datecreatedLabel->setObjectName(QString::fromUtf8("datecreatedLabel"));

    gridLayout10->addWidget(datecreatedLabel, 4, 4, 1, 1);

    datecreatedEdit = new QDateEdit(otherinfoFrame1);
    datecreatedEdit->setObjectName(QString::fromUtf8("datecreatedEdit"));
    QSizePolicy sizePolicy14(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0));
    sizePolicy14.setHorizontalStretch(0);
    sizePolicy14.setVerticalStretch(0);
    sizePolicy14.setHeightForWidth(datecreatedEdit->sizePolicy().hasHeightForWidth());
    datecreatedEdit->setSizePolicy(sizePolicy14);

    gridLayout10->addWidget(datecreatedEdit, 4, 5, 1, 2);

    birthdateLabel = new QLabel(otherinfoFrame1);
    birthdateLabel->setObjectName(QString::fromUtf8("birthdateLabel"));

    gridLayout10->addWidget(birthdateLabel, 4, 0, 1, 2);

    sofCheckBox = new QCheckBox(otherinfoFrame1);
    sofCheckBox->setObjectName(QString::fromUtf8("sofCheckBox"));

    gridLayout10->addWidget(sofCheckBox, 3, 0, 1, 4);

    licensenumberLabel = new QLabel(otherinfoFrame1);
    licensenumberLabel->setObjectName(QString::fromUtf8("licensenumberLabel"));

    gridLayout10->addWidget(licensenumberLabel, 1, 0, 1, 1);

    licensenumberEdit = new QLineEdit(otherinfoFrame1);
    licensenumberEdit->setObjectName(QString::fromUtf8("licensenumberEdit"));
    licensenumberEdit->setMaxLength(15);

    gridLayout10->addWidget(licensenumberEdit, 1, 1, 1, 3);

    spacerItem4 = new QSpacerItem(191, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout10->addItem(spacerItem4, 0, 4, 1, 3);

    ssnEdit = new QLineEdit(otherinfoFrame1);
    ssnEdit->setObjectName(QString::fromUtf8("ssnEdit"));

    gridLayout10->addWidget(ssnEdit, 0, 1, 1, 3);


    gridLayout9->addWidget(otherinfoFrame1, 0, 0, 1, 1);

    otherinformationGroupBox = new QGroupBox(otherTab);
    otherinformationGroupBox->setObjectName(QString::fromUtf8("otherinformationGroupBox"));
    QSizePolicy sizePolicy15(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy15.setHorizontalStretch(0);
    sizePolicy15.setVerticalStretch(0);
    sizePolicy15.setHeightForWidth(otherinformationGroupBox->sizePolicy().hasHeightForWidth());
    otherinformationGroupBox->setSizePolicy(sizePolicy15);
    gridLayout11 = new QGridLayout(otherinformationGroupBox);
    gridLayout11->setSpacing(2);
    gridLayout11->setMargin(2);
    gridLayout11->setObjectName(QString::fromUtf8("gridLayout11"));

    gridLayout9->addWidget(otherinformationGroupBox, 2, 0, 1, 1);

    otherinfoFrame2 = new QFrame(otherTab);
    otherinfoFrame2->setObjectName(QString::fromUtf8("otherinfoFrame2"));
    otherinfoFrame2->setFrameShape(QFrame::StyledPanel);
    otherinfoFrame2->setFrameShadow(QFrame::Plain);
    gridLayout12 = new QGridLayout(otherinfoFrame2);
    gridLayout12->setSpacing(6);
    gridLayout12->setMargin(9);
    gridLayout12->setObjectName(QString::fromUtf8("gridLayout12"));
    spacerItem5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout12->addItem(spacerItem5, 0, 0, 1, 1);

    sexComboBox = new QComboBox(otherinfoFrame2);
    sexComboBox->setObjectName(QString::fromUtf8("sexComboBox"));

    gridLayout12->addWidget(sexComboBox, 0, 2, 1, 1);

    spacerItem6 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

    gridLayout12->addItem(spacerItem6, 1, 0, 1, 1);

    sexLabel = new QLabel(otherinfoFrame2);
    sexLabel->setObjectName(QString::fromUtf8("sexLabel"));

    gridLayout12->addWidget(sexLabel, 0, 1, 1, 1);


    gridLayout9->addWidget(otherinfoFrame2, 1, 0, 1, 1);

    mainTab->addTab(otherTab, QApplication::translate("ProviderWindow", "Ot&her", 0, QApplication::UnicodeUTF8));
    appointmentTab = new QWidget();
    appointmentTab->setObjectName(QString::fromUtf8("appointmentTab"));
    mainTab->addTab(appointmentTab, QApplication::translate("ProviderWindow", "A&ppointments", 0, QApplication::UnicodeUTF8));

    gridLayout->addWidget(mainTab, 0, 0, 1, 1);

    taskFrame = new QFrame(this);
    taskFrame->setObjectName(QString::fromUtf8("taskFrame"));
    QSizePolicy sizePolicy16(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(1));
    sizePolicy16.setHorizontalStretch(0);
    sizePolicy16.setVerticalStretch(0);
    sizePolicy16.setHeightForWidth(taskFrame->sizePolicy().hasHeightForWidth());
    taskFrame->setSizePolicy(sizePolicy16);
    taskFrame->setMinimumSize(QSize(115, 16));
    taskFrame->setFrameShape(QFrame::StyledPanel);
    taskFrame->setFrameShadow(QFrame::Plain);
    gridLayout13 = new QGridLayout(taskFrame);
    gridLayout13->setSpacing(2);
    gridLayout13->setMargin(2);
    gridLayout13->setObjectName(QString::fromUtf8("gridLayout13"));
    appointmentButton = new QPushButton(taskFrame);
    appointmentButton->setObjectName(QString::fromUtf8("appointmentButton"));
    appointmentButton->setEnabled(false);

    gridLayout13->addWidget(appointmentButton, 0, 0, 1, 1);

    spacerItem7 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);

    gridLayout13->addItem(spacerItem7, 3, 0, 1, 1);

    deleteButton = new QPushButton(taskFrame);
    deleteButton->setObjectName(QString::fromUtf8("deleteButton"));
    deleteButton->setEnabled(false);

    gridLayout13->addWidget(deleteButton, 2, 0, 1, 1);


    gridLayout->addWidget(taskFrame, 0, 1, 1, 1);

    buttonFrame = new QFrame(this);
    buttonFrame->setObjectName(QString::fromUtf8("buttonFrame"));
    QSizePolicy sizePolicy17(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4));
    sizePolicy17.setHorizontalStretch(0);
    sizePolicy17.setVerticalStretch(0);
    sizePolicy17.setHeightForWidth(buttonFrame->sizePolicy().hasHeightForWidth());
    buttonFrame->setSizePolicy(sizePolicy17);
    buttonFrame->setFrameShape(QFrame::StyledPanel);
    buttonFrame->setFrameShadow(QFrame::Plain);
    gridLayout14 = new QGridLayout(buttonFrame);
    gridLayout14->setSpacing(2);
    gridLayout14->setMargin(2);
    gridLayout14->setObjectName(QString::fromUtf8("gridLayout14"));
    hboxLayout2 = new QHBoxLayout();
    hboxLayout2->setSpacing(6);
    hboxLayout2->setMargin(0);
    hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
    cancelButton = new QPushButton(buttonFrame);
    cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
    cancelButton->setMinimumSize(QSize(0, 0));
    cancelButton->setMaximumSize(QSize(16777215, 16777215));

    hboxLayout2->addWidget(cancelButton);

    saveButton = new QPushButton(buttonFrame);
    saveButton->setObjectName(QString::fromUtf8("saveButton"));
    saveButton->setMinimumSize(QSize(0, 0));
    saveButton->setMaximumSize(QSize(16777215, 16777215));

    hboxLayout2->addWidget(saveButton);


    gridLayout14->addLayout(hboxLayout2, 0, 4, 1, 1);

    spacerItem8 = new QSpacerItem(207, 16, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout14->addItem(spacerItem8, 0, 3, 1, 1);

    spacerItem9 = new QSpacerItem(16, 16, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout14->addItem(spacerItem9, 0, 2, 1, 1);

    helpButton = new QPushButton(buttonFrame);
    helpButton->setObjectName(QString::fromUtf8("helpButton"));
    helpButton->setEnabled(false);

    gridLayout14->addWidget(helpButton, 0, 0, 1, 1);

    spacerItem10 = new QSpacerItem(16, 16, QSizePolicy::Expanding, QSizePolicy::Minimum);

    gridLayout14->addItem(spacerItem10, 0, 1, 1, 1);


    gridLayout->addWidget(buttonFrame, 1, 0, 1, 2);

    codeLabel->setBuddy(codeEdit);
    firstnameLabel->setBuddy(firstnameEdit);
    streetLabel->setBuddy(street1Edit);
    lastnameLabel->setBuddy(lastnameEdit);
    zipLabel->setBuddy(zipcodeEdit);
    cityLabel->setBuddy(cityEdit);
    countryLabel->setBuddy(countryEdit);
    stateLabel->setBuddy(stateEdit);
    middleiLabel->setBuddy(middleiEdit);
    workphoneLabel->setBuddy(workphoneEdit);
    faxLabel->setBuddy(faxEdit);
    homephoneLabel->setBuddy(homephoneEdit);
    mobilephoneLabel->setBuddy(mobilephoneEdit);
    emailLabel->setBuddy(emailEdit);
    sofdateLabel->setBuddy(sofdateEdit);
    ssnLabel->setBuddy(ssnEdit);
    datecreatedLabel->setBuddy(datecreatedEdit);
    birthdateLabel->setBuddy(birthdateEdit);
    licensenumberLabel->setBuddy(licensenumberEdit);
    QWidget::setTabOrder(mainTab, codeEdit);
    QWidget::setTabOrder(codeEdit, provideractiveCheckBox);
    QWidget::setTabOrder(provideractiveCheckBox, lastnameEdit);
    QWidget::setTabOrder(lastnameEdit, firstnameEdit);
    QWidget::setTabOrder(firstnameEdit, middleiEdit);
    QWidget::setTabOrder(middleiEdit, street1Edit);
    QWidget::setTabOrder(street1Edit, street2Edit);
    QWidget::setTabOrder(street2Edit, cityEdit);
    QWidget::setTabOrder(cityEdit, stateEdit);
    QWidget::setTabOrder(stateEdit, zipcodeEdit);
    QWidget::setTabOrder(zipcodeEdit, zipextEdit);
    QWidget::setTabOrder(zipextEdit, countryEdit);
    QWidget::setTabOrder(countryEdit, homephoneEdit);
    QWidget::setTabOrder(homephoneEdit, homeextEdit);
    QWidget::setTabOrder(homeextEdit, workphoneEdit);
    QWidget::setTabOrder(workphoneEdit, workextEdit);
    QWidget::setTabOrder(workextEdit, mobilephoneEdit);
    QWidget::setTabOrder(mobilephoneEdit, mobileextEdit);
    QWidget::setTabOrder(mobileextEdit, faxEdit);
    QWidget::setTabOrder(faxEdit, faxextEdit);
    QWidget::setTabOrder(faxextEdit, emailEdit);
    QWidget::setTabOrder(emailEdit, ssnEdit);
    QWidget::setTabOrder(ssnEdit, licensenumberEdit);
    QWidget::setTabOrder(licensenumberEdit, sofCheckBox);
    QWidget::setTabOrder(sofCheckBox, birthdateEdit);
    QWidget::setTabOrder(birthdateEdit, sofdateEdit);
    QWidget::setTabOrder(sofdateEdit, datecreatedEdit);
    QWidget::setTabOrder(datecreatedEdit, cancelButton);
    QWidget::setTabOrder(cancelButton, saveButton);
    QWidget::setTabOrder(saveButton, helpButton);
    QWidget::setTabOrder(helpButton, appointmentButton);
    QWidget::setTabOrder(appointmentButton, deleteButton);

    setWindowTitle(QApplication::translate("ProviderWindow", "Provider Edit", 0, QApplication::UnicodeUTF8));
    codemessageLabel->setText(QApplication::translate("ProviderWindow", "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">I<span style=\" font-size:8pt;\">f Provider ID not specified one will be created.</span></p></body></html>", 0, QApplication::UnicodeUTF8));
    provideractiveCheckBox->setText(QApplication::translate("ProviderWindow", "Provider &Active", 0, QApplication::UnicodeUTF8));
    codeLabel->setText(QApplication::translate("ProviderWindow", "Provider ID:", 0, QApplication::UnicodeUTF8));
    firstnameLabel->setText(QApplication::translate("ProviderWindow", "&First Name:", 0, QApplication::UnicodeUTF8));
    streetLabel->setText(QApplication::translate("ProviderWindow", "&Street:", 0, QApplication::UnicodeUTF8));
    lastnameLabel->setText(QApplication::translate("ProviderWindow", "&Last Name:", 0, QApplication::UnicodeUTF8));
    zipLabel->setText(QApplication::translate("ProviderWindow", "&Zip Code:", 0, QApplication::UnicodeUTF8));
    cityLabel->setText(QApplication::translate("ProviderWindow", "C&ity:", 0, QApplication::UnicodeUTF8));
    countryLabel->setText(QApplication::translate("ProviderWindow", "C&ountry:", 0, QApplication::UnicodeUTF8));
    zipdashLabel->setText(QApplication::translate("ProviderWindow", "-", 0, QApplication::UnicodeUTF8));
    stateLabel->setText(QApplication::translate("ProviderWindow", "&State:", 0, QApplication::UnicodeUTF8));
    middleiLabel->setText(QApplication::translate("ProviderWindow", "&M.I.:", 0, QApplication::UnicodeUTF8));
    phonecontactGroupBox->setTitle(QApplication::translate("ProviderWindow", "Phone/Contact Information", 0, QApplication::UnicodeUTF8));
    workphoneEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    workphoneLabel->setText(QApplication::translate("ProviderWindow", "O&ffice:", 0, QApplication::UnicodeUTF8));
    faxLabel->setText(QApplication::translate("ProviderWindow", "Fa&x;", 0, QApplication::UnicodeUTF8));
    faxEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    homephoneLabel->setText(QApplication::translate("ProviderWindow", "Ho&me:", 0, QApplication::UnicodeUTF8));
    mobilephoneLabel->setText(QApplication::translate("ProviderWindow", "Mo&bile:", 0, QApplication::UnicodeUTF8));
    homephoneEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    mobilephoneEdit->setInputMask(QApplication::translate("ProviderWindow", "(999)999-9999; ", 0, QApplication::UnicodeUTF8));
    emailLabel->setText(QApplication::translate("ProviderWindow", "&E-Mail:", 0, QApplication::UnicodeUTF8));
    mainTab->setTabText(mainTab->indexOf(nameTab), QApplication::translate("ProviderWindow", "Name/Co&ntact Information", 0, QApplication::UnicodeUTF8));
    sofdateLabel->setText(QApplication::translate("ProviderWindow", "S&ignature Date:", 0, QApplication::UnicodeUTF8));
    sofdateEdit->setDisplayFormat(QApplication::translate("ProviderWindow", "MM/dd/yyyy", 0, QApplication::UnicodeUTF8));
    birthdateEdit->setDisplayFormat(QApplication::translate("ProviderWindow", "MM/dd/yyyy", 0, QApplication::UnicodeUTF8));
    ssnLabel->setText(QApplication::translate("ProviderWindow", "S&SN:", 0, QApplication::UnicodeUTF8));
    datecreatedLabel->setText(QApplication::translate("ProviderWindow", "&Date Created:", 0, QApplication::UnicodeUTF8));
    datecreatedEdit->setDisplayFormat(QApplication::translate("ProviderWindow", "MM/dd/yyyy", 0, QApplication::UnicodeUTF8));
    birthdateLabel->setText(QApplication::translate("ProviderWindow", "&Birth Date:", 0, QApplication::UnicodeUTF8));
    sofCheckBox->setText(QApplication::translate("ProviderWindow", "Si&gnature on File", 0, QApplication::UnicodeUTF8));
    licensenumberLabel->setText(QApplication::translate("ProviderWindow", "License#:", 0, QApplication::UnicodeUTF8));
    ssnEdit->setInputMask(QApplication::translate("ProviderWindow", "999-99-9999; ", 0, QApplication::UnicodeUTF8));
    otherinformationGroupBox->setTitle(QApplication::translate("ProviderWindow", "Other Information", 0, QApplication::UnicodeUTF8));
    sexComboBox->addItem(QApplication::translate("ProviderWindow", "", 0, QApplication::UnicodeUTF8));
    sexComboBox->addItem(QApplication::translate("ProviderWindow", "M", 0, QApplication::UnicodeUTF8));
    sexComboBox->addItem(QApplication::translate("ProviderWindow", "F", 0, QApplication::UnicodeUTF8));
    sexLabel->setText(QApplication::translate("ProviderWindow", "Sex:", 0, QApplication::UnicodeUTF8));
    mainTab->setTabText(mainTab->indexOf(otherTab), QApplication::translate("ProviderWindow", "Ot&her", 0, QApplication::UnicodeUTF8));
    mainTab->setTabText(mainTab->indexOf(appointmentTab), QApplication::translate("ProviderWindow", "A&ppointments", 0, QApplication::UnicodeUTF8));
    appointmentButton->setText(QApplication::translate("ProviderWindow", "Appointments", 0, QApplication::UnicodeUTF8));
    deleteButton->setText(QApplication::translate("ProviderWindow", "Delete Provider", 0, QApplication::UnicodeUTF8));
    cancelButton->setText(QApplication::translate("ProviderWindow", "C&ancel", 0, QApplication::UnicodeUTF8));
    saveButton->setText(QApplication::translate("ProviderWindow", "&Save", 0, QApplication::UnicodeUTF8));
    helpButton->setText(QApplication::translate("ProviderWindow", "&Help", 0, QApplication::UnicodeUTF8));



// My Modifications After the past from providerwindow.ui


if(record->getType() != PROVIDER_NEW)
{
	deleteButton->setEnabled(true);
}

codeLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
firstnameLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
streetLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
lastnameLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
zipLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
cityLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
countryLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
zipdashLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
workphoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
faxLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
homephoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
mobilephoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
homephoneLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
emailLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
sofdateLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
datecreatedLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
ssnLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
licensenumberLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
sexLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

}
コード例 #7
0
ファイル: desktopwidget.cpp プロジェクト: sglass68/paperman
QWidget *Desktopwidget::createToolbar(void)
   {
   QWidget *group = new QWidget (this);

   //TODO: Move this to use the designer
   /* create the desktop toolbar. We are doing this manually since we can't
      seem to get Qt to insert a QLineEdit into a toolbar */
   _toolbar = new QToolBar (group);
//   _toolbar = new QWidget (group);
//   _toolbar = group;
   addAction (_actionPprev, "Previous page", SLOT(pageLeft ()), "", _toolbar, "pprev.xpm");
   addAction (_actionPprev, "Next page", SLOT(pageRight ()), "", _toolbar, "pnext.xpm");
   addAction (_actionPprev, "Previous stack", SLOT(stackLeft ()), "", _toolbar, "prev.xpm");
   addAction (_actionPprev, "Next stack", SLOT(stackRight ()), "", _toolbar, "next.xpm");

   QWidget *findgroup = new QWidget (_toolbar);

   QHBoxLayout *hboxLayout2 = new QHBoxLayout();
   hboxLayout2->setSpacing(0);
   hboxLayout2->setContentsMargins (0, 0, 0, 0);
   hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
   findgroup->setLayout (hboxLayout2);

   QLabel *label = new QLabel (findgroup);
   label->setText(QApplication::translate("Mainwindow", "Filter:", 0));
   label->setObjectName(QString::fromUtf8("label"));

   hboxLayout2->addWidget(label);

   _match = new QLineEdit (findgroup);
   _match->setObjectName ("match");
   QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed);
   sizePolicy2.setHorizontalStretch(1);
   sizePolicy2.setVerticalStretch(0);
   sizePolicy2.setHeightForWidth(_match->sizePolicy().hasHeightForWidth());
   _match->setSizePolicy(sizePolicy2);
   _match->setMinimumSize(QSize(50, 0));
   //_match->setDragEnabled(true);

   connect (_match, SIGNAL (returnPressed()),
        this, SLOT (matchUpdate ()));
   connect (_match, SIGNAL (textChanged(const QString&)),
        this, SLOT (matchChange (const QString &)));
   //_reset_filter = new QAction (this);
   //_reset_filter->setShortcut (Qt::Key_Escape);
   //connect (_reset_filter, SIGNAL (triggered()), this, SLOT (resetFilter()));
   //_match->addAction (_reset_filter);
   //_match->installEventFilter (this);

   // When ESC is pressed, clear the field
   QStateMachine *machine = new QStateMachine (this);
   QState *s1 = new QState (machine);

//   QSignalTransition *pressed_esc = new QSignalTransition(_match,
//                                       SIGNAL(textChanged(const QString&)));
   QKeyEventTransition *pressed_esc = new QKeyEventTransition(_match,
                           QEvent::KeyPress, Qt::Key_Escape);
   s1->addTransition (pressed_esc);
   connect(pressed_esc, SIGNAL(triggered()), this, SLOT(resetFilter()));
   machine->setInitialState (s1);
   machine->start ();
#if 0
  QPushButton *test = new QPushButton (findgroup);
  test->setText ("hello");
  hboxLayout2->addWidget (test);

   QStateMachine *test_machine = new QStateMachine (this);
   QState *test_s1 = new QState (test_machine);

   QSignalTransition *trans = new QSignalTransition(test, SIGNAL(clicked()));
   test_s1->addTransition (trans);
   connect(trans, SIGNAL(triggered()), this, SLOT(resetFilter()));
   test_machine->setInitialState (test_s1);
   test_machine->start ();
#endif
    // and change the state
   hboxLayout2->addWidget(label);

   hboxLayout2->addWidget (_match);

   addAction (_find, "Filter stacks", SLOT(findClicked ()), "", findgroup, "find.xpm");
   QToolButton *find = new QToolButton (findgroup);
   find->setDefaultAction (_find);
   hboxLayout2->addWidget (find);
//    connect (_find, SIGNAL (activated ()), this, SLOT (findClicked ()));

   QSpacerItem *spacerItem = new QSpacerItem(16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);

   hboxLayout2->addItem (spacerItem);

   _global = new QCheckBox("Subdirs", findgroup);
   _global->setObjectName(QString::fromUtf8("global"));

   hboxLayout2->addWidget(_global);

   addAction (_reset, "Reset", SLOT(resetFilter ()), "", findgroup);
   QToolButton *reset = new QToolButton (findgroup);
   reset->setDefaultAction (_reset);
   hboxLayout2->addWidget (reset);

   _toolbar->addWidget (findgroup);

#ifndef QT_NO_TOOLTIP
   _match->setToolTip(QApplication::translate("Mainwindow", "Enter part of the name of the stack to search for", 0));
   _find->setToolTip(QApplication::translate("Mainwindow", "Search for the name", 0));
   _global->setToolTip(QApplication::translate("Mainwindow", "Enable this to search all subdirectories also", 0));
   _reset->setToolTip(QApplication::translate("Mainwindow", "Reset the search string", 0));
#endif // QT_NO_TOOLTIP
#ifndef QT_NO_WHATSTHIS
   _match->setWhatsThis(QApplication::translate("Mainwindow", "The filter feature can be used in two ways. To filter out unwanted stacks, type a few characters from the stack name that you are looking for. Everything that does not match will be removed from view. To go back, just delete characters from the filter.\n"
"\n"
"There is also a 'global' mode which allows searching of all subdirectories. To use this, select the 'global' button, then type your filter string. Press return or click 'find' to perform the search. This might take a while.\n"
"\n"
"To reset the filter, click the 'reset' button.", 0));
   _find->setWhatsThis(QApplication::translate("Mainwindow", "Click this button to perform a search when in global mode", 0));
   _global->setWhatsThis(QApplication::translate("Mainwindow", "The filter feature can be used in two ways. To filter out unwanted stacks, type a few characters from the stack name that you are looking for. Everything that does not match will be removed from view. To go back, just delete characters from the filter.\n"
"\n"
"There is also a 'global' mode which allows searching of all subdirectories. To use this, select the 'global' button, then type your filter string. Press return or click 'find' to perform the search. This might take a while.\n"
"\n"
"To reset the filter, click the 'reset' button.", 0));
   _reset->setWhatsThis(QApplication::translate("Mainwindow", "Press this button to reset the filter string and display stacks in the current directory", 0));
#endif // QT_NO_WHATSTHIS
   return group;
   }
コード例 #8
0
ファイル: TrackEffects.cpp プロジェクト: OpenGanesh/oom
void TrackEffects::layoutUi()/*{{{*/
{
	QSize iconSize = QSize(22, 20);
	
	m_tabWidget = new QTabWidget(this);/*{{{*/
	m_tabWidget->setObjectName(QString::fromUtf8("m_tabWidget"));
	m_tabWidget->setTabPosition(QTabWidget::North);
	m_tabWidget->setIconSize(QSize(0, 0));
	
	m_auxTab = new QWidget();
	m_auxTab->setObjectName(QString::fromUtf8("auxTab"));/*}}}*/
	
	m_auxTabLayout = new QVBoxLayout(m_auxTab);
	m_auxTabLayout->setSpacing(0);
	m_auxTabLayout->setContentsMargins(0, 0, 0, 0);
	m_auxTabLayout->setObjectName(QString::fromUtf8("auxTabLayout"));
	
	m_auxScroll = new QScrollArea(m_auxTab);
	m_auxScroll->setObjectName(QString::fromUtf8("m_auxScroll"));
	QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Expanding);
	sizePolicy2.setHorizontalStretch(1);
	sizePolicy2.setVerticalStretch(0);
	sizePolicy2.setHeightForWidth(m_auxScroll->sizePolicy().hasHeightForWidth());
	m_auxScroll->setSizePolicy(sizePolicy2);
	m_auxScroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
	m_auxScroll->setWidgetResizable(true);
	m_auxScroll->setAlignment(Qt::AlignCenter);
	m_auxScroll->setAutoFillBackground(true);
	m_auxScroll->setMinimumSize(QSize(95,0));
	
	m_auxBase = new QFrame(this);
	switch (m_track->type())/*{{{*/
	{
		case Track::AUDIO_OUTPUT:
			m_auxBase->setObjectName("MixerAudioOutAuxbox");
			break;
		case Track::AUDIO_BUSS:
			m_auxBase->setObjectName("MixerAudioBussAuxbox");
			break;
		case Track::AUDIO_AUX:
			m_auxBase->setObjectName("MixerAuxAuxbox");
			break;
		case Track::WAVE:
			m_auxBase->setObjectName("MixerWaveAuxbox");
			break;
		case Track::AUDIO_INPUT:
			m_auxBase->setObjectName("MixerAudioInAuxbox");
			break;
		case Track::AUDIO_SOFTSYNTH:
			m_auxBase->setObjectName("MixerSynthAuxbox");
			break;
		case Track::MIDI:
			m_auxBase->setObjectName("MidiTrackAuxbox");
			break;
		case Track::DRUM:
			m_auxBase->setObjectName("MidiDrumTrackAuxbox");
			break;
	}/*}}}*/
	QSizePolicy auxSizePolicy2(QSizePolicy::Expanding, QSizePolicy::Expanding);
	auxSizePolicy2.setHorizontalStretch(1);
	auxSizePolicy2.setVerticalStretch(0);
	auxSizePolicy2.setHeightForWidth(m_auxBase->sizePolicy().hasHeightForWidth());
	
	m_auxBox = new QVBoxLayout(m_auxBase);
	m_auxBox->setObjectName(QString::fromUtf8("m_auxBox"));
	m_auxBox->setContentsMargins(0, -1, 0, -1);
	m_auxBox->setAlignment(Qt::AlignHCenter|Qt::AlignTop);
	m_auxScroll->setWidget(m_auxBase);
	

	m_auxTabLayout->addWidget(m_auxScroll);
	m_fxTab = new QWidget();
	m_fxTab->setObjectName(QString::fromUtf8("fxTab"));

	rackBox = new QVBoxLayout(m_fxTab);
	rackBox->setSpacing(0);
	rackBox->setContentsMargins(0, 0, 0, 0);
	rackBox->setObjectName(QString::fromUtf8("rackBox"));
	
	//m_tabWidget->addTab(m_auxTab, QString(tr("Aux")));
	//m_tabWidget->addTab(m_fxTab, QString(tr("FX")));

	//Populate effect rack box;
	Track *in = 0;/*{{{*/
	if(m_track->hasChildren())
	{
		QList<qint64> *chain = m_track->audioChain();
		for(int i = 0; i < chain->size(); i++)
		{
			in = song->findTrackByIdAndType(chain->at(i), Track::AUDIO_INPUT);
			if(in)
			{
				break;
			}
		}
	}
	else
		m_inputRack = 0;/*}}}*/

	if(m_track && m_track->isMidiTrack())
	{
		if(in)
		{
			m_inputRack = new EffectRack(this, (AudioTrack*)in);
			m_inputRack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
			rackBox->addWidget(m_inputRack);
		}
		else
			m_inputRack = 0;
		m_rack = 0;
	}
	else if(m_track)
	{
		if(in)
		{
			m_inputRack = new EffectRack(this, (AudioTrack*)in);
			m_inputRack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
			rackBox->addWidget(m_inputRack);
		}
		else
			m_inputRack = 0;
		m_rack = new EffectRack(this, (AudioTrack*)m_track);
		m_rack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
		rackBox->addWidget(m_rack);
	}
	m_mainVBoxLayout->addWidget(m_tabWidget);

	
}/*}}}*/
コード例 #9
0
void BtSearchOptionsArea::initView() {
    namespace DU = util::directory;

    QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
    this->setSizePolicy(sizePolicy);
    hboxLayout = new QHBoxLayout(this);

    searchGroupBox = new QGroupBox(this);

    gridLayout = new QGridLayout(searchGroupBox);

    gridLayout->setHorizontalSpacing(3);

    // ******** label for search text editor***********
    m_searchTextLabel = new QLabel(tr("Search for:"), searchGroupBox);
    m_searchTextLabel->setWordWrap(false);
    gridLayout->addWidget(m_searchTextLabel, 0, 0);

    // **********Buttons******************

    m_searchButton = new QPushButton(this);
    m_searchButton->setText(tr("&Search"));
    m_searchButton->setIcon(DU::getIcon(CResMgr::searchdialog::icon));
    m_searchButton->setToolTip(tr("Start to search the text in the chosen works"));
    gridLayout->addWidget(m_searchButton, 0, 2);

    m_chooseModulesButton = new QPushButton(tr("Ch&oose..."), searchGroupBox);
    m_chooseModulesButton->setIcon(DU::getIcon(CResMgr::searchdialog::chooseworks_icon));
    m_chooseModulesButton->setToolTip( tr("Choose works for the search"));
    gridLayout->addWidget(m_chooseModulesButton, 2, 2);

    m_chooseRangeButton = new QPushButton(tr("S&etup..."), searchGroupBox);
    m_chooseRangeButton->setIcon(DU::getIcon(CResMgr::searchdialog::setupscope_icon));
    m_chooseRangeButton->setToolTip(tr("Configure predefined scopes for search"));
    gridLayout->addWidget(m_chooseRangeButton, 3, 2);

    // ************* Search type (AND/OR) selector ***************************************
    QHBoxLayout* typeSelectorLayout = new QHBoxLayout();
    int tsLeft, tsTop, tsRight, tsBottom;
    // Added space looks nicer and enhances readability
    typeSelectorLayout->getContentsMargins(&tsLeft, &tsTop, &tsRight, &tsBottom);
    typeSelectorLayout->setContentsMargins(tsLeft, 0, tsRight, tsBottom + util::tool::mWidth(this, 1) );
    typeSelectorLayout->setSpacing(typeSelectorLayout->spacing() + util::tool::mWidth(this, 1));
    QHBoxLayout* fullButtonLayout = new QHBoxLayout();
    fullButtonLayout->setSpacing(util::tool::mWidth(this, 1) / 2);
    m_typeAndButton = new QRadioButton(tr("All words"));
    m_typeAndButton->setChecked(true);
    m_typeOrButton = new QRadioButton(tr("Some words"));
    m_typeFreeButton = new QRadioButton(tr("Free"));

    m_typeAndButton->setToolTip(tr("All of the words (AND is added between the words)"));
    m_typeOrButton->setToolTip(tr("Some of the words (OR is added between the words)"));
    m_typeFreeButton->setToolTip(tr("Full lucene syntax"));

    m_helpLabel = new QLabel(tr(" (<a href='syntax_help'>full syntax</a>)"));
    m_helpLabel->setToolTip(tr("Click the link to get help for search syntax"));

    typeSelectorLayout->addWidget(m_typeAndButton);
    typeSelectorLayout->addWidget(m_typeOrButton);
    fullButtonLayout->addWidget(m_typeFreeButton);
    fullButtonLayout->addWidget(m_helpLabel);
    typeSelectorLayout->addLayout(fullButtonLayout);
    gridLayout->addLayout(typeSelectorLayout, 1, 1, 1, -1, Qt::AlignLeft | Qt::AlignTop);

    // ************* Label for search range/scope selector *************
    m_searchScopeLabel = new QLabel(tr("Scope:"), searchGroupBox);
    m_searchScopeLabel->setWordWrap(false);
    gridLayout->addWidget(m_searchScopeLabel, 3, 0);

    // ***********Range/scope selector combo box***********
    m_rangeChooserCombo = new QComboBox(searchGroupBox);
    QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed);
    sizePolicy2.setHorizontalStretch(0);
    sizePolicy2.setVerticalStretch(0);
    sizePolicy2.setHeightForWidth(m_rangeChooserCombo->sizePolicy().hasHeightForWidth());
    m_rangeChooserCombo->setSizePolicy(sizePolicy2);
    m_rangeChooserCombo->setToolTip(tr("Choose the scope (books/chapters/verses to search in).<br />Applicable for Bibles and commentaries."));
    gridLayout->addWidget(m_rangeChooserCombo, 3, 1);

    // ************* Search text combo box *******************
    m_searchTextCombo = new CHistoryComboBox(searchGroupBox);
    sizePolicy2.setHeightForWidth(m_searchTextCombo->sizePolicy().hasHeightForWidth());
    m_searchTextCombo->setSizePolicy(sizePolicy2);
    m_searchTextCombo->setFocusPolicy(Qt::WheelFocus);
    m_searchTextCombo->setProperty("sizeLimit", QVariant(25));
    m_searchTextCombo->setProperty("duplicatesEnabled", QVariant(false));
    m_searchTextCombo->setToolTip(tr("The text you want to search for"));
    m_searchTextCombo->setInsertPolicy(QComboBox::NoInsert);
    gridLayout->addWidget(m_searchTextCombo, 0, 1);

    m_modulesLabel = new QLabel(tr("Works:"), searchGroupBox);
    gridLayout->addWidget(m_modulesLabel, 2, 0);

    m_modulesCombo = new QComboBox(searchGroupBox);
    m_modulesCombo->setDuplicatesEnabled(false);
    gridLayout->addWidget(m_modulesCombo, 2, 1);

    hboxLayout->addWidget(searchGroupBox);

    // Set the minimum size before the widgets are populated with data.
    // Otherwise we will get problems with sizing.
    setMinimumSize(minimumSizeHint());

    refreshRanges();
    //set the initial focus
    m_searchTextCombo->setFocus();
    // event filter to prevent the Return/Enter presses in the combo box doing something
    // in the parent widget
    m_searchTextCombo->installEventFilter(this);
}
コード例 #10
0
ファイル: ui_main_window.hpp プロジェクト: sauver/sauver_sys
    void setupUi(QMainWindow *Detection)
    {
        if (Detection->objectName().isEmpty())
            Detection->setObjectName(QString::fromUtf8("Detection"));
        Detection->resize(729, 480);
        actionE_xit = new QAction(Detection);
        actionE_xit->setObjectName(QString::fromUtf8("actionE_xit"));
        action_Load_Map = new QAction(Detection);
        action_Load_Map->setObjectName(QString::fromUtf8("action_Load_Map"));
        action_Connect = new QAction(Detection);
        action_Connect->setObjectName(QString::fromUtf8("action_Connect"));
        action_Disconnect = new QAction(Detection);
        action_Disconnect->setObjectName(QString::fromUtf8("action_Disconnect"));
        centralWidget = new QWidget(Detection);
        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
        gridLayoutWidget = new QWidget(centralWidget);
        gridLayoutWidget->setObjectName(QString::fromUtf8("gridLayoutWidget"));
        gridLayoutWidget->setGeometry(QRect(0, 0, 721, 421));
        gridLayout = new QGridLayout(gridLayoutWidget);
        gridLayout->setSpacing(6);
        gridLayout->setContentsMargins(11, 11, 11, 11);
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
        gridLayout->setSizeConstraint(QLayout::SetNoConstraint);
        gridLayout->setVerticalSpacing(5);
        gridLayout->setContentsMargins(0, 0, 0, 0);
        ugvFeedLabel = new QLabel(gridLayoutWidget);
        ugvFeedLabel->setObjectName(QString::fromUtf8("ugvFeedLabel"));
        QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(ugvFeedLabel->sizePolicy().hasHeightForWidth());
        ugvFeedLabel->setSizePolicy(sizePolicy);

        gridLayout->addWidget(ugvFeedLabel, 1, 2, 1, 1);

        connectionButton = new QCommandLinkButton(gridLayoutWidget);
        connectionButton->setObjectName(QString::fromUtf8("connectionButton"));

        gridLayout->addWidget(connectionButton, 0, 2, 1, 1);

        uavFeedLabel = new QLabel(gridLayoutWidget);
        uavFeedLabel->setObjectName(QString::fromUtf8("uavFeedLabel"));
        sizePolicy.setHeightForWidth(uavFeedLabel->sizePolicy().hasHeightForWidth());
        uavFeedLabel->setSizePolicy(sizePolicy);
        uavFeedLabel->setMaximumSize(QSize(16777215, 16777215));

        gridLayout->addWidget(uavFeedLabel, 1, 0, 1, 1);

        ugvMapLabel = new QLabel(gridLayoutWidget);
        ugvMapLabel->setObjectName(QString::fromUtf8("ugvMapLabel"));
        QSizePolicy sizePolicy1(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
        sizePolicy1.setHeightForWidth(ugvMapLabel->sizePolicy().hasHeightForWidth());
        ugvMapLabel->setSizePolicy(sizePolicy1);

        gridLayout->addWidget(ugvMapLabel, 1, 3, 1, 1);

        horizontalLayout_4 = new QHBoxLayout();
        horizontalLayout_4->setSpacing(6);
        horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
        label_2 = new QLabel(gridLayoutWidget);
        label_2->setObjectName(QString::fromUtf8("label_2"));

        horizontalLayout_4->addWidget(label_2);

        uavTakeoffLandButton = new QPushButton(gridLayoutWidget);
        uavTakeoffLandButton->setObjectName(QString::fromUtf8("uavTakeoffLandButton"));

        horizontalLayout_4->addWidget(uavTakeoffLandButton);


        gridLayout->addLayout(horizontalLayout_4, 2, 0, 1, 1);

        horizontalLayout_2 = new QHBoxLayout();
        horizontalLayout_2->setSpacing(6);
        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
        label = new QLabel(gridLayoutWidget);
        label->setObjectName(QString::fromUtf8("label"));

        horizontalLayout_2->addWidget(label);

        ugvSpeedLCD = new QLCDNumber(gridLayoutWidget);
        ugvSpeedLCD->setObjectName(QString::fromUtf8("ugvSpeedLCD"));
        ugvSpeedLCD->setFrameShape(QFrame::Box);

        horizontalLayout_2->addWidget(ugvSpeedLCD);


        gridLayout->addLayout(horizontalLayout_2, 4, 2, 1, 1);

        horizontalLayout_6 = new QHBoxLayout();
        horizontalLayout_6->setSpacing(6);
        horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
        label_3 = new QLabel(gridLayoutWidget);
        label_3->setObjectName(QString::fromUtf8("label_3"));

        horizontalLayout_6->addWidget(label_3);

        ugvSpeakerButton = new QPushButton(gridLayoutWidget);
        ugvSpeakerButton->setObjectName(QString::fromUtf8("ugvSpeakerButton"));

        horizontalLayout_6->addWidget(ugvSpeakerButton);


        gridLayout->addLayout(horizontalLayout_6, 2, 2, 1, 1);

        verticalLayout = new QVBoxLayout();
        verticalLayout->setSpacing(6);
        verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
        label_4 = new QLabel(gridLayoutWidget);
        label_4->setObjectName(QString::fromUtf8("label_4"));
        label_4->setAlignment(Qt::AlignCenter);

        verticalLayout->addWidget(label_4);

        sauverStatus = new QTextBrowser(gridLayoutWidget);
        sauverStatus->setObjectName(QString::fromUtf8("sauverStatus"));
        sauverStatus->setEnabled(true);
        QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Minimum);
        sizePolicy2.setHorizontalStretch(0);
        sizePolicy2.setVerticalStretch(0);
        sizePolicy2.setHeightForWidth(sauverStatus->sizePolicy().hasHeightForWidth());
        sauverStatus->setSizePolicy(sizePolicy2);
        sauverStatus->setMaximumSize(QSize(777215, 215));

        verticalLayout->addWidget(sauverStatus);


        gridLayout->addLayout(verticalLayout, 4, 3, 1, 1);

        label_5 = new QLabel(gridLayoutWidget);
        label_5->setObjectName(QString::fromUtf8("label_5"));

        gridLayout->addWidget(label_5, 0, 0, 1, 1);

        Detection->setCentralWidget(centralWidget);
        menuBar = new QMenuBar(Detection);
        menuBar->setObjectName(QString::fromUtf8("menuBar"));
        menuBar->setGeometry(QRect(0, 0, 729, 23));
        menuFile = new QMenu(menuBar);
        menuFile->setObjectName(QString::fromUtf8("menuFile"));
        menu_Tools = new QMenu(menuBar);
        menu_Tools->setObjectName(QString::fromUtf8("menu_Tools"));
        menu_Help = new QMenu(menuBar);
        menu_Help->setObjectName(QString::fromUtf8("menu_Help"));
        Detection->setMenuBar(menuBar);
        mainToolBar = new QToolBar(Detection);
        mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
        Detection->addToolBar(Qt::TopToolBarArea, mainToolBar);
        statusBar = new QStatusBar(Detection);
        statusBar->setObjectName(QString::fromUtf8("statusBar"));
        Detection->setStatusBar(statusBar);

        menuBar->addAction(menuFile->menuAction());
        menuBar->addAction(menu_Tools->menuAction());
        menuBar->addAction(menu_Help->menuAction());
        menuFile->addAction(action_Load_Map);
        menuFile->addAction(action_Disconnect);
        menuFile->addAction(actionE_xit);
        menu_Tools->addAction(action_Connect);

        retranslateUi(Detection);
        QObject::connect(actionE_xit, SIGNAL(activated()), Detection, SLOT(close()));
        QObject::connect(action_Connect, SIGNAL(activated()), connectionButton, SLOT(click()));

        QMetaObject::connectSlotsByName(Detection);
    } // setupUi
コード例 #11
0
/*!
	\brief Constructor
*/
QSearchReplacePanel::QSearchReplacePanel(QWidget *p)
 : QPanel(p),m_search(0),m_lastDirection(false)
{
        //setupUi(this);
        // do it completely programatic
    this->resize(801, 71);
            QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
            sizePolicy.setHorizontalStretch(0);
            sizePolicy.setVerticalStretch(0);
            sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
            this->setSizePolicy(sizePolicy);
            gridLayout = new QGridLayout(this);
            gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
            gridLayout->setContentsMargins(-1, 4, -1, 4);
            frame_2 = new QFrame(this);
            frame_2->setObjectName(QString::fromUtf8("frame_2"));
            QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
            sizePolicy1.setHorizontalStretch(0);
            sizePolicy1.setVerticalStretch(0);
            sizePolicy1.setHeightForWidth(frame_2->sizePolicy().hasHeightForWidth());
            frame_2->setSizePolicy(sizePolicy1);
            frame_2->setMinimumSize(QSize(0, 22));
            frame_2->setFrameShape(QFrame::NoFrame);
            frame_2->setFrameShadow(QFrame::Raised);
            frame_2->setLineWidth(0);
            hboxLayout = new QHBoxLayout(frame_2);
            hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
            hboxLayout->setContentsMargins(-1, 0, -1, 0);
            bClose = new QToolButton(frame_2);
            bClose->setObjectName(QString::fromUtf8("bClose"));
            QSizePolicy sizePolicy2(QSizePolicy::Fixed, QSizePolicy::Preferred);
            sizePolicy2.setHorizontalStretch(0);
            sizePolicy2.setVerticalStretch(0);
            sizePolicy2.setHeightForWidth(bClose->sizePolicy().hasHeightForWidth());
            bClose->setSizePolicy(sizePolicy2);
            bClose->setMinimumSize(QSize(20, 20));
            bClose->setMaximumSize(QSize(20, 20));
            QIcon icon;
            icon.addFile(QString::fromUtf8(":/closeall.png"), QSize(), QIcon::Normal, QIcon::Off);
            bClose->setIcon(icon);

            hboxLayout->addWidget(bClose);

            bRefresh = new QToolButton(frame_2);
            bRefresh->setObjectName(QString::fromUtf8("bRefresh"));
            sizePolicy2.setHeightForWidth(bRefresh->sizePolicy().hasHeightForWidth());
            bRefresh->setSizePolicy(sizePolicy2);
            bRefresh->setMinimumSize(QSize(20, 20));
            bRefresh->setMaximumSize(QSize(20, 20));
            QIcon icon1;
            icon1.addFile(QString::fromUtf8(":/reload.png"), QSize(), QIcon::Normal, QIcon::Off);
            bRefresh->setIcon(icon1);

            hboxLayout->addWidget(bRefresh);

            label = new QLabel(frame_2);
            label->setObjectName(QString::fromUtf8("label"));
            QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Preferred);
            sizePolicy3.setHorizontalStretch(0);
            sizePolicy3.setVerticalStretch(0);
            sizePolicy3.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
            label->setSizePolicy(sizePolicy3);
            label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);

            hboxLayout->addWidget(label);


            gridLayout->addWidget(frame_2, 0, 0, 1, 1);

            leFind = new QLineEdit(this);
            leFind->setObjectName(QString::fromUtf8("leFind"));
            QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Fixed);
            sizePolicy4.setHorizontalStretch(2);
            sizePolicy4.setVerticalStretch(0);
            sizePolicy4.setHeightForWidth(leFind->sizePolicy().hasHeightForWidth());
            leFind->setSizePolicy(sizePolicy4);
            leFind->setMinimumSize(QSize(120, 22));

            gridLayout->addWidget(leFind, 0, 1, 1, 1);

            bNext = new QToolButton(this);
            bNext->setObjectName(QString::fromUtf8("bNext"));
            sizePolicy2.setHeightForWidth(bNext->sizePolicy().hasHeightForWidth());
            bNext->setSizePolicy(sizePolicy2);
            bNext->setMinimumSize(QSize(20, 20));
            bNext->setMaximumSize(QSize(20, 20));
            QIcon icon2;
            icon2.addFile(QString::fromUtf8(":/down.png"), QSize(), QIcon::Normal, QIcon::Off);
            bNext->setIcon(icon2);

            gridLayout->addWidget(bNext, 0, 3, 1, 1);

            bPrevious = new QToolButton(this);
            bPrevious->setObjectName(QString::fromUtf8("bPrevious"));
            sizePolicy2.setHeightForWidth(bPrevious->sizePolicy().hasHeightForWidth());
            bPrevious->setSizePolicy(sizePolicy2);
            bPrevious->setMinimumSize(QSize(20, 20));
            bPrevious->setMaximumSize(QSize(20, 20));
            QIcon icon3;
            icon3.addFile(QString::fromUtf8(":/up.png"), QSize(), QIcon::Normal, QIcon::Off);
            bPrevious->setIcon(icon3);

            gridLayout->addWidget(bPrevious, 0, 4, 1, 1);

            frame_6 = new QFrame(this);
            frame_6->setObjectName(QString::fromUtf8("frame_6"));
            sizePolicy1.setHeightForWidth(frame_6->sizePolicy().hasHeightForWidth());
            frame_6->setSizePolicy(sizePolicy1);
            frame_6->setFrameShape(QFrame::NoFrame);
            frame_6->setFrameShadow(QFrame::Raised);
            gridLayout1 = new QGridLayout(frame_6);
            gridLayout1->setContentsMargins(0, 0, 0, 0);
            gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
            cbCase = new QCheckBox(frame_6);
            cbCase->setObjectName(QString::fromUtf8("cbCase"));
            QSizePolicy sizePolicy5(QSizePolicy::Maximum, QSizePolicy::Preferred);
            sizePolicy5.setHorizontalStretch(0);
            sizePolicy5.setVerticalStretch(0);
            sizePolicy5.setHeightForWidth(cbCase->sizePolicy().hasHeightForWidth());
            cbCase->setSizePolicy(sizePolicy5);
            cbCase->setChecked(true);

            gridLayout1->addWidget(cbCase, 0, 0, 1, 1);

            cbWords = new QCheckBox(frame_6);
            cbWords->setObjectName(QString::fromUtf8("cbWords"));
            sizePolicy5.setHeightForWidth(cbWords->sizePolicy().hasHeightForWidth());
            cbWords->setSizePolicy(sizePolicy5);

            gridLayout1->addWidget(cbWords, 0, 1, 1, 1);

            cbRegExp = new QCheckBox(frame_6);
            cbRegExp->setObjectName(QString::fromUtf8("cbRegExp"));
            sizePolicy5.setHeightForWidth(cbRegExp->sizePolicy().hasHeightForWidth());
            cbRegExp->setSizePolicy(sizePolicy5);

            gridLayout1->addWidget(cbRegExp, 0, 2, 1, 1);

            cbHighlight = new QCheckBox(frame_6);
            cbHighlight->setObjectName(QString::fromUtf8("cbHighlight"));
            sizePolicy3.setHeightForWidth(cbHighlight->sizePolicy().hasHeightForWidth());
            cbHighlight->setSizePolicy(sizePolicy3);

            gridLayout1->addWidget(cbHighlight, 0, 3, 1, 1);

            cbCursor = new QCheckBox(frame_6);
            cbCursor->setObjectName(QString::fromUtf8("cbCursor"));
            sizePolicy5.setHeightForWidth(cbCursor->sizePolicy().hasHeightForWidth());
            cbCursor->setSizePolicy(sizePolicy5);
            cbCursor->setChecked(true);

            gridLayout1->addWidget(cbCursor, 0, 4, 1, 1);

            cbSelection = new QCheckBox(frame_6);
            cbSelection->setObjectName(QString::fromUtf8("cbSelection"));
            sizePolicy5.setHeightForWidth(cbSelection->sizePolicy().hasHeightForWidth());
            cbSelection->setSizePolicy(sizePolicy5);

            gridLayout1->addWidget(cbSelection, 0, 5, 1, 1);


            gridLayout->addWidget(frame_6, 0, 5, 2, 2,Qt::AlignTop);

            bReplaceAll = new QPushButton(this);
            bReplaceAll->setObjectName(QString::fromUtf8("bReplaceAll"));
            QSizePolicy sizePolicy6(QSizePolicy::Maximum, QSizePolicy::Fixed);
            sizePolicy6.setHorizontalStretch(0);
            sizePolicy6.setVerticalStretch(0);
            sizePolicy6.setHeightForWidth(bReplaceAll->sizePolicy().hasHeightForWidth());
            bReplaceAll->setSizePolicy(sizePolicy6);

            gridLayout->addWidget(bReplaceAll, 2, 5, 1, 1);

            frame = new QFrame(this);
            frame->setObjectName(QString::fromUtf8("frame"));
            frame->setFrameShape(QFrame::NoFrame);
            frame->setFrameShadow(QFrame::Raised);
            hboxLayout1 = new QHBoxLayout(frame);
            hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
            hboxLayout1->setContentsMargins(-1, 0, -1, 0);
            cbPrompt = new QCheckBox(frame);
            cbPrompt->setObjectName(QString::fromUtf8("cbPrompt"));
            sizePolicy5.setHeightForWidth(cbPrompt->sizePolicy().hasHeightForWidth());
            cbPrompt->setSizePolicy(sizePolicy5);
            cbPrompt->setChecked(false);

            hboxLayout1->addWidget(cbPrompt);

            cbReplaceAll = new QCheckBox(frame);
            cbReplaceAll->setObjectName(QString::fromUtf8("cbReplaceAll"));
            sizePolicy5.setHeightForWidth(cbReplaceAll->sizePolicy().hasHeightForWidth());
            cbReplaceAll->setSizePolicy(sizePolicy5);

            hboxLayout1->addWidget(cbReplaceAll);

            cbEscapeSeq = new QCheckBox(frame);
            cbEscapeSeq->setObjectName(QString::fromUtf8("cbEscapeSeq"));
            sizePolicy5.setHeightForWidth(cbEscapeSeq->sizePolicy().hasHeightForWidth());
            cbEscapeSeq->setSizePolicy(sizePolicy5);

            hboxLayout1->addWidget(cbEscapeSeq);


            gridLayout->addWidget(frame, 2, 6, 1, 1);

            cbReplace = new QCheckBox(this);
            cbReplace->setObjectName(QString::fromUtf8("cbReplace"));
            sizePolicy5.setHeightForWidth(cbReplace->sizePolicy().hasHeightForWidth());
            cbReplace->setSizePolicy(sizePolicy5);
            cbReplace->setLayoutDirection(Qt::LeftToRight);
            cbReplace->setChecked(true);

            gridLayout->addWidget(cbReplace, 2, 0, 1, 1);

            leReplace = new QLineEdit(this);
            leReplace->setObjectName(QString::fromUtf8("leReplace"));
            leReplace->setEnabled(true);
            QSizePolicy sizePolicy7(QSizePolicy::Minimum, QSizePolicy::Fixed);
            sizePolicy7.setHorizontalStretch(2);
            sizePolicy7.setVerticalStretch(0);
            sizePolicy7.setHeightForWidth(leReplace->sizePolicy().hasHeightForWidth());
            leReplace->setSizePolicy(sizePolicy7);
            leReplace->setMinimumSize(QSize(120, 22));
            leReplace->setMaximumSize(QSize(1200, 16777215));

            gridLayout->addWidget(leReplace, 2, 1, 1, 1);

            bReplaceNext = new QToolButton(this);
            bReplaceNext->setObjectName(QString::fromUtf8("bReplaceNext"));
            sizePolicy2.setHeightForWidth(bReplaceNext->sizePolicy().hasHeightForWidth());
            bReplaceNext->setSizePolicy(sizePolicy2);
            bReplaceNext->setMinimumSize(QSize(20, 20));
            bReplaceNext->setMaximumSize(QSize(20, 20));
            QIcon icon4;
            icon4.addFile(QString::fromUtf8(":/images/qcodeedit/replacedown.png"), QSize(), QIcon::Normal, QIcon::Off);
            bReplaceNext->setIcon(icon4);

            gridLayout->addWidget(bReplaceNext, 2, 3, 1, 1);

            bReplacePrevious = new QToolButton(this);
            bReplacePrevious->setObjectName(QString::fromUtf8("bReplacePrevious"));
            sizePolicy2.setHeightForWidth(bReplacePrevious->sizePolicy().hasHeightForWidth());
            bReplacePrevious->setSizePolicy(sizePolicy2);
            bReplacePrevious->setMinimumSize(QSize(20, 20));
            bReplacePrevious->setMaximumSize(QSize(20, 20));
            QIcon icon5;
            icon5.addFile(QString::fromUtf8(":/images/qcodeedit/replaceup.png"), QSize(), QIcon::Normal, QIcon::Off);
            bReplacePrevious->setIcon(icon5);

            gridLayout->addWidget(bReplacePrevious, 2, 4, 1, 1);


            //retranslateUi(this);
            QObject::connect(cbReplace, SIGNAL(toggled(bool)), cbReplace, SLOT(setVisible(bool)));
            QObject::connect(cbReplace, SIGNAL(toggled(bool)), leReplace, SLOT(setVisible(bool)));
            QObject::connect(cbReplace, SIGNAL(toggled(bool)), bReplacePrevious, SLOT(setVisible(bool)));
            QObject::connect(cbReplace, SIGNAL(toggled(bool)), bReplaceNext, SLOT(setVisible(bool)));
            QObject::connect(cbReplace, SIGNAL(toggled(bool)), frame, SLOT(setVisible(bool)));
            QObject::connect(cbReplace, SIGNAL(toggled(bool)), bReplaceAll, SLOT(setVisible(bool)));
            QObject::connect(bClose, SIGNAL(clicked()), this, SLOT(close()));

            // coonect by name ????
            QMetaObject::connectSlotsByName(this);

            // set texts
            #ifndef QT_NO_TOOLTIP
                    bClose->setToolTip(QApplication::translate("SearchReplace", "Close search/replace panel", 0, QApplication::UnicodeUTF8));
                    bRefresh->setToolTip(QApplication::translate("SearchReplace", "Refresh search underlying context (as an attempt to correct search behavior)", 0, QApplication::UnicodeUTF8));
                    leFind->setToolTip(QApplication::translate("SearchReplace", "Text or pattern to search for", 0, QApplication::UnicodeUTF8));
                    bNext->setToolTip(QApplication::translate("SearchReplace", "Find next occurence", 0, QApplication::UnicodeUTF8));
                    bPrevious->setToolTip(QApplication::translate("SearchReplace", "Find previous occurence", 0, QApplication::UnicodeUTF8));
                    leReplace->setToolTip(QApplication::translate("SearchReplace", "Replacement text", 0, QApplication::UnicodeUTF8));
                    bReplaceNext->setToolTip(QApplication::translate("SearchReplace", "Find next occurence", 0, QApplication::UnicodeUTF8));
                    bReplacePrevious->setToolTip(QApplication::translate("SearchReplace", "Find previous occurence", 0, QApplication::UnicodeUTF8));
            #endif // QT_NO_TOOLTIP
                    bClose->setText(QString());
                    bRefresh->setText(QString());
                    label->setText(QApplication::translate("SearchReplace", " Find :", 0, QApplication::UnicodeUTF8));
                    label->setMinimumWidth(label->sizeHint().width());
                    bNext->setText(QString());
                    bPrevious->setText(QString());
                    cbCase->setText(QApplication::translate("SearchReplace", "Case", 0, QApplication::UnicodeUTF8));
                    cbCase->setMinimumWidth(cbCase->sizeHint().width());
                    cbWords->setText(QApplication::translate("SearchReplace", "Words", 0, QApplication::UnicodeUTF8));
                    cbWords->setMinimumWidth(cbWords->sizeHint().width());
                    cbRegExp->setText(QApplication::translate("SearchReplace", "Regexp", 0, QApplication::UnicodeUTF8));
                    cbRegExp->setMinimumWidth(cbRegExp->sizeHint().width());
                    cbHighlight->setText(QApplication::translate("SearchReplace", "Highlight all", 0, QApplication::UnicodeUTF8));
                    cbHighlight->setMinimumWidth(cbHighlight->sizeHint().width());
                    cbCursor->setText(QApplication::translate("SearchReplace", "Cursor", 0, QApplication::UnicodeUTF8));
                    cbCursor->setMinimumWidth(cbCursor->sizeHint().width());
                    cbSelection->setText(QApplication::translate("SearchReplace", "Selection", 0, QApplication::UnicodeUTF8));
                    cbSelection->setMinimumWidth(cbSelection->sizeHint().width());
                    bReplaceAll->setText(QApplication::translate("SearchReplace", "all", 0, QApplication::UnicodeUTF8));
                    cbPrompt->setText(QApplication::translate("SearchReplace", "Prompt on replace", 0, QApplication::UnicodeUTF8));
                    cbReplaceAll->setText(QApplication::translate("SearchReplace", "Replace all", 0, QApplication::UnicodeUTF8));
                    cbEscapeSeq->setText(QApplication::translate("SearchReplace", "Escape sequences", 0, QApplication::UnicodeUTF8));
                    cbReplace->setText(QApplication::translate("SearchReplace", "Replace :", 0, QApplication::UnicodeUTF8));
                    bReplaceNext->setText(QString());
                    bReplacePrevious->setText(QString());

                    minimum_width=frame_2->sizeHint().width()+leFind->sizeHint().width()+2*bNext->sizeHint().width()+5*hboxLayout->spacing();
            //

	setDefaultVisibility(false);

	cbCase->setChecked(false);

	leFind->installEventFilter(this);
	leReplace->installEventFilter(this);
	
	cbReplaceAll->setVisible(false);


}
コード例 #12
0
    void setupUi(QDialog *MVPPlayerRemoteDialog)
    {
        if (MVPPlayerRemoteDialog->objectName().isEmpty())
            MVPPlayerRemoteDialog->setObjectName(QStringLiteral("MVPPlayerRemoteDialog"));
        MVPPlayerRemoteDialog->resize(380, 396);
        MVPPlayerRemoteDialog->setAcceptDrops(true);
        verticalLayout_4 = new QVBoxLayout(MVPPlayerRemoteDialog);
        verticalLayout_4->setObjectName(QStringLiteral("verticalLayout_4"));
        verticalLayout_2 = new QVBoxLayout();
#ifndef Q_OS_MAC
        verticalLayout_2->setSpacing(-1);
#endif
        verticalLayout_2->setObjectName(QStringLiteral("verticalLayout_2"));
        verticalLayout_2->setContentsMargins(-1, 0, 0, -1);
        verticalLayout_3 = new QVBoxLayout();
        verticalLayout_3->setObjectName(QStringLiteral("verticalLayout_3"));
        verticalLayout_3->setSizeConstraint(QLayout::SetMinimumSize);
        horizontalLayout_4 = new QHBoxLayout();
        horizontalLayout_4->setObjectName(QStringLiteral("horizontalLayout_4"));
        horizontalLayout_4->setSizeConstraint(QLayout::SetMinimumSize);
        sliderVolume = new QSlider(MVPPlayerRemoteDialog);
        sliderVolume->setObjectName(QStringLiteral("sliderVolume"));
        QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(sliderVolume->sizePolicy().hasHeightForWidth());
        sliderVolume->setSizePolicy(sizePolicy);
        sliderVolume->setMinimumSize(QSize(0, 0));
        sliderVolume->setMaximum(100);
        sliderVolume->setValue(100);
        sliderVolume->setOrientation(Qt::Horizontal);

        horizontalLayout_4->addWidget(sliderVolume);

        lblVol = new QLabel(MVPPlayerRemoteDialog);
        lblVol->setObjectName(QStringLiteral("lblVol"));
        QSizePolicy sizePolicy1(QSizePolicy::Maximum, QSizePolicy::Preferred);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
        sizePolicy1.setHeightForWidth(lblVol->sizePolicy().hasHeightForWidth());
        lblVol->setSizePolicy(sizePolicy1);
        lblVol->setPixmap(QPixmap(QString::fromUtf8(":/mvpplayer/app/icon.png")));
        lblVol->setAlignment(Qt::AlignCenter);

        horizontalLayout_4->addWidget(lblVol);


        verticalLayout_3->addLayout(horizontalLayout_4);

        layoutButtonsBar = new QHBoxLayout();
        layoutButtonsBar->setObjectName(QStringLiteral("layoutButtonsBar"));
        btnServer = new QToolButton(MVPPlayerRemoteDialog);
        btnServer->setObjectName(QStringLiteral("btnServer"));
        QIcon icon;
        icon.addFile(QStringLiteral(":/mvpplayer/toolbar/connection.png"), QSize(), QIcon::Normal, QIcon::Off);
        btnServer->setIcon(icon);
        btnServer->setIconSize(QSize(32, 32));
        btnServer->setCheckable(true);

        layoutButtonsBar->addWidget(btnServer);


        verticalLayout_3->addLayout(layoutButtonsBar);


        verticalLayout_2->addLayout(verticalLayout_3);

        line_2 = new QFrame(MVPPlayerRemoteDialog);
        line_2->setObjectName(QStringLiteral("line_2"));
        line_2->setFrameShape(QFrame::HLine);
        line_2->setFrameShadow(QFrame::Sunken);

        verticalLayout_2->addWidget(line_2);

        cbMute = new QCheckBox(MVPPlayerRemoteDialog);
        cbMute->setObjectName(QStringLiteral("cbMute"));
        cbMute->setChecked(true);

        verticalLayout_2->addWidget(cbMute);

        verticalLayout = new QVBoxLayout();
        verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
        verticalLayout->setSizeConstraint(QLayout::SetNoConstraint);
        horizontalLayout_2 = new QHBoxLayout();
        horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
        label = new QLabel(MVPPlayerRemoteDialog);
        label->setObjectName(QStringLiteral("label"));

        horizontalLayout_2->addWidget(label);

        lblCurrentTrack = new QLabel(MVPPlayerRemoteDialog);
        lblCurrentTrack->setObjectName(QStringLiteral("lblCurrentTrack"));
        QSizePolicy sizePolicy2(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
        sizePolicy2.setHorizontalStretch(0);
        sizePolicy2.setVerticalStretch(0);
        sizePolicy2.setHeightForWidth(lblCurrentTrack->sizePolicy().hasHeightForWidth());
        lblCurrentTrack->setSizePolicy(sizePolicy2);
        lblCurrentTrack->setWordWrap(true);

        horizontalLayout_2->addWidget(lblCurrentTrack);

        lblTrackLength = new QLabel(MVPPlayerRemoteDialog);
        lblTrackLength->setObjectName(QStringLiteral("lblTrackLength"));
        lblTrackLength->setAlignment(Qt::AlignCenter);

        horizontalLayout_2->addWidget(lblTrackLength);


        verticalLayout->addLayout(horizontalLayout_2);

        horizontalLayout_3 = new QHBoxLayout();
        horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3"));
        sliderPosition = new QSlider(MVPPlayerRemoteDialog);
        sliderPosition->setObjectName(QStringLiteral("sliderPosition"));
        sliderPosition->setMaximum(100);
        sliderPosition->setOrientation(Qt::Horizontal);
        sliderPosition->setInvertedAppearance(false);
        sliderPosition->setInvertedControls(false);
        sliderPosition->setTickPosition(QSlider::TicksBelow);
        sliderPosition->setTickInterval(1);

        horizontalLayout_3->addWidget(sliderPosition);


        verticalLayout->addLayout(horizontalLayout_3);

        horizontalLayout_5 = new QHBoxLayout();
        horizontalLayout_5->setObjectName(QStringLiteral("horizontalLayout_5"));
        btnClearPlaylist = new QToolButton(MVPPlayerRemoteDialog);
        btnClearPlaylist->setObjectName(QStringLiteral("btnClearPlaylist"));
        QIcon icon1;
        icon1.addFile(QStringLiteral(":/mvpplayer/action/cancel.png"), QSize(), QIcon::Normal, QIcon::Off);
        btnClearPlaylist->setIcon(icon1);

        horizontalLayout_5->addWidget(btnClearPlaylist);

        lblPlaylist = new QLabel(MVPPlayerRemoteDialog);
        lblPlaylist->setObjectName(QStringLiteral("lblPlaylist"));

        horizontalLayout_5->addWidget(lblPlaylist);


        verticalLayout->addLayout(horizontalLayout_5);

        playlist = new QListWidget(MVPPlayerRemoteDialog);
        playlist->setObjectName(QStringLiteral("playlist"));
        QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Maximum);
        sizePolicy3.setHorizontalStretch(0);
        sizePolicy3.setVerticalStretch(0);
        sizePolicy3.setHeightForWidth(playlist->sizePolicy().hasHeightForWidth());
        playlist->setSizePolicy(sizePolicy3);
        playlist->setDragDropMode(QAbstractItemView::DropOnly);

        verticalLayout->addWidget(playlist);


        verticalLayout_2->addLayout(verticalLayout);


        verticalLayout_4->addLayout(verticalLayout_2);

        QWidget::setTabOrder(cbMute, sliderPosition);
        QWidget::setTabOrder(sliderPosition, playlist);

        retranslateUi(MVPPlayerRemoteDialog);

        QMetaObject::connectSlotsByName(MVPPlayerRemoteDialog);
    } // setupUi
コード例 #13
0
void EquipmentEditor::doLayout()
{
   resize(0,0);
   topVLayout = new QVBoxLayout(this);
      horizontalLayout_equipments = new QHBoxLayout();
         label = new QLabel(this);
         equipmentComboBox = new QComboBox(this);
            equipmentComboBox->setObjectName(QStringLiteral("equipmentComboBox"));
            equipmentComboBox->setMinimumSize(QSize(200, 0));
            equipmentComboBox->setSizeAdjustPolicy(QComboBox::AdjustToContents);
         pushButton_remove = new QPushButton(this);
            pushButton_remove->setObjectName(QStringLiteral("pushButton_remove"));
            QIcon icon;
            icon.addFile(QStringLiteral(":/images/smallMinus.svg"), QSize(), QIcon::Normal, QIcon::Off);
            pushButton_remove->setIcon(icon);
            pushButton_remove->setAutoDefault(false);
         horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
         checkBox_defaultEquipment = new QCheckBox(this);
            checkBox_defaultEquipment->setObjectName(QStringLiteral("checkBox_defaultEquipment"));
         horizontalLayout_equipments->addWidget(label);
         horizontalLayout_equipments->addWidget(equipmentComboBox);
         horizontalLayout_equipments->addWidget(pushButton_remove);
         horizontalLayout_equipments->addItem(horizontalSpacer);
         horizontalLayout_equipments->addWidget(checkBox_defaultEquipment);
      horizontalLayout = new QHBoxLayout();
         vLayout_left = new QVBoxLayout();
            groupBox_required = new QGroupBox(this);
               groupBox_required->setProperty("configSection", QVariant(QStringLiteral("equipmentEditor")));
               formLayout = new QFormLayout(groupBox_required);
                  label_name = new QLabel(groupBox_required);
                     label_name->setObjectName(QStringLiteral("label_name"));
                     QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred);
                     sizePolicy1.setHorizontalStretch(0);
                     sizePolicy1.setVerticalStretch(0);
                     sizePolicy1.setHeightForWidth(label_name->sizePolicy().hasHeightForWidth());
                     label_name->setSizePolicy(sizePolicy1);
                  lineEdit_name = new QLineEdit(groupBox_required);
                     lineEdit_name->setObjectName(QStringLiteral("lineEdit_name"));
                     QSizePolicy sizePolicy2(QSizePolicy::Fixed, QSizePolicy::Fixed);
                     sizePolicy2.setHorizontalStretch(100);
                     sizePolicy2.setVerticalStretch(0);
                     sizePolicy2.setHeightForWidth(lineEdit_name->sizePolicy().hasHeightForWidth());
                     lineEdit_name->setSizePolicy(sizePolicy2);
                     lineEdit_name->setMinimumSize(QSize(100, 0));
                     lineEdit_name->setMaximumSize(QSize(100, 16777215));
                  label_boilSize = new BtVolumeLabel(groupBox_required);
                     label_boilSize->setObjectName(QStringLiteral("label_boilSize"));
                     sizePolicy1.setHeightForWidth(label_boilSize->sizePolicy().hasHeightForWidth());
                     label_boilSize->setSizePolicy(sizePolicy1);
                     label_boilSize->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_boilSize = new BtVolumeEdit(groupBox_required);
                     lineEdit_boilSize->setObjectName(QStringLiteral("lineEdit_boilSize"));
                     sizePolicy2.setHeightForWidth(lineEdit_boilSize->sizePolicy().hasHeightForWidth());
                     lineEdit_boilSize->setSizePolicy(sizePolicy2);
                     lineEdit_boilSize->setMinimumSize(QSize(100, 0));
                     lineEdit_boilSize->setMaximumSize(QSize(100, 16777215));
                     lineEdit_boilSize->setProperty("editField", QVariant(QStringLiteral("boilSize_l")));
                  label_calcBoilVolume = new QLabel(groupBox_required);
                     label_calcBoilVolume->setObjectName(QStringLiteral("label_calcBoilVolume"));
                     sizePolicy1.setHeightForWidth(label_calcBoilVolume->sizePolicy().hasHeightForWidth());
                     label_calcBoilVolume->setSizePolicy(sizePolicy1);
                  checkBox_calcBoilVolume = new QCheckBox(groupBox_required);
                     checkBox_calcBoilVolume->setObjectName(QStringLiteral("checkBox_calcBoilVolume"));
                  label_batchSize = new BtVolumeLabel(groupBox_required);
                     label_batchSize->setObjectName(QStringLiteral("label_batchSize"));
                     sizePolicy1.setHeightForWidth(label_batchSize->sizePolicy().hasHeightForWidth());
                     label_batchSize->setSizePolicy(sizePolicy1);
                     label_batchSize->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_batchSize = new BtVolumeEdit(groupBox_required);
                     lineEdit_batchSize->setObjectName(QStringLiteral("lineEdit_batchSize"));
                     sizePolicy2.setHeightForWidth(lineEdit_batchSize->sizePolicy().hasHeightForWidth());
                     lineEdit_batchSize->setSizePolicy(sizePolicy2);
                     lineEdit_batchSize->setMinimumSize(QSize(100, 0));
                     lineEdit_batchSize->setMaximumSize(QSize(100, 16777215));
                     lineEdit_batchSize->setProperty("editField", QVariant(QStringLiteral("batchSize_l")));
                  formLayout->setWidget(0, QFormLayout::LabelRole, label_name);
                  formLayout->setWidget(0, QFormLayout::FieldRole, lineEdit_name);
                  formLayout->setWidget(1, QFormLayout::LabelRole, label_boilSize);
                  formLayout->setWidget(1, QFormLayout::FieldRole, lineEdit_boilSize);
                  formLayout->setWidget(2, QFormLayout::LabelRole, label_calcBoilVolume);
                  formLayout->setWidget(2, QFormLayout::FieldRole, checkBox_calcBoilVolume);
                  formLayout->setWidget(3, QFormLayout::LabelRole, label_batchSize);
                  formLayout->setWidget(3, QFormLayout::FieldRole, lineEdit_batchSize);
            groupBox_water = new QGroupBox(this);
               formLayout_water = new QFormLayout(groupBox_water);
                  formLayout_water->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
                  label_boilTime = new BtTimeLabel(groupBox_water);
                     label_boilTime->setObjectName(QStringLiteral("label_boilTime"));
                     sizePolicy1.setHeightForWidth(label_boilTime->sizePolicy().hasHeightForWidth());
                     label_boilTime->setSizePolicy(sizePolicy1);
                     label_boilTime->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_boilTime = new BtTimeEdit(groupBox_water);
                     lineEdit_boilTime->setObjectName(QStringLiteral("lineEdit_boilTime"));
                     sizePolicy2.setHeightForWidth(lineEdit_boilTime->sizePolicy().hasHeightForWidth());
                     lineEdit_boilTime->setSizePolicy(sizePolicy2);
                     lineEdit_boilTime->setMinimumSize(QSize(100, 0));
                     lineEdit_boilTime->setMaximumSize(QSize(100, 16777215));
                     lineEdit_boilTime->setProperty("editField", QVariant(QStringLiteral("boilTime_min")));
                  label_evaporationRate = new BtVolumeLabel(groupBox_water);
                     label_evaporationRate->setObjectName(QStringLiteral("label_evaporationRate"));
                     sizePolicy1.setHeightForWidth(label_evaporationRate->sizePolicy().hasHeightForWidth());
                     label_evaporationRate->setSizePolicy(sizePolicy1);
                     label_evaporationRate->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_evaporationRate = new BtVolumeEdit(groupBox_water);
                     lineEdit_evaporationRate->setObjectName(QStringLiteral("lineEdit_evaporationRate"));
                     sizePolicy2.setHeightForWidth(lineEdit_evaporationRate->sizePolicy().hasHeightForWidth());
                     lineEdit_evaporationRate->setSizePolicy(sizePolicy2);
                     lineEdit_evaporationRate->setMinimumSize(QSize(100, 0));
                     lineEdit_evaporationRate->setMaximumSize(QSize(100, 16777215));
                     lineEdit_evaporationRate->setProperty("editField", QVariant(QStringLiteral("evapRate_lHr")));
                  label_topUpKettle = new BtVolumeLabel(groupBox_water);
                     label_topUpKettle->setObjectName(QStringLiteral("label_topUpKettle"));
                     sizePolicy1.setHeightForWidth(label_topUpKettle->sizePolicy().hasHeightForWidth());
                     label_topUpKettle->setSizePolicy(sizePolicy1);
                     label_topUpKettle->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_topUpKettle = new BtVolumeEdit(groupBox_water);
                     lineEdit_topUpKettle->setObjectName(QStringLiteral("lineEdit_topUpKettle"));
                     sizePolicy2.setHeightForWidth(lineEdit_topUpKettle->sizePolicy().hasHeightForWidth());
                     lineEdit_topUpKettle->setSizePolicy(sizePolicy2);
                     lineEdit_topUpKettle->setMinimumSize(QSize(100, 0));
                     lineEdit_topUpKettle->setMaximumSize(QSize(100, 16777215));
                     lineEdit_topUpKettle->setProperty("editField", QVariant(QStringLiteral("topUpKettle_l")));
                  label_topUpWater = new BtVolumeLabel(groupBox_water);
                     label_topUpWater->setObjectName(QStringLiteral("label_topUpWater"));
                     sizePolicy1.setHeightForWidth(label_topUpWater->sizePolicy().hasHeightForWidth());
                     label_topUpWater->setSizePolicy(sizePolicy1);
                     label_topUpWater->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_topUpWater = new BtVolumeEdit(groupBox_water);
                     lineEdit_topUpWater->setObjectName(QStringLiteral("lineEdit_topUpWater"));
                     sizePolicy2.setHeightForWidth(lineEdit_topUpWater->sizePolicy().hasHeightForWidth());
                     lineEdit_topUpWater->setSizePolicy(sizePolicy2);
                     lineEdit_topUpWater->setMinimumSize(QSize(100, 0));
                     lineEdit_topUpWater->setMaximumSize(QSize(100, 16777215));
                     lineEdit_topUpWater->setProperty("editField", QVariant(QStringLiteral("topUpKettle_l")));
                  label_absorption = new QLabel(groupBox_water);
                     label_absorption->setObjectName(QStringLiteral("label_absorption"));
                  lineEdit_grainAbsorption = new BtGenericEdit(groupBox_water);
                     lineEdit_grainAbsorption->setObjectName(QStringLiteral("lineEdit_grainAbsorption"));
                     QSizePolicy sizePolicy3(QSizePolicy::Preferred, QSizePolicy::Fixed);
                     sizePolicy3.setHorizontalStretch(0);
                     sizePolicy3.setVerticalStretch(0);
                     sizePolicy3.setHeightForWidth(lineEdit_grainAbsorption->sizePolicy().hasHeightForWidth());
                     lineEdit_grainAbsorption->setSizePolicy(sizePolicy3);
                     lineEdit_grainAbsorption->setMaximumSize(QSize(100, 16777215));
                     lineEdit_grainAbsorption->setProperty("editField", QVariant(QStringLiteral("grainAbsorption_LKg")));
                  pushButton_absorption = new QPushButton(groupBox_water);
                     pushButton_absorption->setObjectName(QStringLiteral("pushButton_absorption"));
                  label_boilingPoint = new BtTemperatureLabel(groupBox_water);
                     label_boilingPoint->setObjectName(QStringLiteral("label_boilingPoint"));
                     label_boilingPoint->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_boilingPoint = new BtTemperatureEdit(groupBox_water);
                     lineEdit_boilingPoint->setObjectName(QStringLiteral("lineEdit_boilingPoint"));
                     sizePolicy3.setHeightForWidth(lineEdit_boilingPoint->sizePolicy().hasHeightForWidth());
                     lineEdit_boilingPoint->setSizePolicy(sizePolicy3);
                     lineEdit_boilingPoint->setMaximumSize(QSize(100, 16777215));
                     lineEdit_boilingPoint->setProperty("editField", QVariant(QStringLiteral("boilingPoint_c")));
                  label_hopUtilization = new QLabel(groupBox_water);
                     label_hopUtilization->setObjectName(QStringLiteral("label_hopUtilization"));
                  lineEdit_hopUtilization = new BtGenericEdit(groupBox_water);
                     lineEdit_hopUtilization->setObjectName(QStringLiteral("lineEdit_hopUtilization"));
                     sizePolicy3.setHeightForWidth(lineEdit_hopUtilization->sizePolicy().hasHeightForWidth());
                     lineEdit_hopUtilization->setSizePolicy(sizePolicy3);
                     lineEdit_hopUtilization->setMaximumSize(QSize(100, 16777215));
                     lineEdit_hopUtilization->setProperty("editField", QVariant(QStringLiteral("hopUtilization_pct")));
                  formLayout_water->setWidget(0, QFormLayout::LabelRole, label_boilTime);
                  formLayout_water->setWidget(0, QFormLayout::FieldRole, lineEdit_boilTime);
                  formLayout_water->setWidget(1, QFormLayout::LabelRole, label_evaporationRate);
                  formLayout_water->setWidget(1, QFormLayout::FieldRole, lineEdit_evaporationRate);
                  formLayout_water->setWidget(2, QFormLayout::LabelRole, label_topUpKettle);
                  formLayout_water->setWidget(2, QFormLayout::FieldRole, lineEdit_topUpKettle);
                  formLayout_water->setWidget(3, QFormLayout::LabelRole, label_topUpWater);
                  formLayout_water->setWidget(3, QFormLayout::FieldRole, lineEdit_topUpWater);
                  formLayout_water->setWidget(4, QFormLayout::LabelRole, label_absorption);
                  formLayout_water->setWidget(4, QFormLayout::FieldRole, lineEdit_grainAbsorption);
                  formLayout_water->setWidget(5, QFormLayout::LabelRole, pushButton_absorption);
                  formLayout_water->setWidget(6, QFormLayout::LabelRole, label_boilingPoint);
                  formLayout_water->setWidget(6, QFormLayout::FieldRole, lineEdit_boilingPoint);
                  formLayout_water->setWidget(7, QFormLayout::LabelRole, label_hopUtilization);
                  formLayout_water->setWidget(7, QFormLayout::FieldRole, lineEdit_hopUtilization);
            verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
            vLayout_left->addWidget(groupBox_required);
            vLayout_left->addWidget(groupBox_water);
            vLayout_left->addItem(verticalSpacer_2);
         vLayout_right = new QVBoxLayout();
            groupBox_mashTun = new QGroupBox(this);
               groupBox_mashTun->setObjectName(QStringLiteral("groupBox_mashTun"));
               groupBox_mashTun->setProperty("configSection", QVariant(QStringLiteral("equipmentEditor")));
               formLayout_mashTun = new QFormLayout(groupBox_mashTun);
                  formLayout_mashTun->setObjectName(QStringLiteral("formLayout_mashTun"));
                  label_tunVolume = new BtVolumeLabel(groupBox_mashTun);
                     label_tunVolume->setObjectName(QStringLiteral("label_tunVolume"));
                     sizePolicy1.setHeightForWidth(label_tunVolume->sizePolicy().hasHeightForWidth());
                     label_tunVolume->setSizePolicy(sizePolicy1);
                     label_tunVolume->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_tunVolume = new BtVolumeEdit(groupBox_mashTun);
                     lineEdit_tunVolume->setObjectName(QStringLiteral("lineEdit_tunVolume"));
                     sizePolicy2.setHeightForWidth(lineEdit_tunVolume->sizePolicy().hasHeightForWidth());
                     lineEdit_tunVolume->setSizePolicy(sizePolicy2);
                     lineEdit_tunVolume->setMinimumSize(QSize(100, 0));
                     lineEdit_tunVolume->setMaximumSize(QSize(100, 16777215));
                     lineEdit_tunVolume->setProperty("editField", QVariant(QStringLiteral("tunVolume_l")));
                  label_tunWeight = new BtMassLabel(groupBox_mashTun);
                     label_tunWeight->setObjectName(QStringLiteral("label_tunWeight"));
                     sizePolicy1.setHeightForWidth(label_tunWeight->sizePolicy().hasHeightForWidth());
                     label_tunWeight->setSizePolicy(sizePolicy1);
                     label_tunWeight->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_tunWeight = new BtMassEdit(groupBox_mashTun);
                     lineEdit_tunWeight->setObjectName(QStringLiteral("lineEdit_tunWeight"));
                     sizePolicy2.setHeightForWidth(lineEdit_tunWeight->sizePolicy().hasHeightForWidth());
                     lineEdit_tunWeight->setSizePolicy(sizePolicy2);
                     lineEdit_tunWeight->setMinimumSize(QSize(100, 0));
                     lineEdit_tunWeight->setMaximumSize(QSize(100, 16777215));
                     lineEdit_tunWeight->setProperty("editField", QVariant(QStringLiteral("tunWeight_kg")));
                  label_tunSpecificHeat = new QLabel(groupBox_mashTun);
                     label_tunSpecificHeat->setObjectName(QStringLiteral("label_tunSpecificHeat"));
                     sizePolicy1.setHeightForWidth(label_tunSpecificHeat->sizePolicy().hasHeightForWidth());
                     label_tunSpecificHeat->setSizePolicy(sizePolicy1);
                  lineEdit_tunSpecificHeat = new BtGenericEdit(groupBox_mashTun);
                     lineEdit_tunSpecificHeat->setObjectName(QStringLiteral("lineEdit_tunSpecificHeat"));
                     sizePolicy2.setHeightForWidth(lineEdit_tunSpecificHeat->sizePolicy().hasHeightForWidth());
                     lineEdit_tunSpecificHeat->setSizePolicy(sizePolicy2);
                     lineEdit_tunSpecificHeat->setMinimumSize(QSize(100, 0));
                     lineEdit_tunSpecificHeat->setMaximumSize(QSize(100, 16777215));
                  formLayout_mashTun->setWidget(0, QFormLayout::LabelRole, label_tunVolume);
                  formLayout_mashTun->setWidget(0, QFormLayout::FieldRole, lineEdit_tunVolume);
                  formLayout_mashTun->setWidget(1, QFormLayout::LabelRole, label_tunWeight);
                  formLayout_mashTun->setWidget(1, QFormLayout::FieldRole, lineEdit_tunWeight);
                  formLayout_mashTun->setWidget(2, QFormLayout::LabelRole, label_tunSpecificHeat);
                  formLayout_mashTun->setWidget(2, QFormLayout::FieldRole, lineEdit_tunSpecificHeat);
            groupBox_losses = new QGroupBox(this);
               groupBox_losses->setProperty("configSection", QVariant(QStringLiteral("equipmentEditor")));
               formLayout_losses = new QFormLayout(groupBox_losses);
                  label_trubChillerLoss = new BtVolumeLabel(groupBox_losses);
                     label_trubChillerLoss->setObjectName(QStringLiteral("label_trubChillerLoss"));
                     sizePolicy1.setHeightForWidth(label_trubChillerLoss->sizePolicy().hasHeightForWidth());
                     label_trubChillerLoss->setSizePolicy(sizePolicy1);
                     label_trubChillerLoss->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_trubChillerLoss = new BtVolumeEdit(groupBox_losses);
                     lineEdit_trubChillerLoss->setObjectName(QStringLiteral("lineEdit_trubChillerLoss"));
                     sizePolicy2.setHeightForWidth(lineEdit_trubChillerLoss->sizePolicy().hasHeightForWidth());
                     lineEdit_trubChillerLoss->setSizePolicy(sizePolicy2);
                     lineEdit_trubChillerLoss->setMinimumSize(QSize(100, 0));
                     lineEdit_trubChillerLoss->setMaximumSize(QSize(100, 16777215));
                     lineEdit_trubChillerLoss->setProperty("editField", QVariant(QStringLiteral("trubChillerLoss_l")));
                  label_lauterDeadspace = new BtVolumeLabel(groupBox_losses);
                     label_lauterDeadspace->setObjectName(QStringLiteral("label_lauterDeadspace"));
                     sizePolicy1.setHeightForWidth(label_lauterDeadspace->sizePolicy().hasHeightForWidth());
                     label_lauterDeadspace->setSizePolicy(sizePolicy1);
                     label_lauterDeadspace->setContextMenuPolicy(Qt::CustomContextMenu);
                  lineEdit_lauterDeadspace = new BtVolumeEdit(groupBox_losses);
                     lineEdit_lauterDeadspace->setObjectName(QStringLiteral("lineEdit_lauterDeadspace"));
                     sizePolicy2.setHeightForWidth(lineEdit_lauterDeadspace->sizePolicy().hasHeightForWidth());
                     lineEdit_lauterDeadspace->setSizePolicy(sizePolicy2);
                     lineEdit_lauterDeadspace->setMinimumSize(QSize(100, 0));
                     lineEdit_lauterDeadspace->setMaximumSize(QSize(100, 16777215));
                     lineEdit_lauterDeadspace->setProperty("editField", QVariant(QStringLiteral("lauterDeadspace_l")));
                  formLayout_losses->setWidget(0, QFormLayout::LabelRole, label_trubChillerLoss);
                  formLayout_losses->setWidget(0, QFormLayout::FieldRole, lineEdit_trubChillerLoss);
                  formLayout_losses->setWidget(1, QFormLayout::LabelRole, label_lauterDeadspace);
                  formLayout_losses->setWidget(1, QFormLayout::FieldRole, lineEdit_lauterDeadspace);
            groupBox_notes = new QGroupBox(this);
               verticalLayout_notes = new QVBoxLayout(groupBox_notes);
                  verticalLayout_notes->setObjectName(QStringLiteral("verticalLayout_notes"));
                  textEdit_notes = new QTextEdit(groupBox_notes);
                     textEdit_notes->setObjectName(QStringLiteral("textEdit_notes"));
                  verticalLayout_notes->addWidget(textEdit_notes);
            verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
            vLayout_right->addWidget(groupBox_mashTun);
            vLayout_right->addWidget(groupBox_losses);
            vLayout_right->addWidget(groupBox_notes);
            vLayout_right->addItem(verticalSpacer);
         horizontalLayout->addLayout(vLayout_left);
         horizontalLayout->addLayout(vLayout_right);
      hLayout_buttons = new QHBoxLayout();
         horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
         pushButton_new = new QPushButton(this);
            pushButton_new->setObjectName(QStringLiteral("pushButton_new"));
            QIcon icon1;
            icon1.addFile(QStringLiteral(":/images/smallPlus.svg"), QSize(), QIcon::Normal, QIcon::Off);
            pushButton_new->setIcon(icon1);
            pushButton_new->setAutoDefault(false);
         pushButton_save = new QPushButton(this);
            pushButton_save->setObjectName(QStringLiteral("pushButton_save"));
            QIcon icon2;
            icon2.addFile(QStringLiteral(":/images/filesave.svg"), QSize(), QIcon::Normal, QIcon::Off);
            pushButton_save->setIcon(icon2);
            pushButton_save->setAutoDefault(false);
            pushButton_save->setDefault(true);
         pushButton_cancel = new QPushButton(this);
            pushButton_cancel->setObjectName(QStringLiteral("pushButton_cancel"));
            QIcon icon3;
            icon3.addFile(QStringLiteral(":/images/exit.svg"), QSize(), QIcon::Normal, QIcon::Off);
            pushButton_cancel->setIcon(icon3);
            pushButton_cancel->setAutoDefault(false);
         hLayout_buttons->addItem(horizontalSpacer_2);
         hLayout_buttons->addWidget(pushButton_new);
         hLayout_buttons->addWidget(pushButton_save);
         hLayout_buttons->addWidget(pushButton_cancel);
   topVLayout->addLayout(horizontalLayout_equipments);
   topVLayout->addLayout(horizontalLayout);
   topVLayout->addLayout(hLayout_buttons);

#ifndef QT_NO_SHORTCUT
   label_name->setBuddy(lineEdit_name);
   label_boilSize->setBuddy(lineEdit_boilSize);
   label_calcBoilVolume->setBuddy(checkBox_calcBoilVolume);
   label_batchSize->setBuddy(lineEdit_batchSize);
   label_boilTime->setBuddy(lineEdit_boilTime);
   label_evaporationRate->setBuddy(lineEdit_evaporationRate);
   label_topUpKettle->setBuddy(lineEdit_topUpKettle);
   label_topUpWater->setBuddy(lineEdit_topUpWater);
   label_absorption->setBuddy(lineEdit_grainAbsorption);
   label_hopUtilization->setBuddy(lineEdit_hopUtilization);
   label_boilingPoint->setBuddy(lineEdit_boilingPoint);
   label_tunVolume->setBuddy(lineEdit_tunVolume);
   label_tunWeight->setBuddy(lineEdit_tunWeight);
   label_tunSpecificHeat->setBuddy(lineEdit_tunSpecificHeat);
   label_trubChillerLoss->setBuddy(lineEdit_trubChillerLoss);
   label_lauterDeadspace->setBuddy(lineEdit_lauterDeadspace);
#endif // QT_NO_SHORTCUT

   QWidget::setTabOrder(equipmentComboBox, pushButton_remove);
   QWidget::setTabOrder(pushButton_remove, checkBox_defaultEquipment);
   QWidget::setTabOrder(checkBox_defaultEquipment, lineEdit_name);
   QWidget::setTabOrder(lineEdit_name, lineEdit_boilSize);
   QWidget::setTabOrder(lineEdit_boilSize, checkBox_calcBoilVolume);
   QWidget::setTabOrder(checkBox_calcBoilVolume, lineEdit_batchSize);
   QWidget::setTabOrder(lineEdit_batchSize, lineEdit_boilTime);
   QWidget::setTabOrder(lineEdit_boilTime, lineEdit_evaporationRate);
   QWidget::setTabOrder(lineEdit_evaporationRate, lineEdit_topUpKettle);
   QWidget::setTabOrder(lineEdit_topUpKettle, lineEdit_topUpWater);
   QWidget::setTabOrder(lineEdit_topUpWater, lineEdit_grainAbsorption);
   QWidget::setTabOrder(lineEdit_grainAbsorption, pushButton_absorption);
   QWidget::setTabOrder(pushButton_absorption, lineEdit_boilingPoint);
   QWidget::setTabOrder(lineEdit_boilingPoint, lineEdit_hopUtilization);
   QWidget::setTabOrder(lineEdit_hopUtilization, lineEdit_tunVolume);
   QWidget::setTabOrder(lineEdit_tunVolume, lineEdit_tunWeight);
   QWidget::setTabOrder(lineEdit_tunWeight, lineEdit_tunSpecificHeat);
   QWidget::setTabOrder(lineEdit_tunSpecificHeat, lineEdit_trubChillerLoss);
   QWidget::setTabOrder(lineEdit_trubChillerLoss, lineEdit_lauterDeadspace);
   QWidget::setTabOrder(lineEdit_lauterDeadspace, textEdit_notes);
   QWidget::setTabOrder(textEdit_notes, pushButton_new);
   QWidget::setTabOrder(pushButton_new, pushButton_save);
   QWidget::setTabOrder(pushButton_save, pushButton_cancel);

   retranslateUi();
}
コード例 #14
0
ファイル: LoginPage.cpp プロジェクト: 4ynyky/icqdesktop
	LoginPage::LoginPage(QWidget* parent)
		: QWidget(parent)
		, country_code_(new LineEditEx(this))
		, phone_(new LineEditEx(this))
		, combobox_(new CountrySearchCombobox(this))
		, remaining_seconds_(0)
		, timer_(new QTimer(this))
	{
        setStyleSheet(Utils::LoadStyle(":/main_window/login_page.qss", Utils::get_scale_coefficient(), true));
        if (objectName().isEmpty())
            setObjectName(QStringLiteral("login_page"));
        setProperty("LoginPageWidget", QVariant(true));
        QVBoxLayout* verticalLayout = new QVBoxLayout(this);
        verticalLayout->setSpacing(0);
        verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
        verticalLayout->setContentsMargins(0, 0, 0, 0);
        
        auto back_button_widget = new QWidget(this);
        auto back_button_layout = new QHBoxLayout(back_button_widget);
        Utils::ApplyStyle(back_button_widget, "background-color: transparent;");
        back_button_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
        back_button_layout->setSpacing(0);
        back_button_layout->setContentsMargins(Utils::scale_value(14), Utils::scale_value(14), 0, 0);
        back_button_layout->setAlignment(Qt::AlignLeft);
        {
            prev_page_link_ = new BackButton(back_button_widget);
            prev_page_link_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
            prev_page_link_->setFlat(true);
            prev_page_link_->setFocusPolicy(Qt::NoFocus);
            prev_page_link_->setCursor(Qt::PointingHandCursor);
            {
                const QString s = "QPushButton { width: 20dip; height: 20dip; border: none; background-color: transparent; border-image: url(:/resources/contr_back_100.png); margin: 10dip; } QPushButton:hover { border-image: url(:/resources/contr_back_100_hover.png); } QPushButton#back_button:pressed { border-image: url(:/resources/contr_back_100_active.png); }";
                Utils::ApplyStyle(prev_page_link_, s);
            }
            back_button_layout->addWidget(prev_page_link_);
        }
        verticalLayout->addWidget(back_button_widget);
        
        /*
        QWidget* back_button_widget = new QWidget(this);
        back_button_widget->setObjectName(QStringLiteral("back_button_widget"));
        back_button_widget->setProperty("BackButtonWidget", QVariant(true));
        QHBoxLayout* back_button_layout = new QHBoxLayout(back_button_widget);
        back_button_layout->setSpacing(0);
        back_button_layout->setObjectName(QStringLiteral("back_button_layout"));
        back_button_layout->setContentsMargins(Utils::scale_value(14), Utils::scale_value(14), 0, 0);
        prev_page_link_ = new BackButton(back_button_widget);
        prev_page_link_->setObjectName(QStringLiteral("prev_page_link"));
        prev_page_link_->setCursor(QCursor(Qt::PointingHandCursor));
        prev_page_link_->setProperty("LoginBackButton", QVariant(true));
        back_button_layout->addWidget(prev_page_link_);
        
        QSpacerItem* horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        back_button_layout->addItem(horizontalSpacer_3);

        verticalLayout->addWidget(back_button_widget);
        */
         
        QSpacerItem* verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
        
        verticalLayout->addItem(verticalSpacer);
        
        QWidget* main_widget = new QWidget(this);
        main_widget->setObjectName(QStringLiteral("main_widget"));
        QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
        sizePolicy.setHorizontalStretch(0);
        sizePolicy.setVerticalStretch(0);
        sizePolicy.setHeightForWidth(main_widget->sizePolicy().hasHeightForWidth());
        main_widget->setSizePolicy(sizePolicy);
        main_widget->setProperty("CenterControlWidgetBack", QVariant(true));
        QHBoxLayout* main_layout = new QHBoxLayout(main_widget);
        main_layout->setSpacing(0);
        main_layout->setObjectName(QStringLiteral("main_layout"));
        main_layout->setContentsMargins(0, 0, 0, 0);
        QSpacerItem* horizontalSpacer_6 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        main_layout->addItem(horizontalSpacer_6);
        
        QWidget* controls_widget = new QWidget(main_widget);
        controls_widget->setObjectName(QStringLiteral("controls_widget"));
        QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Minimum);
        sizePolicy1.setHorizontalStretch(0);
        sizePolicy1.setVerticalStretch(0);
        sizePolicy1.setHeightForWidth(controls_widget->sizePolicy().hasHeightForWidth());
        controls_widget->setSizePolicy(sizePolicy1);
        controls_widget->setProperty("CenterContolWidget", QVariant(true));
        QVBoxLayout* controls_layout = new QVBoxLayout(controls_widget);
        controls_layout->setSpacing(0);
        controls_layout->setObjectName(QStringLiteral("controls_layout"));
        controls_layout->setContentsMargins(0, 0, 0, 0);
        PictureWidget* logo_widget = new PictureWidget(controls_widget, ":/resources/main_window/content_logo_100.png");
        logo_widget->setFixedHeight(Utils::scale_value(80));
        logo_widget->setFixedWidth(Utils::scale_value(80));
        controls_layout->addWidget(logo_widget);
        controls_layout->setAlignment(logo_widget, Qt::AlignHCenter);
        
        QLabel* welcome_label = new QLabel(controls_widget);
        welcome_label->setObjectName(QStringLiteral("welcome_label"));
        welcome_label->setAlignment(Qt::AlignCenter);
        welcome_label->setProperty("WelcomeTitle", QVariant(true));
        
        controls_layout->addWidget(welcome_label);
        
        hint_label_ = new QLabel(controls_widget);
        hint_label_->setObjectName(QStringLiteral("hint_label"));
        hint_label_->setAlignment(Qt::AlignCenter);
        hint_label_->setProperty("ActionHintLabel", QVariant(true));
        
        controls_layout->addWidget(hint_label_);
        
        QWidget * center_widget = new QWidget(controls_widget);
        center_widget->setObjectName(QStringLiteral("center_widget"));
        QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Preferred);
        sizePolicy2.setHorizontalStretch(0);
        sizePolicy2.setVerticalStretch(0);
        sizePolicy2.setHeightForWidth(center_widget->sizePolicy().hasHeightForWidth());
        center_widget->setSizePolicy(sizePolicy2);
        QHBoxLayout * horizontalLayout = new QHBoxLayout(center_widget);
        horizontalLayout->setSpacing(0);
        horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
        horizontalLayout->setContentsMargins(0, 0, 0, 0);
        QSpacerItem* horizontalSpacer_9 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        horizontalLayout->addItem(horizontalSpacer_9);
        
        login_staked_widget_ = new QStackedWidget(center_widget);
        login_staked_widget_->setObjectName(QStringLiteral("login_staked_widget"));
        login_staked_widget_->setProperty("LoginStackedWidget", QVariant(true));
        QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Preferred);
        sizePolicy3.setHorizontalStretch(0);
        sizePolicy3.setVerticalStretch(0);
        sizePolicy3.setHeightForWidth(login_staked_widget_->sizePolicy().hasHeightForWidth());
        login_staked_widget_->setSizePolicy(sizePolicy3);
        QWidget* phone_login_widget = new QWidget();
        phone_login_widget->setObjectName(QStringLiteral("phone_login_widget"));
        sizePolicy3.setHeightForWidth(phone_login_widget->sizePolicy().hasHeightForWidth());
        phone_login_widget->setSizePolicy(sizePolicy3);
        QVBoxLayout* phone_login_layout = new QVBoxLayout(phone_login_widget);
        phone_login_layout->setSpacing(0);
        phone_login_layout->setObjectName(QStringLiteral("phone_login_layout"));
        phone_login_layout->setContentsMargins(0, 0, 0, 0);
        
        country_search_widget_ = new QWidget(phone_login_widget);
        country_search_widget_->setObjectName(QStringLiteral("country_search_widget"));
        country_search_widget_->setProperty("CountrySearchWidget", QVariant(true));
        QVBoxLayout* country_search_layout = new QVBoxLayout(country_search_widget_);
        country_search_layout->setSpacing(0);
        country_search_layout->setObjectName(QStringLiteral("country_search_layout"));
        country_search_layout->setContentsMargins(0, 0, 0, 0);
        
        phone_login_layout->addWidget(country_search_widget_);
        
        phone_widget_ = new QFrame(phone_login_widget);
        phone_widget_->setObjectName(QStringLiteral("phone_widget"));
        phone_widget_->setFocusPolicy(Qt::ClickFocus);
        phone_widget_->setFrameShape(QFrame::NoFrame);
        phone_widget_->setFrameShadow(QFrame::Plain);
        phone_widget_->setLineWidth(0);
        phone_widget_->setProperty("EnterPhoneWidget", QVariant(true));
        QHBoxLayout* phone_widget_layout = new QHBoxLayout(phone_widget_);
        phone_widget_layout->setSpacing(0);
        phone_widget_layout->setObjectName(QStringLiteral("phone_widget_layout"));
        phone_widget_layout->setContentsMargins(0, 0, 0, 0);
        
        phone_login_layout->addWidget(phone_widget_);
        
        QSpacerItem* verticalSpacer_3 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
        
        phone_login_layout->addItem(verticalSpacer_3);
        
        login_staked_widget_->addWidget(phone_login_widget);
        QWidget* phone_confirm_widget = new QWidget();
        phone_confirm_widget->setObjectName(QStringLiteral("phone_confirm_widget"));
        sizePolicy3.setHeightForWidth(phone_confirm_widget->sizePolicy().hasHeightForWidth());
        phone_confirm_widget->setSizePolicy(sizePolicy3);
        QVBoxLayout* phone_confirm_layout = new QVBoxLayout(phone_confirm_widget);
        phone_confirm_layout->setSpacing(0);
        phone_confirm_layout->setObjectName(QStringLiteral("phone_confirm_layout"));
        phone_confirm_layout->setContentsMargins(0, 0, 0, 0);
        
        QWidget* entered_phone_widget = new QWidget(phone_confirm_widget);
        entered_phone_widget->setObjectName(QStringLiteral("entered_phone_widget"));
        entered_phone_widget->setProperty("EnteredPhoneWidget", QVariant(true));
        QHBoxLayout* horizontalLayout_6 = new QHBoxLayout(entered_phone_widget);
        horizontalLayout_6->setSpacing(0);
        horizontalLayout_6->setObjectName(QStringLiteral("horizontalLayout_6"));
        horizontalLayout_6->setContentsMargins(0, 0, 0, 0);
        QSpacerItem* horizontalSpacer_4 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        horizontalLayout_6->addItem(horizontalSpacer_4);
        
        entered_phone_ = new QLabel(entered_phone_widget);
        entered_phone_->setObjectName(QStringLiteral("entered_phone"));
        entered_phone_->setProperty("EnteredPhoneNumber", QVariant(true));
        
        horizontalLayout_6->addWidget(entered_phone_);
        
        edit_phone_button_ = new QPushButton(entered_phone_widget);
        edit_phone_button_->setObjectName(QStringLiteral("edit_phone_button"));
        edit_phone_button_->setCursor(QCursor(Qt::PointingHandCursor));
        edit_phone_button_->setProperty("EditPhoneButton", QVariant(true));
        
        horizontalLayout_6->addWidget(edit_phone_button_);
        
        QSpacerItem* horizontalSpacer_5 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        horizontalLayout_6->addItem(horizontalSpacer_5);
        
        phone_confirm_layout->addWidget(entered_phone_widget);
        
        resend_button_ = new QPushButton(phone_confirm_widget);
        resend_button_->setObjectName(QStringLiteral("resendButton"));
        resend_button_->setCursor(QCursor(Qt::PointingHandCursor));
        resend_button_->setFocusPolicy(Qt::StrongFocus);
        resend_button_->setProperty("ResendCodeButton", QVariant(true));
        
        phone_confirm_layout->addWidget(resend_button_);
        
        code_edit_ = new QLineEdit(phone_confirm_widget);
        code_edit_->setObjectName(QStringLiteral("code_edit"));
        code_edit_->setAlignment(Qt::AlignCenter);
        code_edit_->setProperty("EnteredCode", QVariant(true));
        code_edit_->setAttribute(Qt::WA_MacShowFocusRect, false);
        Testing::setAccessibleName(code_edit_, "StartWindowSMScodeField");
        
        phone_confirm_layout->addWidget(code_edit_);
        
        QSpacerItem* verticalSpacer_4 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
        
        phone_confirm_layout->addItem(verticalSpacer_4);
        
        login_staked_widget_->addWidget(phone_confirm_widget);
        QWidget* uin_login_widget = new QWidget();
        uin_login_widget->setObjectName(QStringLiteral("uin_login_widget"));
        sizePolicy3.setHeightForWidth(uin_login_widget->sizePolicy().hasHeightForWidth());
        uin_login_widget->setSizePolicy(sizePolicy3);
        QVBoxLayout * uin_login_layout = new QVBoxLayout(uin_login_widget);
        uin_login_layout->setSpacing(0);
        uin_login_layout->setObjectName(QStringLiteral("uin_login_layout"));
        uin_login_layout->setContentsMargins(0, 0, 0, 0);
        
        uin_login_edit_ = new QLineEdit(uin_login_widget);
        uin_login_edit_->setObjectName(QStringLiteral("uin_login_edit"));
        uin_login_edit_->setAlignment(Qt::AlignLeft);
        uin_login_edit_->setProperty("Uin", QVariant(true));
        Testing::setAccessibleName(uin_login_edit_, "StartWindowUinField");
        
        uin_login_layout->addWidget(uin_login_edit_);
        
        uin_password_edit_ = new QLineEdit(uin_login_widget);
        uin_password_edit_->setObjectName(QStringLiteral("uin_password_edit"));
        uin_password_edit_->setEchoMode(QLineEdit::Password);
        uin_password_edit_->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
        uin_password_edit_->setProperty("Password", QVariant(true));
        Testing::setAccessibleName(uin_password_edit_, "StartWindowPasswordField");
        
        uin_login_layout->addWidget(uin_password_edit_);
        
        keep_logged_ = new QCheckBox(uin_login_widget);
        keep_logged_->setObjectName(QStringLiteral("keep_logged"));
        uin_login_layout->addWidget(keep_logged_);
        
        login_staked_widget_->addWidget(uin_login_widget);
        
        horizontalLayout->addWidget(login_staked_widget_);
        
        QSpacerItem* horizontalSpacer_8 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        horizontalLayout->addItem(horizontalSpacer_8);
        
        controls_layout->addWidget(center_widget);
        
        QWidget* next_button_widget = new QWidget(controls_widget);
        next_button_widget->setObjectName(QStringLiteral("next_button_widget"));
        next_button_widget->setProperty("NextButtonWidget", QVariant(true));
        QVBoxLayout* verticalLayout_8 = new QVBoxLayout(next_button_widget);
        verticalLayout_8->setSpacing(0);
        verticalLayout_8->setObjectName(QStringLiteral("verticalLayout_8"));
        verticalLayout_8->setContentsMargins(0, 0, 0, 0);
        next_page_link_ = new QPushButton(next_button_widget);
        next_page_link_->setObjectName(QStringLiteral("next_page_link"));
        next_page_link_->setCursor(QCursor(Qt::PointingHandCursor));
        next_page_link_->setAutoDefault(true);
        next_page_link_->setDefault(false);
		Utils::ApplyStyle(next_page_link_, main_button_style);
        Testing::setAccessibleName(next_page_link_, "StartWindowLoginButton");
        
        verticalLayout_8->addWidget(next_page_link_);
        
        controls_layout->addWidget(next_button_widget);
		controls_layout->setAlignment(next_button_widget, Qt::AlignHCenter);

        QWidget* widget = new QWidget(controls_widget);
        widget->setObjectName(QStringLiteral("widget"));
        widget->setProperty("ErrorWIdget", QVariant(true));
        QVBoxLayout* verticalLayout_7 = new QVBoxLayout(widget);
        verticalLayout_7->setSpacing(0);
        verticalLayout_7->setObjectName(QStringLiteral("verticalLayout_7"));
        verticalLayout_7->setContentsMargins(0, 0, 0, 0);
        error_label_ = new QLabel(widget);
        error_label_->setObjectName(QStringLiteral("error_label"));
        error_label_->setAlignment(Qt::AlignCenter);
        error_label_->setProperty("ErrorLabel", QVariant(true));
        
        verticalLayout_7->addWidget(error_label_);
        
        controls_layout->addWidget(widget);
        
        main_layout->addWidget(controls_widget);
        
        QSpacerItem* horizontalSpacer_7 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        main_layout->addItem(horizontalSpacer_7);
        
        verticalLayout->addWidget(main_widget);
        
        QSpacerItem* verticalSpacer_2 = new QSpacerItem(0, 3, QSizePolicy::Minimum, QSizePolicy::Expanding);
        
        verticalLayout->addItem(verticalSpacer_2);
        
        QWidget* switch_login_widget = new QWidget(this);
        switch_login_widget->setObjectName(QStringLiteral("switch_login_widget"));
        switch_login_widget->setProperty("LoginButtonWidget", QVariant(true));
        QHBoxLayout* switch_login_layout = new QHBoxLayout(switch_login_widget);
        switch_login_layout->setSpacing(0);
        switch_login_layout->setObjectName(QStringLiteral("switch_login_layout"));
        switch_login_layout->setContentsMargins(0, 0, 0, 0);
        QSpacerItem* horizontalSpacer = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        switch_login_layout->addItem(horizontalSpacer);
        
        switch_login_link_ = new QPushButton(switch_login_widget);
        switch_login_link_->setObjectName(QStringLiteral("switch_login_link"));
        sizePolicy1.setHeightForWidth(switch_login_link_->sizePolicy().hasHeightForWidth());
        switch_login_link_->setSizePolicy(sizePolicy1);
        switch_login_link_->setCursor(QCursor(Qt::PointingHandCursor));
        switch_login_link_->setProperty("SwitchLoginButton", QVariant(true));
        Testing::setAccessibleName(switch_login_link_, "StartWindowChangeLoginType");
        
        switch_login_layout->addWidget(switch_login_link_);
        
        QSpacerItem* horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
        
        switch_login_layout->addItem(horizontalSpacer_2);
        
        verticalLayout->addWidget(switch_login_widget);
        
        login_staked_widget_->setCurrentIndex(2);
        
        QMetaObject::connectSlotsByName(this);
        
        //prev_page_link_->setText(QString());
        welcome_label->setText(QT_TRANSLATE_NOOP("login_page","Welcome to ICQ"));
        edit_phone_button_->setText(QT_TRANSLATE_NOOP("login_page","Edit"));
        code_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("login_page","Your code"));
        uin_login_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("login_page","UIN or Email"));
        uin_login_edit_->setAttribute(Qt::WA_MacShowFocusRect, false);
        uin_password_edit_->setPlaceholderText(QT_TRANSLATE_NOOP("login_page","Password"));
        uin_password_edit_->setAttribute(Qt::WA_MacShowFocusRect, false);
        
        keep_logged_->setText(QT_TRANSLATE_NOOP("login_page","Keep me signed in"));
        keep_logged_->setChecked(get_gui_settings()->get_value(settings_keep_logged_in, true));
        connect(keep_logged_, &QCheckBox::toggled, [](bool v)
        {
            if (get_gui_settings()->get_value(settings_keep_logged_in, true) != v)
                get_gui_settings()->set_value(settings_keep_logged_in, v);
        });
        
        next_page_link_->setText(QT_TRANSLATE_NOOP("login_page","Continue"));
        Q_UNUSED(this);
        
        login_staked_widget_->setCurrentIndex(2);
        next_page_link_->setDefault(false);
        
        QMetaObject::connectSlotsByName(this);
		init();
	}
コード例 #15
0
ファイル: utilfuncs.cpp プロジェクト: HastyJ/JsImgProc
void addTab(std::string tabName, ImageStorage* imgstore, Ui::MainWindow *ui)
{
	/*ui->processBtn->setEnabled(true);
	ui->previousBtn->setEnabled(true);*/

	QWidget *tab = new QWidget();
	QString qname = QString::fromStdString(tabName);
	tab->setObjectName(qname);
	QHBoxLayout *horizontalLayout = new QHBoxLayout(tab);
	horizontalLayout->setSpacing(6);
	horizontalLayout->setContentsMargins(11, 11, 11, 11);
	horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
	QScrollArea * scrollArea = new QScrollArea(tab);
	scrollArea->setObjectName(QStringLiteral("scrollArea"));
	scrollArea->setWidgetResizable(true);
	QWidget * scrollAreaWidgetContents = new QWidget();
	scrollAreaWidgetContents->setObjectName(QStringLiteral("scrollAreaWidgetContents"));
	scrollAreaWidgetContents->setGeometry(QRect(0, 0, 492, 447));
	QHBoxLayout* horizontalLayout_13 = new QHBoxLayout(scrollAreaWidgetContents);
	horizontalLayout->setSpacing(6);
	horizontalLayout_13->setContentsMargins(11, 11, 11, 11);
	horizontalLayout_13->setObjectName(QStringLiteral("horizontalLayout_13"));
	QLabel* label = new QLabel(scrollAreaWidgetContents);
	std::string stmp = tabName;
	stmp.append("_label");
	QString qname2 = QString::fromStdString(stmp);
	label->setObjectName(qname2);
	QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Expanding);
	sizePolicy2.setHorizontalStretch(0);
	sizePolicy2.setVerticalStretch(0);
	sizePolicy2.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
	label->setSizePolicy(sizePolicy2);

	horizontalLayout_13->addWidget(label);
	scrollArea->setWidget(scrollAreaWidgetContents);
	horizontalLayout->addWidget(scrollArea);
	ui->imageTab->addTab(tab, QString());

	std::string tmp1 = tabName.c_str();
	const char* tmp2 = tmp1.c_str();
	ui->imageTab->setTabText(ui->imageTab->indexOf(tab), QApplication::translate("MainWindow", tmp2, 0));
	ui->imageTab->setCurrentIndex(ui->imageTab->indexOf(tab));


	//-------------------------

	//---------------------
	//display image

	cv::Mat image = std::get<1>(imgstore->getCurrent()->second);  
	QImage img;  
	if(image.channels() == 3)    // RGB image  
	{  
		//cvtColor(image, image, CV_BGR2RGB);  
		img = QImage((const uchar*)(image.data),  //(const unsigned char*)  
			image.cols, image.rows,  
			image.cols*image.channels(),
			QImage::Format_RGB888);  
	}else                     // gray image  
	{  
		img = QImage((const uchar*)(image.data),  
			image.cols, image.rows,  
			image.cols*image.channels(),
			QImage::Format_Indexed8);  
	}  

	if (!img.isNull())
	{
		label->setPixmap(QPixmap::fromImage(img));  
		label->resize(label->pixmap()->size());  
		label->setAlignment(Qt::AlignCenter);
		label->show();
	}
	else
	{
		ASSERT(0);
	}
	  

	//---------------------
}