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_editfwrulesdlg.py editfwrulesdlg.ui
pyuic4 -o qubesmanager/ui_newfwruledlg.py newfwruledlg.ui pyuic4 -o qubesmanager/ui_newfwruledlg.py newfwruledlg.ui
pyuic4 -o qubesmanager/ui_multiselectwidget.py multiselectwidget.ui pyuic4 -o qubesmanager/ui_multiselectwidget.py multiselectwidget.ui
pyuic4 -o qubesmanager/ui_settingsdlg.py settingsdlg.ui
update-repo-current: update-repo-current:
ln -f $(RPMS_DIR)/x86_64/qubes-manager-*$(VERSION)*.rpm ../yum/current-release/current/dom0/rpm/ 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> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Qubes VM Manager</string> <string>Qubes VM Manager</string>
</property> </property>
@ -65,6 +68,12 @@
<height>30</height> <height>30</height>
</size> </size>
</property> </property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="lineWidth"> <property name="lineWidth">
<number>0</number> <number>0</number>
</property> </property>
@ -243,6 +252,7 @@
<addaction name="action_resumevm"/> <addaction name="action_resumevm"/>
<addaction name="action_pausevm"/> <addaction name="action_pausevm"/>
<addaction name="action_shutdownvm"/> <addaction name="action_shutdownvm"/>
<addaction name="action_settings"/>
<addaction name="action_editfwrules"/> <addaction name="action_editfwrules"/>
<addaction name="action_appmenus"/> <addaction name="action_appmenus"/>
<addaction name="action_updatevm"/> <addaction name="action_updatevm"/>
@ -327,7 +337,7 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="resources.qrc"> <iconset resource="resources.qrc">
<normaloff>:/root.png</normaloff>:/root.png</iconset> <normaloff>:/appsprefs.png</normaloff>:/appsprefs.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Select VM applications</string> <string>Select VM applications</string>
@ -359,9 +369,9 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="resources.qrc">
<selectedoff>:/showallvms.png</selectedoff> <normaloff>:/showallvms.png</normaloff>
</iconset> <selectedoff>:/showallvms.png</selectedoff>:/showallvms.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Show/Hide inactive VMs</string> <string>Show/Hide inactive VMs</string>
@ -373,7 +383,7 @@
<action name="action_editfwrules"> <action name="action_editfwrules">
<property name="icon"> <property name="icon">
<iconset resource="resources.qrc"> <iconset resource="resources.qrc">
<normaloff>:/firewall.png</normaloff>:/firewall.png</iconset> <normaloff>:/newfirewall.png</normaloff>:/newfirewall.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Edit VM Firewall rules</string> <string>Edit VM Firewall rules</string>
@ -495,6 +505,18 @@
<string>Update Info</string> <string>Update Info</string>
</property> </property>
</action> </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> </widget>
<resources> <resources>
<include location="resources.qrc"/> <include location="resources.qrc"/>

View File

@ -1,22 +1,25 @@
<!DOCTYPE RCC><RCC version="1.0"> <RCC>
<qresource> <qresource>
<file alias="qubes.png">icons/qubes.png</file> <file alias="on.png">icons/on.png</file>
<file alias="appvm.png">icons/appvm.png</file> <file alias="appsprefs.png">icons/appsprefs.png</file>
<file alias="netvm.png">icons/netvm.png</file> <file alias="newfirewall.png">icons/newfirewall.png</file>
<file alias="networking.png">icons/networking.png</file> <file alias="qubes.png">icons/qubes.png</file>
<file alias="dom0.png">icons/dom0.png</file> <file alias="appvm.png">icons/appvm.png</file>
<file alias="storagevm.png">icons/storagevm.png</file> <file alias="netvm.png">icons/netvm.png</file>
<file alias="templatevm.png">icons/templatevm.png</file> <file alias="networking.png">icons/networking.png</file>
<file alias="updateable.png">icons/updateable.png</file> <file alias="dom0.png">icons/dom0.png</file>
<file alias="home.png">icons/home.png</file> <file alias="storagevm.png">icons/storagevm.png</file>
<file alias="root.png">icons/root.png</file> <file alias="templatevm.png">icons/templatevm.png</file>
<file alias="createvm.png">icons/createvm.png</file> <file alias="updateable.png">icons/updateable.png</file>
<file alias="removevm.png">icons/removevm.png</file> <file alias="home.png">icons/home.png</file>
<file alias="shutdownvm.png">icons/shutdownvm.png</file> <file alias="root.png">icons/root.png</file>
<file alias="resumevm.png">icons/resumevm.png</file> <file alias="createvm.png">icons/createvm.png</file>
<file alias="pausevm.png">icons/pausevm.png</file> <file alias="removevm.png">icons/removevm.png</file>
<file alias="showallvms.png">icons/showallvms.png</file> <file alias="shutdownvm.png">icons/shutdownvm.png</file>
<file alias="showcpuload.png">icons/showcpuload.png</file> <file alias="resumevm.png">icons/resumevm.png</file>
<file alias="firewall.png">icons/firewall.png</file> <file alias="pausevm.png">icons/pausevm.png</file>
</qresource> <file alias="showallvms.png">icons/showallvms.png</file>
<file alias="showcpuload.png">icons/showcpuload.png</file>
<file alias="firewall.png">icons/firewall.png</file>
</qresource>
</RCC> </RCC>

