* update Preferences and Settings forms

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@901 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-01-01 22:07:49 +00:00
parent 8ba3c2de28
commit 67706cc73c
18 changed files with 2173 additions and 1327 deletions

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>440</width> <width>410</width>
<height>311</height> <height>300</height>
</rect> </rect>
</property> </property>
<property name="palette" > <property name="palette" >
@ -492,223 +492,292 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<widget class="QGroupBox" name="grpLanguage" > <layout class="QGridLayout" >
<property name="geometry" > <property name="leftMargin" >
<rect> <number>6</number>
<x>0</x>
<y>0</y>
<width>441</width>
<height>75</height>
</rect>
</property> </property>
<property name="contextMenuPolicy" > <property name="topMargin" >
<enum>Qt::NoContextMenu</enum> <number>6</number>
</property> </property>
<property name="title" > <property name="rightMargin" >
<string>Language</string> <number>6</number>
</property> </property>
<widget class="QWidget" name="layoutWidget_2" > <property name="bottomMargin" >
<property name="geometry" > <number>6</number>
<rect> </property>
<x>10</x> <property name="horizontalSpacing" >
<y>44</y> <number>0</number>
<width>341</width> </property>
<height>26</height> <property name="verticalSpacing" >
</rect> <number>0</number>
</property> </property>
<layout class="QGridLayout" > <item row="0" column="0" >
<property name="margin" > <widget class="QGroupBox" name="grpLanguage" >
<number>0</number> <property name="minimumSize" >
<size>
<width>0</width>
<height>75</height>
</size>
</property> </property>
<property name="spacing" > <property name="contextMenuPolicy" >
<number>6</number> <enum>Qt::NoContextMenu</enum>
</property> </property>
<item row="0" column="1" > <property name="title" >
<spacer> <string>Language</string>
<property name="orientation" > </property>
<enum>Qt::Horizontal</enum> <widget class="QWidget" name="layoutWidget_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>44</y>
<width>341</width>
<height>26</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="topMargin" >
<size> <number>0</number>
<width>300</width>
<height>16</height>
</size>
</property> </property>
</spacer> <property name="rightMargin" >
</item> <number>0</number>
<item row="0" column="0" >
<widget class="QComboBox" name="cmboLanguage" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property> </property>
<property name="contextMenuPolicy" > <property name="bottomMargin" >
<enum>Qt::NoContextMenu</enum> <number>0</number>
</property> </property>
<property name="toolTip" > <property name="horizontalSpacing" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>300</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<widget class="QComboBox" name="cmboLanguage" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;"> &lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose the language used in RetroShare&lt;/p>&lt;/body>&lt;/html></string> &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose the language used in RetroShare&lt;/p>&lt;/body>&lt;/html></string>
</property> </property>
<property name="editable" > <property name="editable" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="iconSize" > <property name="iconSize" >
<size> <size>
<width>24</width> <width>24</width>
<height>16</height> <height>16</height>
</size> </size>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>10</x> <x>10</x>
<y>27</y> <y>27</y>
<width>591</width> <width>591</width>
<height>17</height> <height>17</height>
</rect> </rect>
</property> </property>
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<property name="text" > <property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changes to language will only take effect after restarting RetroShare!&lt;/p>&lt;/body>&lt;/html></string> <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changes to language will only take effect after restarting RetroShare!&lt;/p>&lt;/body>&lt;/html></string>
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="grpStyle" > </item>
<property name="geometry" > <item row="1" column="0" >
<rect> <widget class="QGroupBox" name="grpStyle" >
<x>0</x> <property name="minimumSize" >
<y>80</y> <size>
<width>441</width> <width>0</width>
<height>55</height> <height>64</height>
</rect> </size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip" >
<string/>
</property>
<property name="title" >
<string>Style</string>
</property>
<widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>24</y>
<width>341</width>
<height>26</height>
</rect>
</property>
<layout class="QGridLayout" name="_2" >
<property name="margin" >
<number>0</number>
</property> </property>
<property name="spacing" > <property name="contextMenuPolicy" >
<number>6</number> <enum>Qt::NoContextMenu</enum>
</property> </property>
<item row="0" column="0" > <property name="toolTip" >
<widget class="QComboBox" name="cmboStyle" > <string/>
<property name="minimumSize" > </property>
<size> <property name="title" >
<width>150</width> <string>Style</string>
<height>0</height> </property>
</size> <widget class="QWidget" name="layoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>24</y>
<width>341</width>
<height>26</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property> </property>
<property name="contextMenuPolicy" > <property name="topMargin" >
<enum>Qt::NoContextMenu</enum> <number>0</number>
</property> </property>
<property name="toolTip" > <property name="rightMargin" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QComboBox" name="cmboStyle" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;"> &lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:10pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose RetroShare's interface style&lt;/p>&lt;/body>&lt;/html></string> &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Choose RetroShare's interface style&lt;/p>&lt;/body>&lt;/html></string>
</property> </property>
<property name="editable" > <property name="editable" >
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item row="0" column="1" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" >
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
<widget class="QGroupBox" name="groupBox" > </item>
<property name="geometry" > <item row="2" column="0" >
<rect> <widget class="QGroupBox" name="groupBox" >
<x>0</x> <property name="minimumSize" >
<y>140</y> <size>
<width>441</width> <width>0</width>
<height>61</height> <height>64</height>
</rect> </size>
</property>
<property name="title" >
<string>Style Sheet</string>
</property>
<widget class="QWidget" name="layoutWidget_3" >
<property name="geometry" >
<rect>
<x>11</x>
<y>20</y>
<width>341</width>
<height>25</height>
</rect>
</property>
<layout class="QGridLayout" name="_3" >
<property name="margin" >
<number>0</number>
</property> </property>
<property name="spacing" > <property name="title" >
<number>6</number> <string>Style Sheet</string>
</property> </property>
<item row="0" column="1" > <widget class="QWidget" name="layoutWidget_3" >
<spacer> <property name="geometry" >
<property name="orientation" > <rect>
<enum>Qt::Horizontal</enum> <x>11</x>
<y>20</y>
<width>341</width>
<height>25</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="topMargin" >
<size> <number>0</number>
<width>181</width>
<height>20</height>
</size>
</property> </property>
</spacer> <property name="rightMargin" >
</item> <number>0</number>
<item row="0" column="0" >
<widget class="QComboBox" name="styleSheetCombo" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property> </property>
</widget> <property name="bottomMargin" >
</item> <number>0</number>
</layout> </property>
</widget> <property name="horizontalSpacing" >
</widget> <number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>181</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" >
<widget class="QComboBox" name="styleSheetCombo" >
<property name="minimumSize" >
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="3" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>361</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget> </widget>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>456</width> <width>452</width>
<height>356</height> <height>349</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
@ -501,197 +501,195 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<widget class="QGroupBox" name="groupBox_2" > <layout class="QGridLayout" >
<property name="geometry" > <property name="leftMargin" >
<rect> <number>6</number>
<x>0</x>
<y>200</y>
<width>441</width>
<height>72</height>
</rect>
</property> </property>
<property name="title" > <property name="topMargin" >
<string>Incoming Directory</string> <number>6</number>
</property> </property>
<layout class="QGridLayout" > <property name="rightMargin" >
<item row="0" column="0" > <number>6</number>
<widget class="QLineEdit" name="incomingDir" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="incomingButton" >
<property name="minimumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>200</height>
</rect>
</property> </property>
<property name="title" > <property name="bottomMargin" >
<string>Shared Directories</string> <number>6</number>
</property> </property>
<widget class="QListWidget" name="dirList" > <property name="horizontalSpacing" >
<property name="geometry" > <number>0</number>
<rect>
<x>10</x>
<y>20</y>
<width>381</width>
<height>171</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="addButton" >
<property name="geometry" >
<rect>
<x>400</x>
<y>20</y>
<width>34</width>
<height>34</height>
</rect>
</property>
<property name="minimumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
<widget class="QPushButton" name="removeButton" >
<property name="geometry" >
<rect>
<x>400</x>
<y>60</y>
<width>34</width>
<height>34</height>
</rect>
</property>
<property name="minimumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_3" >
<property name="geometry" >
<rect>
<x>0</x>
<y>270</y>
<width>441</width>
<height>72</height>
</rect>
</property> </property>
<property name="title" > <property name="verticalSpacing" >
<string>Partials Direcrtory</string> <number>0</number>
</property> </property>
<layout class="QGridLayout" > <item row="0" column="0" >
<item row="0" column="0" > <widget class="QGroupBox" name="groupBox" >
<widget class="QLineEdit" name="partialsDir" > <property name="title" >
<property name="readOnly" > <string>Shared Directories</string>
<bool>true</bool> </property>
</property> <layout class="QGridLayout" >
</widget> <item rowspan="3" row="0" column="0" >
</item> <widget class="QListWidget" name="dirList" />
<item row="0" column="1" > </item>
<widget class="QPushButton" name="partialButton" > <item row="0" column="1" >
<property name="minimumSize" > <widget class="QPushButton" name="addButton" >
<size> <property name="minimumSize" >
<width>31</width> <size>
<height>31</height> <width>34</width>
</size> <height>34</height>
</property> </size>
<property name="maximumSize" > </property>
<size> <property name="maximumSize" >
<width>31</width> <size>
<height>31</height> <width>34</width>
</size> <height>34</height>
</property> </size>
<property name="text" > </property>
<string/> <property name="text" >
</property> <string/>
<property name="icon" > </property>
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset> <property name="icon" >
</property> <iconset resource="../images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
<property name="iconSize" > </property>
<size> <property name="iconSize" >
<width>24</width> <size>
<height>24</height> <width>24</width>
</size> <height>24</height>
</property> </size>
</widget> </property>
</item> </widget>
</layout> </item>
</widget> <item row="1" column="1" >
<widget class="QPushButton" name="removeButton" >
<property name="minimumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>71</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Incoming Directory</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLineEdit" name="incomingDir" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="incomingButton" >
<property name="minimumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>Partials Direcrtory</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLineEdit" name="partialsDir" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="partialButton" >
<property name="minimumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>incomingDir</tabstop> <tabstop>incomingDir</tabstop>

