void Blender::handleAsyncUpdate() { if (m_initialized) { if (m_update & updt_unmount) { sendRemoveMixers(); m_update &= ~updt_unmount; } if (m_update & updt_mount) { if (m_device && m_device->isEapSupported()) { m_created = false; loadSettings(); router_cfg(); stream_cfg(); createControls(); initControls(); for (int i=0; i<m_bl_desc.num_mixers; i++) { mixer_cfg(i); } } m_update &= ~updt_mount; } if (m_update & updt_clock) { m_update &= ~updt_clock; } } }
void TextureViewer::init() { control=0; shaderName=0; setMenuBar(new QMenuBar); QMenu *fileMenu = menuBar()->addMenu(tr("&File")); //Open action QAction *openAct = new QAction( tr("&Open"), this ); openAct->setShortcuts(QKeySequence::Open); openAct->setStatusTip(tr("Open")); connect(openAct, SIGNAL(triggered()), this, SLOT(openFile())); QAction *createControlsAct = new QAction( tr("&Controls"), this ); createControlsAct->setStatusTip(tr("Create Controls")); connect(createControlsAct, SIGNAL(triggered()), this, SLOT(createControls())); //Quit action QAction *quitAct = new QAction( tr("&Quit"), this ); quitAct->setShortcuts(QKeySequence::Quit); quitAct->setStatusTip(tr("Quit")); connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); fileMenu->addAction(openAct); fileMenu->addAction(createControlsAct); fileMenu->addAction(quitAct); }
ConnectionForm::ConnectionForm(QWidget *parent) : QWidget(parent) { displayIp = displayPort = true; packetMode = true; createControls(); }
MainWindow::MainWindow(HINSTANCE instance) : m_inDialog(false), m_parent(nullptr), m_instance(instance), m_emptyLink(nullptr) { enableLogging(settings::settings()[L"general"][L"log"].asNumber() != 0); LOG(L"creating MainWindow"); registerWindowClass(instance, loadString(instance, IDC_LAUNCHGRID).c_str()); m_wnd = createMainWindow(); createFonts(); LOG(L"creating static controls"); m_titleLabel = CreateWindow(L"STATIC", loadString(instance, IDS_APP_TITLE).c_str(), WS_CHILD | WS_VISIBLE, 8, 4, 120, 30, m_wnd, nullptr, instance, nullptr); SendMessage(m_titleLabel, WM_SETFONT, (WPARAM)m_titleFont, 0); m_menu = CreateWindow(L"BUTTON", L"Menu", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 240 - 8 - 24, 4, 24, 24, m_wnd, nullptr, instance, nullptr); SetWindowLong(m_menu, GWL_ID, IDC_MENU); createControls(); LOG(L"showing window"); ShowWindow(m_wnd, settings::settings()[L"general"][L"bottomWindow"].asNumber() ? SW_SHOWNOACTIVATE : SW_SHOW); if (settings::settings()[L"general"][L"bottomWindow"].asNumber()) { LOG(L"moving window to background"); SetWindowPos(m_wnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); } UpdateWindow(m_wnd); }
QWidget *DlgSettingsColorFilter::createSubPanel () { LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsColorFilter::createSubPanel"; const int EMPTY_COLUMN_WIDTH = 40; QWidget *subPanel = new QWidget (); QGridLayout *layout = new QGridLayout (subPanel); subPanel->setLayout (layout); layout->setColumnStretch(0, 0); // Empty column layout->setColumnMinimumWidth(0, EMPTY_COLUMN_WIDTH); layout->setColumnStretch(1, 0); // Radio buttons layout->setColumnMinimumWidth(1, 210); layout->setColumnStretch(2, 0); // Empty column to put some space between previous and next columns, so they are not too close layout->setColumnMinimumWidth(2, 15); layout->setColumnStretch(3, 1); // Profile layout->setColumnMinimumWidth(4, EMPTY_COLUMN_WIDTH); // Empty column layout->setColumnStretch(4, 0); int rowLeft = 0, rowRight = 0; createControls (layout, rowLeft); createProfileAndScale (layout, rowRight); int row = qMax (rowLeft, rowRight); createPreview (layout, row); return subPanel; }
//! [0] Window::Window() { horizontalSliders = new SlidersGroup(Qt::Horizontal, tr("Horizontal")); verticalSliders = new SlidersGroup(Qt::Vertical, tr("Vertical")); stackedWidget = new QStackedWidget; stackedWidget->addWidget(horizontalSliders); stackedWidget->addWidget(verticalSliders); createControls(tr("Controls")); //! [0] //! [1] connect(horizontalSliders, SIGNAL(valueChanged(int)), //! [1] //! [2] verticalSliders, SLOT(setValue(int))); connect(verticalSliders, SIGNAL(valueChanged(int)), valueSpinBox, SLOT(setValue(int))); connect(valueSpinBox, SIGNAL(valueChanged(int)), horizontalSliders, SLOT(setValue(int))); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(controlsGroup); layout->addWidget(stackedWidget); setLayout(layout); minimumSpinBox->setValue(0); maximumSpinBox->setValue(20); valueSpinBox->setValue(5); setWindowTitle(tr("Sliders")); }
SetupItemCheckBox::SetupItemCheckBox(std::string text, std::string description, std::string keyName, SetupTabScroll *parent, std::string eventName, bool mainConfig) : SetupItem(text, description, keyName, parent, eventName, mainConfig) { createControls(); }
UserDialog::UserDialog(wxWindow* parent, const wxString& title, bool isNewUser) : BaseDialog(parent, wxID_ANY, title), isNewUserM(isNewUser) { createControls(); setControlsProperties(); layoutControls(); updateButtons(); }
InfoWidget::InfoWidget(QWidget *parent, UserData *self) : BlockWidget(parent, self, lang(lng_settings_section_info)) { auto observeEvents = UpdateFlag::UsernameChanged | UpdateFlag::UserPhoneChanged | UpdateFlag::AboutChanged; subscribe(Notify::PeerUpdated(), Notify::PeerUpdatedHandler(observeEvents, [this](const Notify::PeerUpdate &update) { notifyPeerUpdated(update); })); createControls(); }
void QgsVectorLayerSaveAsDialog::on_mFormatComboBox_currentIndexChanged( int idx ) { Q_UNUSED( idx ); browseFilename->setEnabled( true ); leFilename->setEnabled( true ); if ( format() == "KML" ) { mEncodingComboBox->setCurrentIndex( mEncodingComboBox->findText( "UTF-8" ) ); mEncodingComboBox->setDisabled( true ); mSkipAttributeCreation->setEnabled( true ); } else if ( format() == "DXF" ) { mSkipAttributeCreation->setChecked( true ); mSkipAttributeCreation->setDisabled( true ); } else { mEncodingComboBox->setEnabled( true ); mSkipAttributeCreation->setEnabled( true ); } QgsVectorFileWriter::MetaData driverMetaData; while ( mDatasourceOptionsGroupBox->layout()->count() ) { QLayoutItem* item = mDatasourceOptionsGroupBox->layout()->takeAt( 0 ); delete item->widget(); delete item; } while ( mLayerOptionsGroupBox->layout()->count() ) { QLayoutItem* item = mLayerOptionsGroupBox->layout()->takeAt( 0 ); delete item->widget(); delete item; } // workaround so the Q_FOREACH macro does not get confused by the ',' typedef QPair<QLabel*, QWidget*> LabelControlPair; if ( QgsVectorFileWriter::driverMetadata( format(), driverMetaData ) ) { if ( driverMetaData.driverOptions.size() != 0 ) { mDatasourceOptionsGroupBox->setVisible( true ); QList<QPair<QLabel*, QWidget*> > controls = createControls( driverMetaData.driverOptions ); QFormLayout* datasourceLayout = dynamic_cast<QFormLayout*>( mDatasourceOptionsGroupBox->layout() ); Q_FOREACH ( const LabelControlPair& control, controls ) { datasourceLayout->addRow( control.first, control.second ); } }
SetupItemLabel::SetupItemLabel(std::string text, std::string description, SetupTabScroll *parent, bool separator) : SetupItem(text, description, "", parent, "", "", true), mLabel(nullptr), mIsSeparator(separator) { mValueType = VNONE; createControls(); }
void MainWindow::applySettings() { enableLogging(settings::settings()[L"general"][L"log"].asNumber() != 0); for (auto tab : m_tabs) { DestroyWindow(tab); } m_tabs.clear(); for (auto table : m_tables) { delete table; } m_tables.clear(); if (settings::settings()[L"general"][L"bottomWindow"].asNumber()) { if (!m_parent) { auto newWnd = createMainWindow(); SetParent(m_titleLabel, newWnd); SetParent(m_menu, newWnd); DestroyWindow(m_wnd); m_wnd = newWnd; ShowWindow(m_wnd, SW_SHOW); } if (settings::settings()[L"general"][L"autoStart"]) { registerAutorun(); } else { unregisterAutorun(); } } else { if (m_parent) { auto parent = m_parent; auto newWnd = createMainWindow(); SetParent(m_titleLabel, newWnd); SetParent(m_menu, newWnd); DestroyWindow(m_wnd); m_wnd = newWnd; ShowWindow(m_wnd, SW_SHOW); DestroyWindow(parent); } unregisterAutorun(); } createControls(); InvalidateRect(m_wnd, nullptr, TRUE); }
ReorderFieldsDialog::ReorderFieldsDialog(wxWindow* parent, Table* table) : BaseDialog(parent, -1, wxEmptyString) { tableM = table; tableM->ensureChildrenLoaded(); SetTitle(_("Reordering Fields of Table ") + table->getName_()); createControls(); layoutControls(); tableM->attachObserver(this, true); button_ok->SetDefault(); }
SceneBasicSelectDialog::SceneBasicSelectDialog(SceneViewCommon *sceneView, QWidget *parent) : QDialog(parent) { m_sceneView = sceneView; setWindowIcon(icon("")); setWindowTitle(tr("Select edge")); createControls(); setMinimumSize(sizeHint()); setMaximumSize(sizeHint()); }
ConfigComputerDialog::ConfigComputerDialog(QWidget *parent) : QDialog(parent) { setWindowIcon(icon("options")); setWindowTitle(tr("Options")); createControls(); load(); setMinimumSize(sizeHint()); setMaximumSize(sizeHint()); }
GRChangeMyGames::GRChangeMyGames(const wxFrame *parent,const wxString &title, const wxPoint &pos, const wxSize &size) : wxFrame((wxFrame *) parent, -1, title, pos, size) { //Set some generic window options SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); //Create controls createControls(); //Center window CentreOnScreen(); }
MaterialEditDialog::MaterialEditDialog(const QString &fileName, QWidget *parent) : QDialog(parent), m_fileName(fileName) { setWindowIcon(icon("")); setWindowTitle(tr("Material editor")); createControls(); readMaterial(); QSettings settings; restoreGeometry(settings.value("MaterialEditDialog/Geometry", saveGeometry()).toByteArray()); }
NotificationsWidget::NotificationsWidget(QWidget *parent, UserData *self) : BlockWidget(parent, self, lang(lng_settings_section_notify)) { createControls(); subscribe(AuthSession::Current().notifications().settingsChanged(), [this](ChangeType type) { if (type == ChangeType::DesktopEnabled) { desktopEnabledUpdated(); } else if (type == ChangeType::ViewParams) { viewParamUpdated(); } else if (type == ChangeType::SoundEnabled) { _playSound->setChecked(Global::SoundNotify()); } }); }
ProblemWidget::ProblemWidget(QWidget *parent) : QWidget(parent) { createActions(); createControls(); updateControls(); // global signals connect(Util::scene(), SIGNAL(invalidated()), this, SLOT(updateControls())); connect(Util::problem(), SIGNAL(fieldsChanged()), this, SLOT(updateControls())); setMinimumSize(sizeHint()); }
DatabaseRegistrationDialog::DatabaseRegistrationDialog(wxWindow* parent, const wxString& title, bool createDB, bool connectAs) : BaseDialog(parent, wxID_ANY, title) { createM = createDB; connectAsM = connectAs; isDefaultNameM = true; createControls(); setControlsProperties(); layoutControls(); updateButtons(); }
Window::Window() : names_(new NameDao(this)), statExtractor_(new StatisticsExtractor(this)), generalStatWidget_(new GeneralStatWidget(*statExtractor_, Qt::Vertical, tr("Общая статистика"))), dailyStatWidget_(new DailyStatWidget(names_, Qt::Vertical, tr("Ежедневная статистика"))), nameStatWidget_(new NameStatWidget(*statExtractor_, Qt::Vertical, tr("Статистика по имени"))), stackedWidget_(new QStackedWidget(this)) { fillStackedWidget(); createControls(tr("Controls")); configControls(); configFinalFace(); }
Window::Window() { horizontalSliders = new SlidersGroup(Qt::Horizontal, tr("Simulation")); verticalSliders = new SlidersGroup(Qt::Vertical, tr("Simulation")); QGraphicsScene scene; scene.setSceneRect(-300, -300, 300, 300); scene.setItemIndexMethod(QGraphicsScene::NoIndex); QGraphicsView view(&scene); view.setRenderHint(QPainter::Antialiasing); view.setBackgroundBrush(QPixmap(":/images/cheese.jpg")); view.setCacheMode(QGraphicsView::CacheBackground); view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); view.setDragMode(QGraphicsView::ScrollHandDrag); view.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Simulation")); view.resize(600, 600); // view.show(); stackedWidget = new QStackedWidget; stackedWidget->addWidget(horizontalSliders); stackedWidget->addWidget(verticalSliders); createControls(tr("Controls")); connect(weightLineEdit, SIGNAL(textChanged(QString)), temp, SLOT(setValue(QString))); connect(temp, SIGNAL(valueChanged(QString)), xValueLabel, SLOT(setText(QString))); connect(horizontalSliders, SIGNAL(valueChanged(int)), verticalSliders, SLOT(setValue(int))); // connect(verticalSliders, SIGNAL(valueChanged(int)), // valueSpinBox, SLOT(setValue(int))); // connect(valueSpinBox, SIGNAL(valueChanged(int)), // horizontalSliders, SLOT(setValue(int))); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(stackedWidget); // layout->addWidget(view); layout->addWidget(controlsGroup); setLayout(layout); // minimumSpinBox->setValue(0); // maximumSpinBox->setValue(20); // valueSpinBox->setValue(5); setWindowTitle(tr("Simulated Physics")); }
void MainWindow::refresh() { for (auto tab : m_tabs) { DestroyWindow(tab); } m_tabs.clear(); for (auto table : m_tables) { delete table; } m_tables.clear(); createControls(); }
SceneTransformDialog::SceneTransformDialog(QWidget *parent) : QDialog(parent) { logMessage("SceneTransformDialog::SceneTransformDialog()"); setWindowIcon(icon("scene-transform")); setWindowTitle(tr("Transform")); createControls(); setMinimumSize(350, 225); setMaximumSize(minimumSize()); QSettings settings; restoreGeometry(settings.value("SceneTransformDialog/Geometry", saveGeometry()).toByteArray()); }
DSceneFunction::DSceneFunction(SceneFunction *sceneFunction, QWidget *parent) : QDialog(parent) { logMessage("DSceneFunction::DSceneFunction()"); m_sceneFunction = sceneFunction; setWindowIcon(icon("scene-function")); setWindowTitle(tr("Function")); createControls(); load(); doPlot(); setMinimumSize(sizeHint()); }
AdvancedWidget::AdvancedWidget(QWidget *parent, UserData *self) : BlockWidget(parent, self, lang(lng_settings_section_advanced_settings)) { createControls(); #ifndef TDESKTOP_DISABLE_NETWORK_PROXY subscribe(Global::RefConnectionTypeChanged(), [this]() { connectionTypeUpdated(); }); #endif // !TDESKTOP_DISABLE_NETWORK_PROXY if (!self) { subscribe(Window::Theme::Background(), [this](const Window::Theme::BackgroundUpdate &update) { if (update.type == Window::Theme::BackgroundUpdate::Type::ApplyingTheme) { checkNonDefaultTheme(); } }); } }
SceneLabelDialog::SceneLabelDialog(SceneLabel *label, QWidget *parent, bool isNew) : DSceneBasic(parent, isNew) { logMessage("DSceneLabel::DSceneLabel()"); m_object = label; setWindowIcon(icon("scene-label")); setWindowTitle(tr("Label")); createControls(); load(); setMinimumSize(sizeHint()); // setMaximumSize(sizeHint()); }
SceneEdgeDialog::SceneEdgeDialog(SceneEdge *edge, QWidget *parent, bool isNew) : DSceneBasic(parent, isNew) { logMessage("DSceneEdge::DSceneEdge()"); m_object = edge; setWindowIcon(icon("scene-edge")); setWindowTitle(tr("Edge")); createControls(); load(); setMinimumSize(sizeHint()); // setMaximumSize(sizeHint()); }
DSceneNode::DSceneNode(SceneNode *node, QWidget *parent, bool isNew) : DSceneBasic(parent, isNew) { logMessage("DSceneNode::DSceneNode()"); m_object = node; setWindowIcon(icon("scene-node")); setWindowTitle(tr("Node")); createControls(); load(); setMinimumSize(sizeHint()); // setMaximumSize(sizeHint()); }
GRLoginWindow::GRLoginWindow(const wxFrame *parent, const wxString &title, const wxPoint &pos, const wxSize &size) : wxFrame((wxFrame *) parent, -1, title, pos, size) { /* Set some generic window options */ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE)); /* Create our controls */ createControls(); /* Load Profiles */ profileManager = GRProfileManager::getInstance(); populateProfilesList(); /* Center window */ CentreOnScreen(); }