View File

@ -1,18 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>Dialog</class> <class>SettingsDialog</class>
<widget class="QDialog" name="Dialog"> <widget class="QDialog" name="SettingsDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>672</width> <width>694</width>
<height>351</height> <height>483</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Settings</string> <string>Settings</string>
</property> </property>
<property name="windowIcon">
<iconset resource="resources.qrc">
<normaloff>:/root.png</normaloff>:/root.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -22,7 +26,7 @@
<locale language="English" country="UnitedStates"/> <locale language="English" country="UnitedStates"/>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>3</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="basic_tab"> <widget class="QWidget" name="basic_tab">
<property name="locale"> <property name="locale">
@ -31,49 +35,111 @@
<attribute name="title"> <attribute name="title">
<string>Basic</string> <string>Basic</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_4">
<item row="0" column="0"> <item>
<widget class="QLabel" name="label"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="text"> <item>
<string>Name &amp; label:</string> <widget class="QGroupBox" name="groupBox_3">
</property> <property name="title">
</widget> <string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Name &amp; label:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="vmname">
<property name="text">
<string>myappvm</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="vmlabel">
<property name="frame">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Use this template:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="template_name"/>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="allow_networking">
<property name="text">
<string>Allow networking</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</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>
<item row="0" column="1"> <item>
<widget class="QLineEdit" name="vmname">
<property name="text">
<string>myappvm</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="vmlabel">
<property name="frame">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Use this template:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="template_name"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="allow_networking">
<property name="text">
<string>Allow networking</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -92,8 +158,8 @@
<attribute name="title"> <attribute name="title">
<string>Advanced</string> <string>Advanced</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0"> <item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
<string>Disk storage</string> <string>Disk storage</string>
@ -135,7 +201,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Private storage max. size</string> <string>Private storage max. size:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -155,14 +221,14 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="2">
<widget class="QGroupBox" name="groupBox_2"> <widget class="QGroupBox" name="groupBox_2">
<property name="title"> <property name="title">
<string>Memory/CPU</string> <string>Memory/CPU</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="mem_size"> <widget class="QSpinBox" name="max_mem_size">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -180,14 +246,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="2" column="2">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
<string>MB</string> <string>MB</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="3" column="1">
<widget class="QSpinBox" name="spinBox"> <widget class="QSpinBox" name="spinBox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -200,10 +266,47 @@
</property> </property>
</widget> </widget>
</item> </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"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>VCPUs</string> <string>VCPUs:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -211,17 +314,160 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<spacer name="verticalSpacer_2"> <widget class="QGroupBox" name="groupBox_9">
<property name="orientation"> <property name="title">
<enum>Qt::Vertical</enum> <string>Networking</string>
</property> </property>
<property name="sizeHint" stdset="0"> <layout class="QFormLayout" name="formLayout_3">
<size> <item row="0" column="0">
<width>20</width> <widget class="QLabel" name="label_18">
<height>124</height> <property name="text">
</size> <string>NetVM:</string>
</property>
</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> </property>
</spacer> <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> </item>
</layout> </layout>
</widget> </widget>
@ -229,12 +475,25 @@
<attribute name="title"> <attribute name="title">
<string>Devices</string> <string>Devices</string>
</attribute> </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>
<widget class="QWidget" name="apps_tab"> <widget class="QWidget" name="apps_tab">
<attribute name="icon">
<iconset resource="resources.qrc">
<normaloff>:/appsprefs.png</normaloff>:/appsprefs.png</iconset>
</attribute>
<attribute name="title"> <attribute name="title">
<string>Applications</string> <string>Applications</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<layout class="QVBoxLayout" name="apps_layout"/>
</item>
</layout>
</widget> </widget>
</widget> </widget>
</item> </item>
@ -252,12 +511,14 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="resources.qrc"/>
</resources>
<connections> <connections>
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>accepted()</signal> <signal>accepted()</signal>
<receiver>Dialog</receiver> <receiver>SettingsDialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
@ -273,7 +534,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>rejected()</signal> <signal>rejected()</signal>
<receiver>Dialog</receiver> <receiver>SettingsDialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">