View file

@ -5,10 +5,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>466</width> <width>431</width>
<height>405</height> <height>250</height>
</rect> </rect>
</property> </property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="palette" > <property name="palette" >
<palette> <palette>
<active> <active>
@ -492,90 +498,123 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<widget class="QGroupBox" name="grpLogin" > <layout class="QGridLayout" >
<property name="geometry" > <property name="leftMargin" >
<rect> <number>6</number>
<x>0</x>
<y>0</y>
<width>441</width>
<height>61</height>
</rect>
</property> </property>
<property name="title" > <property name="topMargin" >
<string>Login</string> <number>6</number>
</property> </property>
<widget class="QCheckBox" name="autologincheckBox" > <property name="rightMargin" >
<property name="geometry" > <number>6</number>
<rect>
<x>10</x>
<y>20</y>
<width>141</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Auto Login</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>0</x>
<y>60</y>
<width>441</width>
<height>111</height>
</rect>
</property> </property>
<property name="title" > <property name="bottomMargin" >
<string>Misc</string> <number>6</number>
</property> </property>
<widget class="QCheckBox" name="chkShowOnStartup" > <property name="horizontalSpacing" >
<property name="geometry" > <number>0</number>
<rect> </property>
<x>10</x> <property name="verticalSpacing" >
<y>40</y> <number>0</number>
<width>401</width> </property>
<height>20</height> <item row="0" column="0" >
</rect> <widget class="QGroupBox" name="grpLogin" >
</property> <property name="minimumSize" >
<property name="text" > <size>
<string>Show MainWindow at Startup</string> <width>0</width>
</property> <height>48</height>
<property name="checked" > </size>
<bool>false</bool> </property>
</property> <property name="title" >
</widget> <string>Login</string>
<widget class="QCheckBox" name="checkStartMinimized" > </property>
<property name="geometry" > <widget class="QCheckBox" name="autologincheckBox" >
<rect> <property name="geometry" >
<x>10</x> <rect>
<y>60</y> <x>10</x>
<width>401</width> <y>20</y>
<height>20</height> <width>141</width>
</rect> <height>18</height>
</property> </rect>
<property name="text" > </property>
<string>Start minimized</string> <property name="text" >
</property> <string>Auto Login</string>
<property name="checked" > </property>
<bool>true</bool> </widget>
</property> </widget>
</widget> </item>
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup" > <item row="1" column="0" >
<property name="geometry" > <widget class="QGroupBox" name="groupBox_2" >
<rect> <property name="minimumSize" >
<x>10</x> <size>
<y>20</y> <width>0</width>
<width>411</width> <height>80</height>
<height>18</height> </size>
</rect> </property>
</property> <property name="title" >
<property name="text" > <string>Misc</string>
<string>Start RetroShare when my system starts</string> </property>
</property> <widget class="QCheckBox" name="chkShowOnStartup" >
</widget> <property name="geometry" >
</widget> <rect>
<x>10</x>
<y>40</y>
<width>401</width>
<height>20</height>
</rect>
</property>
<property name="text" >
<string>Show MainWindow at Startup</string>
</property>
<property name="checked" >
<bool>false</bool>
</property>
</widget>
<widget class="QCheckBox" name="checkStartMinimized" >
<property name="geometry" >
<rect>
<x>10</x>
<y>60</y>
<width>401</width>
<height>20</height>
</rect>
</property>
<property name="text" >
<string>Start minimized</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>411</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Start RetroShare when my system starts</string>
</property>
</widget>
</widget>
</item>
<item row="2" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>401</width>
<height>91</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget> </widget>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>404</width> <width>388</width>
<height>270</height> <height>332</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
@ -499,6 +499,18 @@
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<item rowspan="2" row="0" column="0" > <item rowspan="2" row="0" column="0" >
<widget class="QGroupBox" name="notify_ForumNewMsg" > <widget class="QGroupBox" name="notify_ForumNewMsg" >
<property name="title" > <property name="title" >
@ -509,16 +521,16 @@
<number>0</number> <number>0</number>
</property> </property>
<property name="leftMargin" > <property name="leftMargin" >
<number>0</number> <number>6</number>
</property> </property>
<property name="topMargin" > <property name="topMargin" >
<number>0</number> <number>6</number>
</property> </property>
<property name="rightMargin" > <property name="rightMargin" >
<number>0</number> <number>6</number>
</property> </property>
<property name="bottomMargin" > <property name="bottomMargin" >
<number>0</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QCheckBox" name="notify_Peers" > <widget class="QCheckBox" name="notify_Peers" >
@ -578,6 +590,12 @@
<string>Popups</string> <string>Popups</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<item> <item>
<widget class="QCheckBox" name="popup_Connect" > <widget class="QCheckBox" name="popup_Connect" >
<property name="text" > <property name="text" >
@ -632,6 +650,19 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="2" column="0" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>361</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<resources> <resources>

