add language selector also in the server GUI
This commit is contained in:
parent
bb9b82d2be
commit
399f1da5a7
4 changed files with 31 additions and 4 deletions
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
|
|
||||||
TODO add support to change language (#297)
|
TODO add support to change language (#297)
|
||||||
TODO add language selector also in the server GUI
|
|
||||||
TODO search in the code for "TODO maybe first try to find the complete string, if not found use only first two letters instead"
|
TODO search in the code for "TODO maybe first try to find the complete string, if not found use only first two letters instead"
|
||||||
|
|
||||||
TODO bug fix: incorrect selection of UI language (#408) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
TODO bug fix: incorrect selection of UI language (#408) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
|
@ -334,6 +334,9 @@ lvwClients->setMinimumHeight ( 140 );
|
||||||
|
|
||||||
UpdateRecorderStatus ( QString::null );
|
UpdateRecorderStatus ( QString::null );
|
||||||
|
|
||||||
|
// language combo box (corrects the setting if language not found)
|
||||||
|
cbxLanguage->Init ( pSettings->strLanguage );
|
||||||
|
|
||||||
// update GUI dependencies
|
// update GUI dependencies
|
||||||
UpdateGUIDependencies();
|
UpdateGUIDependencies();
|
||||||
|
|
||||||
|
@ -397,6 +400,9 @@ lvwClients->setMinimumHeight ( 140 );
|
||||||
QObject::connect ( cbxCentServAddrType, static_cast<void (QComboBox::*) ( int )> ( &QComboBox::activated ),
|
QObject::connect ( cbxCentServAddrType, static_cast<void (QComboBox::*) ( int )> ( &QComboBox::activated ),
|
||||||
this, &CServerDlg::OnCentServAddrTypeActivated );
|
this, &CServerDlg::OnCentServAddrTypeActivated );
|
||||||
|
|
||||||
|
QObject::connect ( cbxLanguage, &CLanguageComboBox::LanguageChanged,
|
||||||
|
this, &CServerDlg::OnLanguageChanged );
|
||||||
|
|
||||||
// push buttons
|
// push buttons
|
||||||
QObject::connect ( pbtRecordingDir, &QPushButton::released,
|
QObject::connect ( pbtRecordingDir, &QPushButton::released,
|
||||||
this, &CServerDlg::OnRecordingDirClicked );
|
this, &CServerDlg::OnRecordingDirClicked );
|
||||||
|
|
|
@ -117,6 +117,7 @@ public slots:
|
||||||
void keyPressEvent ( QKeyEvent *e ) // block escape key
|
void keyPressEvent ( QKeyEvent *e ) // block escape key
|
||||||
{ if ( e->key() != Qt::Key_Escape ) QDialog::keyPressEvent ( e ); }
|
{ if ( e->key() != Qt::Key_Escape ) QDialog::keyPressEvent ( e ); }
|
||||||
|
|
||||||
|
void OnLanguageChanged ( QString strLanguage ) { pSettings->strLanguage = strLanguage; }
|
||||||
void OnNewRecordingClicked() { pServer->RequestNewRecording(); }
|
void OnNewRecordingClicked() { pServer->RequestNewRecording(); }
|
||||||
void OnRecordingDirClicked();
|
void OnRecordingDirClicked();
|
||||||
void OnClearRecordingDirClicked();
|
void OnClearRecordingDirClicked();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>588</width>
|
<width>588</width>
|
||||||
<height>419</height>
|
<height>447</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -186,8 +186,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QToolButton" name="tbtClearRecordingDir">
|
<widget class="QToolButton" name="tbtClearRecordingDir"/>
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -223,6 +222,20 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lblLanguage">
|
||||||
|
<property name="text">
|
||||||
|
<string>Language</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="CLanguageComboBox" name="cbxLanguage"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
@ -270,6 +283,13 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>CLanguageComboBox</class>
|
||||||
|
<extends>QComboBox</extends>
|
||||||
|
<header>util.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>lvwClients</tabstop>
|
<tabstop>lvwClients</tabstop>
|
||||||
<tabstop>chbStartOnOSStart</tabstop>
|
<tabstop>chbStartOnOSStart</tabstop>
|
||||||
|
@ -286,6 +306,7 @@
|
||||||
<tabstop>chbEnableRecorder</tabstop>
|
<tabstop>chbEnableRecorder</tabstop>
|
||||||
<tabstop>edtCurrentSessionDir</tabstop>
|
<tabstop>edtCurrentSessionDir</tabstop>
|
||||||
<tabstop>pbtNewRecording</tabstop>
|
<tabstop>pbtNewRecording</tabstop>
|
||||||
|
<tabstop>cbxLanguage</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
|
|
Loading…
Reference in a new issue