Added settings dialog.

This commit is contained in:
Agnieszka Kostrzewa 2012-01-28 12:25:35 +01:00
parent fdf6f893d8
commit 456c1e63d7
4 changed files with 383 additions and 96 deletions

View File

@ -19,6 +19,7 @@ res:
pyuic4 -o qubesmanager/ui_editfwrulesdlg.py editfwrulesdlg.ui
pyuic4 -o qubesmanager/ui_newfwruledlg.py newfwruledlg.ui
pyuic4 -o qubesmanager/ui_multiselectwidget.py multiselectwidget.ui
pyuic4 -o qubesmanager/ui_settingsdlg.py settingsdlg.ui
update-repo-current:
ln -f $(RPMS_DIR)/x86_64/qubes-manager-*$(VERSION)*.rpm ../yum/current-release/current/dom0/rpm/

View File

@ -16,6 +16,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="windowTitle">
<string>Qubes VM Manager</string>
</property>
@ -65,6 +68,12 @@
<height>30</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="lineWidth">
<number>0</number>
</property>
@ -243,6 +252,7 @@
<addaction name="action_resumevm"/>
<addaction name="action_pausevm"/>
<addaction name="action_shutdownvm"/>
<addaction name="action_settings"/>
<addaction name="action_editfwrules"/>
<addaction name="action_appmenus"/>
<addaction name="action_updatevm"/>
@ -327,7 +337,7 @@
</property>
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/root.png</normaloff>:/root.png</iconset>
<normaloff>:/appsprefs.png</normaloff>:/appsprefs.png</iconset>
</property>
<property name="text">
<string>Select VM applications</string>
@ -359,9 +369,9 @@
<bool>true</bool>
</property>
<property name="icon">
<iconset>
<selectedoff>:/showallvms.png</selectedoff>
</iconset>
<iconset resource="resources.qrc">
<normaloff>:/showallvms.png</normaloff>
<selectedoff>:/showallvms.png</selectedoff>:/showallvms.png</iconset>
</property>
<property name="text">
<string>Show/Hide inactive VMs</string>
@ -373,7 +383,7 @@
<action name="action_editfwrules">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/firewall.png</normaloff>:/firewall.png</iconset>
<normaloff>:/newfirewall.png</normaloff>:/newfirewall.png</iconset>
</property>
<property name="text">
<string>Edit VM Firewall rules</string>
@ -495,6 +505,18 @@
<string>Update Info</string>
</property>
</action>
<action name="action_settings">
<property name="icon">
<iconset resource="resources.qrc">
<normaloff>:/root.png</normaloff>:/root.png</iconset>
</property>
<property name="text">
<string>Settings</string>
</property>
<property name="toolTip">
<string>VM Settings</string>
</property>
</action>
</widget>
<resources>
<include location="resources.qrc"/>

View File

@ -1,5 +1,8 @@
<!DOCTYPE RCC><RCC version="1.0">
<RCC>
<qresource>
<file alias="on.png">icons/on.png</file>
<file alias="appsprefs.png">icons/appsprefs.png</file>
<file alias="newfirewall.png">icons/newfirewall.png</file>
<file alias="qubes.png">icons/qubes.png</file>
<file alias="appvm.png">icons/appvm.png</file>
<file alias="netvm.png">icons/netvm.png</file>

View File

@ -1,18 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<class>SettingsDialog</class>
<widget class="QDialog" name="SettingsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>672</width>
<height>351</height>
<width>694</width>
<height>483</height>
</rect>
</property>
<property name="windowTitle">
<string>Settings</string>
</property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/root.png</normaloff>:/root.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
@ -22,7 +26,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<widget class="QWidget" name="basic_tab">
<property name="locale">
@ -31,6 +35,14 @@
<attribute name="title">
<string>Basic</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
@ -63,7 +75,7 @@
<item row="1" column="1">
<widget class="QComboBox" name="template_name"/>
</item>
<item row="2" column="0" colspan="2">
<item row="2" column="0">
<widget class="QCheckBox" name="allow_networking">
<property name="text">
<string>Allow networking</string>
@ -73,7 +85,61 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Info</string>
</property>
<layout class="QFormLayout" name="formLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Type:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="type_label">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>AppVM</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Installed by RPM:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="rpm_label">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>No</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -92,8 +158,8 @@
<attribute name="title">
<string>Advanced</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Disk storage</string>
@ -135,7 +201,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Private storage max. size</string>
<string>Private storage max. size:</string>
</property>
</widget>
</item>
@ -155,14 +221,14 @@
</layout>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Memory/CPU</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="1">
<widget class="QSpinBox" name="mem_size">
<item row="2" column="1">
<widget class="QSpinBox" name="max_mem_size">
<property name="enabled">
<bool>false</bool>
</property>
@ -180,14 +246,14 @@
</property>
</widget>
</item>
<item row="0" column="2">
<item row="2" column="2">
<widget class="QLabel" name="label_6">
<property name="text">
<string>MB</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox">
<property name="enabled">
<bool>false</bool>
@ -200,10 +266,47 @@
</property>
</widget>
</item>
<item row="1" column="2">
<item row="0" column="1">
<widget class="QLabel" name="mem_size">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>xx</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_16">
<property name="text">
<string>MB</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Memory:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Max Memory:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>VCPUs</string>
<string>VCPUs:</string>
</property>
</widget>
</item>
@ -211,17 +314,160 @@
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QGroupBox" name="groupBox_9">
<property name="title">
<string>Networking</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>124</height>
</size>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>NetVM:</string>
</property>
</spacer>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="netVM"/>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>VM updateable?</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QGroupBox" name="groupBox_10">
<property name="title">
<string>Kernel</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Kernel:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="kernel"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Kernel opts:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="kernel_opts">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>[]</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox_11">
<property name="title">
<string>Paths</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>dir:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="dir_path">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>dir_path</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>config:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="config_path">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>config_path</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>root img:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="root_img_path">
<property name="text">
<string>root_img_path</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_24">
<property name="text">
<string>root volatile img:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="volatile_img_path">
<property name="text">
<string>volatile_path</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_25">
<property name="text">
<string>private img:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="private_img_path">
<property name="text">
<string>private_path</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
@ -229,12 +475,25 @@
<attribute name="title">
<string>Devices</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6"/>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<layout class="QVBoxLayout" name="devices_layout"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="apps_tab">
<attribute name="icon">
<iconset resource="resources.qrc">
<normaloff>:/appsprefs.png</normaloff>:/appsprefs.png</iconset>
</attribute>
<attribute name="title">
<string>Applications</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<layout class="QVBoxLayout" name="apps_layout"/>
</item>
</layout>
</widget>
</widget>
</item>
@ -252,12 +511,14 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="resources.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Dialog</receiver>
<receiver>SettingsDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@ -273,7 +534,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<receiver>SettingsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">