View file

@ -48,6 +48,9 @@ ServerDialog::ServerDialog(QWidget *parent)
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus())); timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
timer->start(1000); timer->start(1000);
load();
updateStatus();
/* Hide platform specific features */ /* Hide platform specific features */
#ifdef Q_WS_WIN #ifdef Q_WS_WIN

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>636</width> <width>409</width>
<height>418</height> <height>373</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
@ -488,6 +488,24 @@
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QGroupBox" name="groupBox_2" > <widget class="QGroupBox" name="groupBox_2" >
<property name="sizePolicy" > <property name="sizePolicy" >
@ -572,180 +590,214 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="QGroupBox" name="groupBox" > <widget class="QTabWidget" name="tabWidget" >
<property name="sizePolicy" > <property name="currentIndex" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" > <number>0</number>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="title" > <widget class="QWidget" name="tab" >
<string>Network Configuration</string> <attribute name="title" >
</property> <string>Network Configuration</string>
<layout class="QVBoxLayout" > </attribute>
<item> <layout class="QGridLayout" >
<layout class="QHBoxLayout" > <item row="0" column="0" >
<item> <widget class="QGroupBox" name="groupBox" >
<layout class="QVBoxLayout" > <property name="sizePolicy" >
<item> <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<widget class="QRadioButton" name="radio_nonet" > <horstretch>0</horstretch>
<property name="text" > <verstretch>0</verstretch>
<string>No Conectivity</string> </sizepolicy>
</property> </property>
</widget> <property name="title" >
</item> <string>Network Configuration</string>
<item> </property>
<widget class="QRadioButton" name="radio_netLimited" >
<property name="text" >
<string>Limited</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netUdp" >
<property name="text" >
<string>Udp</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netServer" >
<property name="text" >
<string>Retroshare Server</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="check_udp" >
<property name="text" >
<string>UDP Connections</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_ext" >
<property name="text" >
<string>Stable External IP Addrress</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_dht" >
<property name="text" >
<string>DHT Okay</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_upnp" >
<property name="text" >
<string>UPnP Active</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_tcp" >
<property name="text" >
<string>TCP server</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>Local Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>External Address</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<item row="0" column="0" > <item row="0" column="0" >
<widget class="QLineEdit" name="localAddress" /> <layout class="QHBoxLayout" >
</item> <item>
<item row="0" column="1" > <layout class="QVBoxLayout" >
<widget class="QLabel" name="label_5" > <item>
<property name="text" > <widget class="QLabel" name="label" >
<string>Port:</string> <property name="text" >
</property> <string>Local Address</string>
</widget> </property>
</item> </widget>
<item row="0" column="2" > </item>
<widget class="QSpinBox" name="localPort" > <item>
<property name="minimum" > <widget class="QLabel" name="label_2" >
<number>0</number> <property name="text" >
</property> <string>External Address</string>
<property name="maximum" > </property>
<number>65535</number> </widget>
</property> </item>
<property name="value" > </layout>
<number>7812</number> </item>
</property> <item>
</widget> <layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLineEdit" name="localAddress" />
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="localPort" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLineEdit" name="extAddress" />
</item>
<item row="1" column="1" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QSpinBox" name="extPort" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="QLineEdit" name="extAddress" /> <spacer>
</item> <property name="orientation" >
<item row="1" column="1" > <enum>Qt::Vertical</enum>
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Port:</string>
</property> </property>
</widget> <property name="sizeHint" >
</item> <size>
<item row="1" column="2" > <width>301</width>
<widget class="QSpinBox" name="extPort" > <height>20</height>
<property name="minimum" > </size>
<number>0</number>
</property> </property>
<property name="maximum" > </spacer>
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </widget>
</layout> </item>
</item> </layout>
</layout> </widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<string>Network Status</string>
</attribute>
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QRadioButton" name="radio_nonet" >
<property name="text" >
<string>No Conectivity</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netLimited" >
<property name="text" >
<string>Limited</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netUdp" >
<property name="text" >
<string>Udp</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netServer" >
<property name="text" >
<string>Retroshare Server</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="check_udp" >
<property name="text" >
<string>UDP Connections</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_ext" >
<property name="text" >
<string>Stable External IP Addrress</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_dht" >
<property name="text" >
<string>DHT Okay</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_upnp" >
<property name="text" >
<string>UPnP Active</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_tcp" >
<property name="text" >
<string>TCP server</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0" >

View file

