mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T177, UI layout of settings component
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>130</width>
|
||||
<height>35</height>
|
||||
<width>176</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -20,13 +20,6 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1" alignment="Qt::AlignLeft">
|
||||
<widget class="QCheckBox" name="cb_EnableServerDebugging">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_EnableWebServerDebugging">
|
||||
<property name="text">
|
||||
@@ -34,6 +27,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" alignment="Qt::AlignLeft">
|
||||
<widget class="QCheckBox" name="cb_EnableServerDebugging">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="hs_DebugDatabaseSetup">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace BlackGui
|
||||
this, &CSettingsGuiComponent::widgetStyleChanged);
|
||||
|
||||
// selection
|
||||
connect(ui->rb_PreferExtendedSelection, &QRadioButton::released, this, &CSettingsGuiComponent::ps_selectionChanged);
|
||||
connect(ui->rb_PreferMultiSelection, &QRadioButton::released, this, &CSettingsGuiComponent::ps_selectionChanged);
|
||||
connect(ui->rb_PreferExtendedSelection, &QRadioButton::released, this, &CSettingsGuiComponent::selectionChanged);
|
||||
connect(ui->rb_PreferMultiSelection, &QRadioButton::released, this, &CSettingsGuiComponent::selectionChanged);
|
||||
|
||||
this->guiSettingsChanged();
|
||||
}
|
||||
@@ -61,7 +61,7 @@ namespace BlackGui
|
||||
ui->hs_SettingsGuiOpacity->setValue(static_cast<int>(value));
|
||||
}
|
||||
|
||||
void CSettingsGuiComponent::ps_selectionChanged()
|
||||
void CSettingsGuiComponent::selectionChanged()
|
||||
{
|
||||
QAbstractItemView::SelectionMode sm = QAbstractItemView::NoSelection;
|
||||
if (ui->rb_PreferExtendedSelection->isChecked())
|
||||
@@ -72,8 +72,8 @@ namespace BlackGui
|
||||
{
|
||||
sm = QAbstractItemView::MultiSelection;
|
||||
}
|
||||
if (sm == this->m_guiSettings.get().getPreferredSelection()) { return; }
|
||||
const CStatusMessage m = this->m_guiSettings.setAndSaveProperty(CGeneralGuiSettings::IndexPreferredSelection, CVariant::fromValue(sm));
|
||||
if (sm == m_guiSettings.get().getPreferredSelection()) { return; }
|
||||
const CStatusMessage m = m_guiSettings.setAndSaveProperty(CGeneralGuiSettings::IndexPreferredSelection, CVariant::fromValue(sm));
|
||||
CLogMessage::preformatted(m);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace BlackGui
|
||||
ui->cb_SettingsGuiWidgetStyle->setCurrentText(settings.getWidgetStyle());
|
||||
return;
|
||||
}
|
||||
const CStatusMessage m = this->m_guiSettings.setAndSaveProperty(CGeneralGuiSettings::IndexWidgetStyle, widgetStyle);
|
||||
const CStatusMessage m = m_guiSettings.setAndSaveProperty(CGeneralGuiSettings::IndexWidgetStyle, widgetStyle);
|
||||
CLogMessage::preformatted(m);
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -48,11 +48,10 @@ namespace BlackGui
|
||||
//! Change the windows opacity 0..100
|
||||
void changedWindowsOpacity(int opacity);
|
||||
|
||||
private slots:
|
||||
//! Selection radio buttons changed
|
||||
void ps_selectionChanged();
|
||||
|
||||
private:
|
||||
//! Selection radio buttons changed
|
||||
void selectionChanged();
|
||||
|
||||
//! GUI settings changed
|
||||
void guiSettingsChanged();
|
||||
|
||||
@@ -60,7 +59,7 @@ namespace BlackGui
|
||||
void widgetStyleChanged(const QString &widgetStyle);
|
||||
|
||||
QScopedPointer<Ui::CSettingsGuiComponent> ui;
|
||||
BlackMisc::CSetting<BlackGui::Settings::TGeneralGui> m_guiSettings { this, &CSettingsGuiComponent::guiSettingsChanged };
|
||||
BlackMisc::CSetting<Settings::TGeneralGui> m_guiSettings { this, &CSettingsGuiComponent::guiSettingsChanged };
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>204</width>
|
||||
<width>250</width>
|
||||
<height>235</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -171,6 +171,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hs_PreferredSelection">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user