void tRepower2x2TemplateWidget::CreateGuiComponents() { const int clineWidth = qRound( tProductSettings::Instance().BorderLineWidth() ) * 2; const int cDigitalWidth = int( ( Widgets::GetScreenWidth() / 2 ) - ( clineWidth / 2 ) ); const int cDigitalHeight = int( ( qRound( Widgets::GetQuaterScreenHeight() * 3 ) / 2 ) - ( qRound( clineWidth / 2 ) ) ); AddWidgetToLayout( 0, 0, cDigitalWidth, cDigitalHeight ); { // vertical line tRepowerLineObject* pVLine = new tRepowerLineObject( tRepowerLineObject::VERTICAL, this ); pVLine->setFixedSize( clineWidth, cDigitalHeight ); m_pLayout->addWidget( pVLine, 0, 1 ); } AddWidgetToLayout( 0, 2, cDigitalWidth, cDigitalHeight ); { // horizontal line tRepowerLineObject* pHLine = new tRepowerLineObject( tRepowerLineObject::HORIZONTAL, this ); pHLine->setFixedSize( Widgets::GetScreenWidth(), clineWidth ); pHLine->show(); m_pLayout->addWidget( pHLine, 1, 0, 1, 3 ); } AddWidgetToLayout( 2, 0, cDigitalWidth, cDigitalHeight ); { // vertical line tRepowerLineObject* pVLine = new tRepowerLineObject( tRepowerLineObject::VERTICAL, this ); pVLine->setFixedSize( clineWidth, cDigitalHeight ); m_pLayout->addWidget( pVLine, 2, 1 ); } AddWidgetToLayout( 2, 2, cDigitalWidth, cDigitalHeight ); // Engine gauge tGauge* pGauge = new tRepowerEngineGauge( m_pProductFactory, this ); pGauge->setFixedSize( Widgets::GetScreenWidth(), Widgets::GetQuaterScreenHeight() ); m_pLayout->addWidget( pGauge, 3, 0, 1, 3 ); // m_Gauges << pGauge; - not modifiable }
void LocalTerminalWidget::AddButtonsToLayout() { int col = 0; if (CVIniConfig::getInstance().IsModelHD()) { for (auto button : virtual_terminals_) { AddWidgetToLayout(button, 0, col++); } AddWidgetToLayout(send_audio_button_, 0, col++); AddWidgetToLayout(speaker_volume_control_button_, 0, col++); AddWidgetToLayout(hand_up_button_, 0, col++); //AddWidgetToLayout(volume_button_, 0, col++); } else { send_audio_button_->hide(); hand_up_button_->hide(); //volume_button_->hide(); } //AddWidgetToLayout(device_test_button_); //AddWidgetToLayout(monitor_button_); AddWidgetToLayout(device_setting_button_, 0, widgets_per_row_ - 2); AddWidgetToLayout(exit_button_, 0, widgets_per_row_ - 1); }