@ -21,13 +21,21 @@
#include "DirectoriesPage.h" #include "DirectoriesPage.h"
#include "rshare.h" #include "rshare.h"
#include "rsiface/rsfiles.h"
DirectoriesPage::DirectoriesPage(QWidget * parent, Qt::WFlags flags) DirectoriesPage::DirectoriesPage(QWidget * parent, Qt::WFlags flags)
: QWidget(parent, flags) : QWidget(parent, flags)
{ {
ui.setupUi(this); setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false); setAttribute(Qt::WA_QuitOnClose, false);
load();
//connect(addshareButton, SIGNAL(clicked( ) ), this , SLOT( addShareDirectory() ) );
connect(removeButton, SIGNAL(clicked( bool ) ), this , SLOT( removeShareDirectory() ) );
connect(incomingButton, SIGNAL(clicked( bool ) ), this , SLOT( setIncomingDirectory() ) );
connect(partialButton, SIGNAL(clicked( bool ) ), this , SLOT( setPartialsDirectory() ) );
} }
@ -42,13 +50,91 @@ DirectoriesPage::closeEvent (QCloseEvent * event)
bool bool
DirectoriesPage::save(QString &errmsg) DirectoriesPage::save(QString &errmsg)
{ {
return true;
} }
/** Loads the settings for this page */ /** Loads the settings for this page */
void void DirectoriesPage::load()
DirectoriesPage::load()
{ {
std::list<std::string>::const_iterator it;
std::list<std::string> dirs;
rsFiles->getSharedDirectories(dirs);
/* get a link to the table */
QListWidget *listWidget = dirList;
/* remove old items ??? */
listWidget->clear();
for(it = dirs.begin(); it != dirs.end(); it++)
{
/* (0) Dir Name */
listWidget->addItem(QString::fromStdString(*it));
}
incomingDir->setText(QString::fromStdString(rsFiles->getDownloadDirectory()));
partialsDir->setText(QString::fromStdString(rsFiles->getPartialsDirectory()));
listWidget->update(); /* update display */
} }
void DirectoriesPage::on_addshareButton_clicked()
{
/* select a dir
*/
QString qdir = QFileDialog::getOpenFileName(this, tr("Add Shared Directory"),tr("All Files (*)"));
/* add it to the server */
std::string dir = qdir.toStdString();
if (dir != "")
{
rsFiles->addSharedDirectory(dir);
load();
}
}
void DirectoriesPage::removeShareDirectory()
{
/* id current dir */
/* ask for removal */
QListWidget *listWidget = dirList;
QListWidgetItem *qdir = listWidget -> currentItem();
if (qdir)
{
rsFiles->removeSharedDirectory( qdir->text().toStdString());
load();
}
}
void DirectoriesPage::setIncomingDirectory()
{
QString qdir = QFileDialog::getExistingDirectory(this, tr("Set Incoming Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
std::string dir = qdir.toStdString();
if (dir != "")
{
rsFiles->setDownloadDirectory(dir);
}
load();
}
void DirectoriesPage::setPartialsDirectory()
{
QString qdir = QFileDialog::getExistingDirectory(this, tr("Set Partials Directory"), "",
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
std::string dir = qdir.toStdString();
if (dir != "")
{
rsFiles->setPartialsDirectory(dir);
}
load();
}

View file

@ -22,25 +22,40 @@
#ifndef DIRECTORIESPAGE_H #ifndef DIRECTORIESPAGE_H
# define DIRECTORIESPAGE_H # define DIRECTORIESPAGE_H
# include <QtGui/QWidget> #include <QFileDialog>
#include <QWidget>
#include <QtGui>
# include "ui_DirectoriesPage.h" # include "ui_DirectoriesPage.h"
class DirectoriesPage: public QWidget class DirectoriesPage: public QWidget, private Ui::DirectoriesPage
{ {
Q_OBJECT
public: public:
DirectoriesPage(QWidget * parent = 0, Qt::WFlags flags = 0); DirectoriesPage(QWidget * parent = 0, Qt::WFlags flags = 0);
~DirectoriesPage() {} // ~DirectoriesPage() {}
/** Saves the changes on this page */ /** Saves the changes on this page */
bool save(QString &errmsg); bool save(QString &errmsg);
/** Loads the settings for this page */ /** Loads the settings for this page */
void load(); void load();
private slots:
void on_addshareButton_clicked();
void removeShareDirectory();
void setIncomingDirectory();
void setPartialsDirectory();
private: private:
void closeEvent (QCloseEvent * event); void closeEvent (QCloseEvent * event);
Ui::DirectoriesPage ui;
}; };
#endif // !GENERALPAGE_H #endif // !GENERALPAGE_H

View file

@ -5,14 +5,12 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>406</width> <width>470</width>
<height>313</height> <height>367</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -503,126 +501,196 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<widget class="QGroupBox" name="groupBox" > <layout class="QGridLayout" >
<property name="geometry" > <property name="leftMargin" >
<rect> <number>6</number>
<x>10</x>
<y>60</y>
<width>381</width>
<height>200</height>
</rect>
</property> </property>
<property name="title" > <property name="topMargin" >
<string>Shared Directories</string> <number>6</number>
</property> </property>
<widget class="QPushButton" name="pushButton" > <property name="rightMargin" >
<property name="geometry" > <number>6</number>
<rect>
<x>340</x>
<y>20</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2" >
<property name="geometry" >
<rect>
<x>340</x>
<y>60</y>
<width>31</width>
<height>31</height>
</rect>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
<widget class="QListView" name="listView" >
<property name="geometry" >
<rect>
<x>9</x>
<y>19</y>
<width>321</width>
<height>171</height>
</rect>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="groupBox_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>0</y>
<width>381</width>
<height>61</height>
</rect>
</property> </property>
<property name="title" > <property name="bottomMargin" >
<string>Incoming files</string> <number>6</number>
</property> </property>
<widget class="QPushButton" name="pushButton_6" > <property name="horizontalSpacing" >
<property name="geometry" > <number>0</number>
<rect> </property>
<x>339</x> <property name="verticalSpacing" >
<y>21</y> <number>0</number>
<width>31</width> </property>
<height>32</height> <item row="0" column="0" >
</rect> <widget class="QGroupBox" name="groupBox" >
</property> <property name="title" >
<property name="text" > <string>Shared Directories</string>
<string/> </property>
</property> <layout class="QGridLayout" >
<property name="icon" > <item rowspan="3" row="0" column="0" >
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset> <widget class="QListWidget" name="dirList" />
</property> </item>
<property name="iconSize" > <item row="0" column="1" >
<size> <widget class="QPushButton" name="addshareButton" >
<width>24</width> <property name="minimumSize" >
<height>24</height> <size>
</size> <width>34</width>
</property> <height>34</height>
</widget> </size>
<widget class="QLineEdit" name="lineEdit_5" > </property>
<property name="geometry" > <property name="maximumSize" >
<rect> <size>
<x>11</x> <width>34</width>
<y>26</y> <height>34</height>
<width>321</width> </size>
<height>23</height> </property>
</rect> <property name="text" >
</property> <string/>
</widget> </property>
</widget> <property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryadd_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="removeButton" >
<property name="minimumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryremove_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>71</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Incoming Directory</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLineEdit" name="incomingDir" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="incomingButton" >
<property name="minimumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>Partials Direcrtory</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLineEdit" name="partialsDir" >
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="partialButton" >
<property name="minimumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>31</width>
<height>31</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directoryselect_24x24_shadow.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
<tabstops>
<tabstop>lineEdit_5</tabstop>
<tabstop>pushButton_6</tabstop>
<tabstop>listView</tabstop>
<tabstop>pushButton</tabstop>
<tabstop>pushButton_2</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />
</resources> </resources>

View file

@ -22,29 +22,36 @@
#include "GeneralPage.h" #include "GeneralPage.h"
#include "rshare.h" #include "rshare.h"
#include <util/stringutil.h>
#include <QSystemTrayIcon>
GeneralPage::GeneralPage(QWidget * parent, Qt::WFlags flags) GeneralPage::GeneralPage(QWidget * parent, Qt::WFlags flags)
: QWidget(parent, flags) : QWidget(parent, flags)
{ {
ui.setupUi(this); ui.setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false); setAttribute(Qt::WA_QuitOnClose, false);
setWindowTitle(windowTitle() + QLatin1String(" - Gloster 2")); setWindowTitle(windowTitle() + QLatin1String(" - General"));
//GConfig config;
//config.loadWidgetInformation(this);
/* Create RshareSettings object */ /* Create RshareSettings object */
_settings = new RshareSettings(); _settings = new RshareSettings();
/* Populate combo boxes */ if (QSystemTrayIcon::isSystemTrayAvailable()){
foreach (QString code, LanguageSupport::languageCodes()) {
ui.cmboLanguage->addItem(QIcon(":/images/flags/" + code + ".png"), /* Check if we are supposed to show our main window on startup */
LanguageSupport::languageName(code), ui.chkShowOnStartup->setChecked(_settings->showMainWindowAtStart());
code); if (ui.chkShowOnStartup->isChecked())
} show();
foreach (QString style, QStyleFactory::keys()) { } else {
ui.cmboStyle->addItem(style, style.toLower()); /* Don't let people hide the main window, since that's all they have. */
} ui.chkShowOnStartup->hide();
show();
}
/* Hide platform specific features */
#ifndef Q_WS_WIN
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
#endif
} }
void void
@ -62,14 +69,11 @@ bool
GeneralPage::save(QString &errmsg) GeneralPage::save(QString &errmsg)
{ {
Q_UNUSED(errmsg); Q_UNUSED(errmsg);
QString languageCode = _settings->setValue(QString::fromUtf8("StartMinimized"), startMinimized());
LanguageSupport::languageCode(ui.cmboLanguage->currentText());
_settings->setLanguageCode(languageCode); _settings->setRunRetroshareOnBoot(
_settings->setInterfaceStyle(ui.cmboStyle->currentText()); ui.chkRunRetroshareAtSystemStartup->isChecked());
/* Set to new style */
Rshare::setStyle(ui.cmboStyle->currentText());
return true; return true;
} }
@ -77,10 +81,23 @@ GeneralPage::save(QString &errmsg)
void void
GeneralPage::load() GeneralPage::load()
{ {
int index = ui.cmboLanguage->findData(_settings->getLanguageCode()); ui.chkRunRetroshareAtSystemStartup->setChecked(
ui.cmboLanguage->setCurrentIndex(index); _settings->runRetroshareOnBoot());
index = ui.cmboStyle->findData(Rshare::style().toLower()); ui.checkStartMinimized->setChecked(_settings->value(QString::fromUtf8("StartMinimized"), false).toBool());
ui.cmboStyle->setCurrentIndex(index);
} }
bool GeneralPage::startMinimized() const {
if(ui.checkStartMinimized->isChecked()) return true;
return ui.checkStartMinimized->isChecked();
}
/** Called when the "show on startup" checkbox is toggled. */
void
GeneralPage::toggleShowOnStartup(bool checked)
{
//RshareSettings _settings;
_settings->setShowMainWindowAtStart(checked);
}

View file

@ -34,6 +34,8 @@
class GeneralPage: public QWidget class GeneralPage: public QWidget
{ {
Q_OBJECT
public: public:
GeneralPage(QWidget * parent = 0, Qt::WFlags flags = 0); GeneralPage(QWidget * parent = 0, Qt::WFlags flags = 0);
~GeneralPage() {} ~GeneralPage() {}
@ -42,6 +44,12 @@ class GeneralPage: public QWidget
bool save(QString &errmsg); bool save(QString &errmsg);
/** Loads the settings for this page */ /** Loads the settings for this page */
void load(); void load();
bool startMinimized() const;
private slots:
/** Called when the "show on startup" checkbox is toggled. */
void toggleShowOnStartup(bool checked);
private: private:
/** A VidaliaSettings object used for saving/loading settings */ /** A VidaliaSettings object used for saving/loading settings */

View file

@ -5,8 +5,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>430</width>
<height>364</height> <height>296</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
@ -15,168 +15,124 @@
<property name="windowIcon" > <property name="windowIcon" >
<iconset/> <iconset/>
</property> </property>
<widget class="QGroupBox" name="grpStyle" > <layout class="QGridLayout" >
<property name="geometry" > <property name="leftMargin" >
<rect> <number>6</number>
<x>10</x>
<y>80</y>
<width>381</width>
<height>55</height>
</rect>
</property> </property>
<property name="contextMenuPolicy" > <property name="topMargin" >
<enum>Qt::NoContextMenu</enum> <number>6</number>
</property> </property>
<property name="toolTip" > <property name="rightMargin" >
<string/> <number>6</number>
</property> </property>
<property name="title" > <property name="bottomMargin" >
<string>Style</string> <number>6</number>
</property> </property>
<widget class="QWidget" name="layoutWidget" > <property name="horizontalSpacing" >
<property name="geometry" > <number>0</number>
<rect> </property>
<x>10</x> <property name="verticalSpacing" >
<y>24</y> <number>0</number>
<width>351</width> </property>
<height>24</height> <item row="0" column="0" >
</rect> <widget class="QGroupBox" name="grpLogin" >
</property> <property name="minimumSize" >
<layout class="QGridLayout" > <size>
<property name="margin" > <width>0</width>
<number>0</number> <height>48</height>
</size>
</property> </property>
<property name="spacing" > <property name="title" >
<number>6</number> <string>Login</string>
</property> </property>
<item row="0" column="0" > <widget class="QCheckBox" name="autologincheckBox" >
<widget class="QComboBox" name="cmboStyle" > <property name="geometry" >
<property name="minimumSize" > <rect>
<size> <x>10</x>
<width>150</width> <y>20</y>
<height>0</height> <width>141</width>
</size> <height>18</height>
</property> </rect>
<property name="contextMenuPolicy" > </property>
<enum>Qt::NoContextMenu</enum> <property name="text" >
</property> <string>Auto Login</string>
<property name="toolTip" > </property>
<string>Choose RetroShare's interface style</string> </widget>
</property> </widget>
<property name="editable" > </item>
<bool>false</bool> <item row="1" column="0" >
</property> <widget class="QGroupBox" name="groupBox_2" >
</widget> <property name="minimumSize" >
</item> <size>
<item row="0" column="1" > <width>0</width>
<spacer> <height>80</height>
<property name="orientation" > </size>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
<widget class="QGroupBox" name="grpLanguage" >
<property name="geometry" >
<rect>
<x>10</x>
<y>0</y>
<width>381</width>
<height>75</height>
</rect>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="title" >
<string>Language</string>
</property>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>10</x>
<y>27</y>
<width>591</width>
<height>17</height>
</rect>
</property>
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Arial; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changes to language will only take effect after restarting RetroShare!&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>44</y>
<width>351</width>
<height>24</height>
</rect>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property> </property>
<property name="spacing" > <property name="title" >
<number>6</number> <string>Misc</string>
</property> </property>
<item row="0" column="1" > <widget class="QCheckBox" name="chkShowOnStartup" >
<spacer> <property name="geometry" >
<property name="orientation" > <rect>
<enum>Qt::Horizontal</enum> <x>10</x>
</property> <y>40</y>
<property name="sizeHint" > <width>401</width>
<size> <height>20</height>
<width>300</width> </rect>
<height>16</height> </property>
</size> <property name="text" >
</property> <string>Show MainWindow at Startup</string>
</spacer> </property>
</item> <property name="checked" >
<item row="0" column="0" > <bool>false</bool>
<widget class="QComboBox" name="cmboLanguage" > </property>
<property name="minimumSize" > </widget>
<size> <widget class="QCheckBox" name="checkStartMinimized" >
<width>150</width> <property name="geometry" >
<height>0</height> <rect>
</size> <x>10</x>
</property> <y>60</y>
<property name="contextMenuPolicy" > <width>401</width>
<enum>Qt::NoContextMenu</enum> <height>20</height>
</property> </rect>
<property name="toolTip" > </property>
<string>Choose the language used in RetroShare</string> <property name="text" >
</property> <string>Start minimized</string>
<property name="editable" > </property>
<bool>false</bool> <property name="checked" >
</property> <bool>true</bool>
<property name="iconSize" > </property>
<size> </widget>
<width>24</width> <widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup" >
<height>16</height> <property name="geometry" >
</size> <rect>
</property> <x>10</x>
</widget> <y>20</y>
</item> <width>411</width>
</layout> <height>18</height>
</widget> </rect>
</widget> </property>
<property name="text" >
<string>Start RetroShare when my system starts</string>
</property>
</widget>
</widget>
</item>
<item row="2" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>391</width>
<height>61</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget> </widget>
<tabstops>
<tabstop>cmboLanguage</tabstop>
<tabstop>cmboStyle</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />
</resources> </resources>

View file

@ -10,9 +10,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -500,91 +498,7 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
<x>10</x>
<y>0</y>
<width>371</width>
<height>81</height>
</rect>
</property>
<property name="title" >
<string>Rate Options</string>
</property>
<widget class="QLabel" name="label" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>141</width>
<height>16</height>
</rect>
</property>
<property name="text" >
<string>Max Total Data Rate (KB/S):</string>
</property>
</widget>
<widget class="QLabel" name="label_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>50</y>
<width>116</width>
<height>16</height>
</rect>
</property>
<property name="text" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Rate per Person (KB/S):&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_2" >
<property name="geometry" >
<rect>
<x>280</x>
<y>50</y>
<width>62</width>
<height>22</height>
</rect>
</property>
<property name="decimals" >
<number>1</number>
</property>
<property name="maximum" >
<double>256.000000000000000</double>
</property>
<property name="value" >
<double>5.000000000000000</double>
</property>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox" >
<property name="geometry" >
<rect>
<x>280</x>
<y>20</y>
<width>62</width>
<height>22</height>
</rect>
</property>
<property name="decimals" >
<number>1</number>
</property>
<property name="maximum" >
<double>356.000000000000000</double>
</property>
<property name="value" >
<double>20.000000000000000</double>
</property>
</widget>
</widget>
</widget> </widget>
<tabstops>
<tabstop>doubleSpinBox</tabstop>
<tabstop>doubleSpinBox_2</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />
</resources> </resources>

View file

@ -22,11 +22,27 @@
#include "ServerPage.h" #include "ServerPage.h"
#include "rshare.h" #include "rshare.h"
#include <iostream>
#include <sstream>
#include "rsiface/rsiface.h"
#include "rsiface/rspeers.h"
#include <QTimer>
ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags) ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags)
: QWidget(parent, flags) : QWidget(parent, flags)
{ {
ui.setupUi(this); ui.setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false); setAttribute(Qt::WA_QuitOnClose, false);
connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) );
QTimer *timer = new QTimer(this);
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus()));
timer->start(1000);
load();
} }
void void
@ -41,12 +57,338 @@ bool
ServerPage::save(QString &errmsg) ServerPage::save(QString &errmsg)
{ {
/* save the server address */
/* save local address */
/* save the url for DNS access */
/* restart server */
/* save all? */
saveAddresses();
return true;
} }
/** Loads the settings for this page */ /** Loads the settings for this page */
void void ServerPage::load()
ServerPage::load()
{ {
/* load up configuration from rsPeers */
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
{
return;
}
/* set net mode */
int netIndex = 0;
switch(detail.tryNetMode)
{
case RS_NETMODE_EXT:
netIndex = 2;
break;
case RS_NETMODE_UDP:
netIndex = 1;
break;
default:
case RS_NETMODE_UPNP:
netIndex = 0;
break;
}
ui.netModeComboBox->setCurrentIndex(netIndex);
/* set dht/disc */
netIndex = 1;
if (detail.visState & RS_VS_DHT_ON)
{
netIndex = 0;
}
ui.dhtComboBox->setCurrentIndex(netIndex);
netIndex = 1;
if (detail.visState & RS_VS_DISC_ON)
{
netIndex = 0;
}
ui.discComboBox->setCurrentIndex(netIndex);
rsiface->lockData(); /* Lock Interface */
ui.totalRate->setValue(rsiface->getConfig().maxDataRate);
ui.indivRate->setValue(rsiface->getConfig().maxIndivDataRate);
rsiface->unlockData(); /* UnLock Interface */
toggleUPnP();
//ui.check_net->setCheckable(true);
ui.check_upnp->setCheckable(true);
ui.check_dht->setCheckable(true);
ui.check_ext->setCheckable(true);
ui.check_udp->setCheckable(true);
ui.check_tcp->setCheckable(true);
//ui.check_net->setEnabled(false);
ui.check_upnp->setEnabled(false);
ui.check_dht->setEnabled(false);
ui.check_ext->setEnabled(false);
ui.check_udp->setEnabled(false);
ui.check_tcp->setEnabled(false);
ui.radio_nonet->setEnabled(false);
ui.radio_netLimited->setEnabled(false);
ui.radio_netUdp->setEnabled(false);
ui.radio_netServer->setEnabled(false);
/* Addresses must be set here - otherwise can't edit it */
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
ui.localPort -> setValue(detail.localPort);
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
ui.extPort -> setValue(detail.extPort);
}
/** Loads the settings for this page */
void ServerPage::updateStatus()
{
/* load up configuration from rsPeers */
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(rsPeers->getOwnId(), detail))
{
return;
}
/* only update if can't edit */
if (!ui.localPort->isEnabled())
{
/* set local address */
ui.localPort -> setValue(detail.localPort);
ui.extPort -> setValue(detail.extPort);
}
/* set local address */
ui.localAddress->setText(QString::fromStdString(detail.localAddr));
/* set the server address */
ui.extAddress->setText(QString::fromStdString(detail.extAddr));
#if 0
/* set status */
std::ostringstream out;
out << "Attempted Network Mode: ";
switch(detail.tryNetMode)
{
case RS_NETMODE_EXT:
out << "External Forwarded Port (UltraPEER Mode)";
break;
case RS_NETMODE_UDP:
out << "Firewalled";
break;
default:
case RS_NETMODE_UPNP:
out << "Automatic: UPnP Forwarded Port";
break;
}
out << std::endl;
out << "Actual Network Mode: ";
switch(detail.netMode)
{
case RS_NETMODE_EXT:
out << "External Forwarded Port (UltraPEER Mode)";
break;
case RS_NETMODE_UDP:
out << "Firewalled";
break;
case RS_NETMODE_UPNP:
out << "Automatic: UPnP Forwarded Port";
break;
default:
case RS_NETMODE_UNREACHABLE:
out << "Unreachable: Firewalled by Symmetric NAT";
break;
}
out << std::endl;
out << "\tLocal Address: " << detail.localAddr;
out << ":" << detail.localPort;
out << std::endl;
out << "\tExternal Address: " << detail.extAddr;
out << ":" << detail.extPort;
out << std::endl;
out << "UPnP Status: ";
out << std::endl;
out << "DHT Status: ";
if (detail.visState & RS_VS_DHT_ON)
out << " Enabled";
else
out << " Disabled";
out << std::endl;
out << "Discovery Status: ";
if (detail.visState & RS_VS_DISC_ON)
out << " Enabled";
else
out << " Disabled";
out << std::endl;
if (detail.netMode == RS_NETMODE_UNREACHABLE)
{
ui.netStatusBox->setTextColor( Qt::red );
}
else
{
ui.netStatusBox->setTextColor( Qt::black );
}
ui.netStatusBox->setText(QString::fromStdString(out.str()));
ui.netStatusBox ->setReadOnly(true);
#endif
rsiface->lockData(); /* Lock Interface */
/* now the extra bit .... switch on check boxes */
const RsConfig &config = rsiface->getConfig();
//ui.check_net->setChecked(config.netOk);
ui.check_upnp->setChecked(config.netUpnpOk);
ui.check_dht->setChecked(config.netDhtOk);
ui.check_ext->setChecked(config.netExtOk);
ui.check_udp->setChecked(config.netUdpOk);
ui.check_tcp->setChecked(config.netTcpOk);
if (config.netExtOk)
{
if (config.netUpnpOk || config.netTcpOk)
{
ui.radio_netServer->setChecked(true);
}
else
{
ui.radio_netUdp->setChecked(true);
}
}
else if (config.netOk)
{
ui.radio_netLimited->setChecked(true);
}
else
{
ui.radio_nonet->setChecked(true);
}
rsiface->unlockData(); /* UnLock Interface */
} }
void ServerPage::toggleUPnP()
{
/* switch on the radioButton */
bool settingChangeable = false;
if (0 != ui.netModeComboBox->currentIndex())
{
settingChangeable = true;
}
if (settingChangeable)
{
ui.dhtComboBox->setEnabled(true);
// disabled until we've got it all working.
//ui.discComboBox->setEnabled(true);
ui.discComboBox->setEnabled(false);
ui.localAddress->setEnabled(false);
ui.localPort -> setEnabled(true);
ui.extAddress -> setEnabled(false);
ui.extPort -> setEnabled(true);
}
else
{
ui.dhtComboBox->setEnabled(false);
ui.discComboBox->setEnabled(false);
ui.localAddress->setEnabled(false);
ui.localPort -> setEnabled(false);
ui.extAddress -> setEnabled(false);
ui.extPort -> setEnabled(false);
}
}
void ServerPage::saveAddresses()
{
QString str;
bool saveAddr = false;
RsPeerDetails detail;
std::string ownId = rsPeers->getOwnId();
if (!rsPeers->getPeerDetails(ownId, detail))
{
return;
}
int netIndex = ui.netModeComboBox->currentIndex();
/* Check if netMode has changed */
int netMode = 0;
switch(netIndex)
{
case 2:
netMode = RS_NETMODE_EXT;
break;
case 1:
netMode = RS_NETMODE_UDP;
break;
default:
case 0:
netMode = RS_NETMODE_UPNP;
break;
}
if (detail.tryNetMode != netMode)
{
rsPeers->setNetworkMode(ownId, netMode);
}
int visState = 0;
/* Check if vis has changed */
if (0 == ui.discComboBox->currentIndex())
{
visState |= RS_VS_DISC_ON;
}
if (0 == ui.dhtComboBox->currentIndex())
{
visState |= RS_VS_DHT_ON;
}
if (visState != detail.visState)
{
rsPeers->setVisState(ownId, visState);
}
if (0 != netIndex)
{
saveAddr = true;
}
if (saveAddr)
{
rsPeers->setLocalAddress(rsPeers->getOwnId(), ui.localAddress->text().toStdString(), ui.localPort->value());
rsPeers->setExtAddress(rsPeers->getOwnId(), ui.extAddress->text().toStdString(), ui.extPort->value());
}
rsicontrol->ConfigSetDataRates( ui.totalRate->value(), ui.indivRate->value() );
load();
}

