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