[PC-BSD Commits] r2594 - pcbsd/trunk/XGUISource
svn at pcbsd.org
svn at pcbsd.org
Thu Aug 14 08:12:22 PDT 2008
Author: kris
Date: 2008-08-14 08:12:22 -0700 (Thu, 14 Aug 2008)
New Revision: 2594
Modified:
pcbsd/trunk/XGUISource/xgui.cpp
pcbsd/trunk/XGUISource/xgui.h
pcbsd/trunk/XGUISource/xgui.ui
Log:
Updated the XGUI tool to allow selecting a different resolution for a 2nd monitor
Modified: pcbsd/trunk/XGUISource/xgui.cpp
===================================================================
--- pcbsd/trunk/XGUISource/xgui.cpp 2008-08-14 14:56:13 UTC (rev 2593)
+++ pcbsd/trunk/XGUISource/xgui.cpp 2008-08-14 15:12:22 UTC (rev 2594)
@@ -38,6 +38,11 @@
// Check for an unprobed monitor
checkUnprobedMonitor();
+ // Connect our Dual-head checkbox / slot
+ connect(checkDualHead, SIGNAL( clicked() ), this, SLOT( dualChangedSlot() ) );
+
+ // Check out dualChangedSlot to ensure we disable the box by default
+ dualChangedSlot();
}
void XGUI::loadDeviceInformation()
@@ -106,9 +111,11 @@
while ( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
comboResolution->insertItem(line);
+ comboDualRes->insertItem(line);
if (line == "1024x768" )
{
comboResolution->setCurrentItem(i);
+ comboDualRes->setCurrentItem(i);
}
i++;
}
@@ -245,6 +252,7 @@
if ( checkDualHead->isChecked() )
{
stream << "DUALHEAD=\"YES\" ; export DUALHEAD\n";
+ stream << "DUALRES=\"" + comboDualRes->currentText() + "\"; export DUALRES\n";
}
file.close();
}
@@ -269,3 +277,13 @@
}
}
+
+void XGUI::dualChangedSlot()
+{
+ if ( checkDualHead->isChecked() )
+ {
+ groupDualHead->setEnabled(TRUE);
+ } else {
+ groupDualHead->setEnabled(FALSE);
+ }
+}
Modified: pcbsd/trunk/XGUISource/xgui.h
===================================================================
--- pcbsd/trunk/XGUISource/xgui.h 2008-08-14 14:56:13 UTC (rev 2593)
+++ pcbsd/trunk/XGUISource/xgui.h 2008-08-14 15:12:22 UTC (rev 2594)
@@ -24,6 +24,7 @@
void closeSlot();
void applySlot();
void monitorChangedSlot();
+ void dualChangedSlot();
private:
void loadDeviceInformation();
Modified: pcbsd/trunk/XGUISource/xgui.ui
===================================================================
--- pcbsd/trunk/XGUISource/xgui.ui 2008-08-14 14:56:13 UTC (rev 2593)
+++ pcbsd/trunk/XGUISource/xgui.ui 2008-08-14 15:12:22 UTC (rev 2594)
@@ -132,6 +132,107 @@
</property>
</spacer>
</item>
+ <item row="2" column="3" >
+ <spacer name="spacer12" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>327</width>
+ <height>17</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0" colspan="4" >
+ <widget class="Line" name="line1" >
+ <property name="frameShape" >
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="4" >
+ <spacer name="spacer5_2" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>530</width>
+ <height>6</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="5" column="0" colspan="4" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <spacer name="spacer1" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>311</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushApply" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Apply</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushClose" >
+ <property name="text" >
+ <string>Skip</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="spacer4" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
<item row="1" column="3" >
<widget class="QTabWidget" name="tabWidget2" >
<property name="sizePolicy" >
@@ -141,7 +242,7 @@
</sizepolicy>
</property>
<property name="currentIndex" >
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab" >
<attribute name="title" >
@@ -394,7 +495,7 @@
<attribute name="title" >
<string>Advanced</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout" >
+ <layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QCheckBox" name="checkMonitorSync" >
<property name="text" >
@@ -529,137 +630,47 @@
</widget>
</item>
<item row="3" column="0" >
+ <widget class="QGroupBox" name="groupDualHead" >
+ <property name="title" >
+ <string/>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Monitor Resolution:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="comboDualRes" />
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="4" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
- <string>Warning: Dual-Head support is designed for systems with one video card and two identical monitors. Other setups may be achived by manually editing /etc/X11/xorg.conf</string>
+ <string>Dual-Head support is designed for systems with one video card and two monitors. Other setups may be achived by editing /etc/X11/xorg.conf</string>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
- <item row="4" column="0" >
- <spacer name="spacer9" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>100</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</widget>
</item>
- <item row="2" column="3" >
- <spacer name="spacer12" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>327</width>
- <height>17</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0" colspan="4" >
- <widget class="Line" name="line1" >
- <property name="frameShape" >
- <enum>QFrame::HLine</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Sunken</enum>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="4" >
- <spacer name="spacer5_2" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>530</width>
- <height>6</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="5" column="0" colspan="4" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <item>
- <spacer name="spacer1" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>311</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushApply" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>Apply</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="pushClose" >
- <property name="text" >
- <string>Skip</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="spacer4" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
</layout>
+ <zorder>pixmapLabel1</zorder>
+ <zorder>line2</zorder>
+ <zorder>line1</zorder>
+ <zorder>tabWidget2</zorder>
</widget>
</widget>
<layoutdefault spacing="6" margin="11" />
More information about the Commits
mailing list