View file

@ -27,6 +27,8 @@
class ServerPage: public QWidget class ServerPage: public QWidget
{ {
Q_OBJECT
public: public:
ServerPage(QWidget * parent = 0, Qt::WFlags flags = 0); ServerPage(QWidget * parent = 0, Qt::WFlags flags = 0);
~ServerPage() {} ~ServerPage() {}
@ -36,6 +38,13 @@ class ServerPage: public QWidget
/** Loads the settings for this page */ /** Loads the settings for this page */
void load(); void load();
public slots:
void updateStatus();
private slots:
void saveAddresses();
void toggleUPnP();
private: private:
void closeEvent (QCloseEvent * event); void closeEvent (QCloseEvent * event);

View file

@ -5,14 +5,12 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>399</width> <width>437</width>
<height>389</height> <height>388</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -500,200 +498,421 @@
<property name="contextMenuPolicy" > <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<widget class="QPushButton" name="pushButton" > <layout class="QGridLayout" >
<property name="geometry" > <property name="leftMargin" >
<rect> <number>6</number>
<x>10</x>
<y>160</y>
<width>181</width>
<height>23</height>
</rect>
</property> </property>
<property name="text" > <property name="topMargin" >
<string>Change + Restart Server</string> <number>6</number>
</property> </property>
</widget> <property name="rightMargin" >
<widget class="QGroupBox" name="groupBox" > <number>6</number>
<property name="geometry" >
<rect>
<x>10</x>
<y>0</y>
<width>381</width>
<height>101</height>
</rect>
</property> </property>
<property name="title" > <property name="bottomMargin" >
<string>Server Settings</string> <number>6</number>
</property> </property>
<widget class="QLabel" name="label_2" > <property name="horizontalSpacing" >
<property name="geometry" > <number>0</number>
<rect> </property>
<x>12</x> <property name="verticalSpacing" >
<y>61</y> <number>0</number>
<width>80</width> </property>
<height>21</height> <item row="0" column="0" >
</rect> <widget class="QGroupBox" name="groupBox_2" >
</property> <property name="sizePolicy" >
<property name="text" > <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> <horstretch>0</horstretch>
p, li { white-space: pre-wrap; } <verstretch>0</verstretch>
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;"> </sizepolicy>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">External Adress:&lt;/p>&lt;/body>&lt;/html></string> </property>
</property> <property name="title" >
</widget> <string>Network Configuration (takes effect after restart)</string>
<widget class="QLabel" name="label" > </property>
<property name="geometry" > <layout class="QHBoxLayout" >
<rect> <item>
<x>12</x> <layout class="QVBoxLayout" >
<y>21</y> <item>
<width>66</width> <widget class="QComboBox" name="netModeComboBox" >
<height>21</height> <item>
</rect> <property name="text" >
</property> <string>Automatic</string>
<property name="text" > </property>
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> </item>
p, li { white-space: pre-wrap; } <item>
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;"> <property name="text" >
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lokal Adress:&lt;/p>&lt;/body>&lt;/html></string> <string>Firewalled</string>
</property> </property>
</widget> </item>
<widget class="QWidget" name="layoutWidget" > <item>
<property name="geometry" > <property name="text" >
<rect> <string>Forwarded Port</string>
<x>98</x> </property>
<y>10</y> </item>
<width>271</width> </widget>
<height>81</height> </item>
</rect> <item>
</property> <layout class="QHBoxLayout" >
<layout class="QGridLayout" > <item>
<property name="margin" > <widget class="QComboBox" name="dhtComboBox" >
<item>
<property name="text" >
<string>DHT Enabled</string>
</property>
</item>
<item>
<property name="text" >
<string>DHT Disabled</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="discComboBox" >
<item>
<property name="text" >
<string>Discovery Enabled</string>
</property>
</item>
<item>
<property name="text" >
<string>Discovery Disabled</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QTabWidget" name="networktabWidget" >
<property name="currentIndex" >
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing" > <widget class="QWidget" name="tab" >
<number>6</number> <attribute name="title" >
<string>Network Configuration</string>
</attribute>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Network Configuration</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>Local Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>External Address</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLineEdit" name="localAddress" />
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QSpinBox" name="localPort" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLineEdit" name="extAddress" />
</item>
<item row="1" column="1" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QSpinBox" name="extPort" >
<property name="minimum" >
<number>0</number>
</property>
<property name="maximum" >
<number>65535</number>
</property>
<property name="value" >
<number>7812</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>381</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2" >
<attribute name="title" >
<string>Network Status</string>
</attribute>
<layout class="QGridLayout" >
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QRadioButton" name="radio_nonet" >
<property name="text" >
<string>No Conectivity</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netLimited" >
<property name="text" >
<string>Limited</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netUdp" >
<property name="text" >
<string>Udp</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radio_netServer" >
<property name="text" >
<string>Retroshare Server</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" >
<item>
<widget class="QCheckBox" name="check_udp" >
<property name="text" >
<string>UDP Connections</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_ext" >
<property name="text" >
<string>Stable External IP Addrress</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_dht" >
<property name="text" >
<string>DHT Okay</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_upnp" >
<property name="text" >
<string>UPnP Active</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_tcp" >
<property name="text" >
<string>TCP server</string>
</property>
<property name="checkable" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item row="2" column="0" >
<widget class="QGroupBox" name="groupBox_3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<item row="0" column="0" > <property name="title" >
<layout class="QGridLayout" > <string>Transfer Rates</string>
<property name="margin" > </property>
<number>0</number> <layout class="QHBoxLayout" >
</property> <item>
<property name="spacing" > <layout class="QHBoxLayout" >
<number>6</number> <property name="spacing" >
</property> <number>6</number>
<item row="0" column="0" > </property>
<widget class="QLineEdit" name="lineEdit" /> <property name="leftMargin" >
</item> <number>0</number>
<item row="0" column="1" > </property>
<widget class="QLabel" name="label_4" > <property name="topMargin" >
<property name="text" > <number>0</number>
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> </property>
p, li { white-space: pre-wrap; } <property name="rightMargin" >
&lt;/style>&lt;/head>&lt;body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;"> <number>0</number>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Port:&lt;/p>&lt;/body>&lt;/html></string> </property>
</property> <property name="bottomMargin" >
</widget> <number>0</number>
</item> </property>
<item row="0" column="2" > <item>
<widget class="QSpinBox" name="spinBox_2" > <widget class="QLabel" name="label_14" >
<property name="maximum" > <property name="text" >
<number>65535</number> <string>Total Rate (KB/s) </string>
</property> </property>
<property name="minimum" > </widget>
<number>1</number> </item>
</property> <item>
<property name="value" > <widget class="QSpinBox" name="totalRate" >
<number>7812</number> <property name="minimum" >
</property> <number>1</number>
</widget> </property>
</item> <property name="maximum" >
</layout> <number>12500</number>
</item> </property>
<item row="1" column="0" > <property name="value" >
<layout class="QGridLayout" > <number>1</number>
<property name="margin" > </property>
<number>0</number> </widget>
</property> </item>
<property name="spacing" > </layout>
<number>6</number> </item>
</property> <item>
<item row="0" column="2" > <layout class="QHBoxLayout" >
<widget class="QSpinBox" name="spinBox_3" > <property name="spacing" >
<property name="maximum" > <number>6</number>
<number>65535</number> </property>
</property> <property name="leftMargin" >
<property name="minimum" > <number>0</number>
<number>1</number> </property>
</property> <property name="topMargin" >
<property name="value" > <number>0</number>
<number>7812</number> </property>
</property> <property name="rightMargin" >
</widget> <number>0</number>
</item> </property>
<item row="0" column="1" > <property name="bottomMargin" >
<widget class="QLabel" name="label_3" > <number>0</number>
<property name="text" > </property>
<string>Port:</string> <item>
</property> <widget class="QLabel" name="label_12" >
</widget> <property name="text" >
</item> <string>Per Person </string>
<item row="0" column="0" > </property>
<widget class="QLineEdit" name="lineEdit_2" /> </widget>
</item> </item>
</layout> <item>
</item> <widget class="QSpinBox" name="indivRate" >
</layout> <property name="minimum" >
</widget> <number>1</number>
</widget> </property>
<widget class="QGroupBox" name="groupBox_2" > <property name="maximum" >
<property name="geometry" > <number>12500</number>
<rect> </property>
<x>10</x> <property name="value" >
<y>100</y> <number>1</number>
<width>381</width> </property>
<height>51</height> </widget>
</rect> </item>
</property> </layout>
<property name="title" > </item>
<string>Misc</string> <item>
</property> <spacer>
<widget class="QCheckBox" name="checkBox" > <property name="orientation" >
<property name="geometry" > <enum>Qt::Horizontal</enum>
<rect> </property>
<x>10</x> <property name="sizeHint" >
<y>20</y> <size>
<width>131</width> <width>40</width>
<height>18</height> <height>20</height>
</rect> </size>
</property> </property>
<property name="text" > </spacer>
<string>behinde Firewall</string> </item>
</property> </layout>
</widget> </widget>
<widget class="QCheckBox" name="checkBox_2" > </item>
<property name="geometry" > </layout>
<rect>
<x>130</x>
<y>20</y>
<width>151</width>
<height>18</height>
</rect>
</property>
<property name="text" >
<string>Forwarded External Port</string>
</property>
</widget>
</widget>
</widget> </widget>
<tabstops>
<tabstop>lineEdit</tabstop>
<tabstop>spinBox_2</tabstop>
<tabstop>lineEdit_2</tabstop>
<tabstop>spinBox_3</tabstop>
<tabstop>checkBox</tabstop>
<tabstop>checkBox_2</tabstop>
<tabstop>pushButton</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc" /> <include location="../images.qrc" />
</resources> </resources>

View file

@ -77,9 +77,13 @@ GSettingsWin::setNewPage(int page)
else if (page == Directories) else if (page == Directories)
text = tr("Directories"); text = tr("Directories");
else if (page == Server) else if (page == Server)
text = tr("Server"); text = tr("Server");
pageName->setText(tr("%1").arg(text)); pageName->setText(tr("%1").arg(text));
stackedWidget->setCurrentIndex(page); stackedWidget->setCurrentIndex(page);
listWidget->setCurrentRow(page); listWidget->setCurrentRow(page);
} }

View file

@ -16,26 +16,45 @@
<iconset/> <iconset/>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout" >
<property name="margin" > <property name="leftMargin" >
<number>9</number> <number>9</number>
</property> </property>
<property name="spacing" > <property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="1" > <item row="0" column="1" >
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item> <item>
<widget class="QLabel" name="pageName" > <widget class="QLabel" name="pageName" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy vsizetype="Maximum" hsizetype="Minimum" >
<hsizetype>1</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -67,12 +86,21 @@
</item> </item>
<item row="3" column="0" colspan="2" > <item row="3" column="0" colspan="2" >
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
@ -174,7 +202,7 @@
<property name="gridSize" > <property name="gridSize" >
<size> <size>
<width>100</width> <width>100</width>
<height>32</height> <height>16</height>
</size> </size>
</property> </property>
<property name="viewMode" > <property name="viewMode" >
@ -193,33 +221,21 @@
<property name="text" > <property name="text" >
<string>General</string> <string>General</string>
</property> </property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/misc.png</iconset>
</property>
</item> </item>
<item> <item>
<property name="text" > <property name="text" >
<string>Network</string> <string>Network</string>
</property> </property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/connect_24x24_shadow.png</iconset>
</property>
</item> </item>
<item> <item>
<property name="text" > <property name="text" >
<string>Server</string> <string>Server</string>
</property> </property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/webcache_24x24.png</iconset>
</property>
</item> </item>
<item> <item>
<property name="text" > <property name="text" >
<string>Directories</string> <string>Directories</string>
</property> </property>
<property name="icon" >
<iconset resource="../images.qrc" >:/images/directories_24x24.png</iconset>
</property>
</item> </item>
</widget> </widget>
</item> </item>