Logo Search packages:      
Sourcecode: kde-guidance version File versions  Download package

def displayconfig::SizeOrientationPage::_buildGUI (   self  )  [private]

Assemble all GUI elements 

Definition at line 1268 of file displayconfig.py.

01268                        :
        """ Assemble all GUI elements """
        # Layout stuff.
        top_layout = QHBoxLayout(self,0,KDialog.spacingHint())
        self.top_layout = top_layout
        
        # -- Left column with orientation and dualhead box.
        vbox = QVBox(self)
        top_layout.addWidget(vbox,0)
        
        # -- Orientation group
        self.orientation_group_box = QVGroupBox(vbox)
        self.orientation_group_box.setTitle(i18n("Monitor Orientation"))
        self.orientation_group_box.setInsideSpacing(KDialog.spacingHint())
        self.orientation_group_box.setInsideMargin(KDialog.marginHint())
        self.orientation_radio_group = QButtonGroup()
        self.orientation_radio_group.setRadioButtonExclusive(True)
 
        self.normal_orientation_radio = QRadioButton(self.orientation_group_box)
        self.normal_orientation_radio.setText(i18n("Normal"))
        self.left_orientation_radio = QRadioButton(self.orientation_group_box)
        self.left_orientation_radio .setText(i18n("Left edge on top"))
        self.right_orientation_radio = QRadioButton(self.orientation_group_box)
        self.right_orientation_radio.setText(i18n("Right edge on top"))
        self.upside_orientation_radio = QRadioButton(self.orientation_group_box)
        self.upside_orientation_radio.setText(i18n("Upsidedown"))

        self.mirror_horizontal_checkbox = QCheckBox(self.orientation_group_box)
        self.mirror_horizontal_checkbox.setText(i18n("Mirror horizontally"))
        self.connect(self.mirror_horizontal_checkbox,SIGNAL("toggled(bool)"),self.slotMirrorHorizontallyToggled)
        
        self.mirror_vertical_checkbox = QCheckBox(self.orientation_group_box)
        self.mirror_vertical_checkbox.setText(i18n("Mirror vertically"))
        self.connect(self.mirror_vertical_checkbox,SIGNAL("toggled(bool)"),self.slotMirrorVerticallyToggled)
        
        self.orientation_radio_group.insert(self.normal_orientation_radio,0)
        self.orientation_radio_group.insert(self.left_orientation_radio,1)
        self.orientation_radio_group.insert(self.right_orientation_radio,2)
        self.orientation_radio_group.insert(self.upside_orientation_radio,3)
        self.connect(self.orientation_radio_group,SIGNAL("clicked(int)"),self.slotOrientationRadioClicked)

        # -- Dualhead Box.
        self.secondary_groupbox = QVGroupBox(vbox)
        self.secondary_groupbox.setCheckable(True)
        self.secondary_groupbox.setTitle(i18n("Second screen"))
        self.connect(self.secondary_groupbox,SIGNAL("toggled(bool)"),self.slotSecondMonitorToggled)
        
        self.secondary_radios = QVButtonGroup(None)  # Invisible
        self.connect(self.secondary_radios,SIGNAL("pressed(int)"),self.slotSecondMonitorRadioPressed)
        
        self.secondary_options = {}
        self.secondary_option_ids = {}
        
        # Clone radio
        self.secondary_clone_radio = QRadioButton(i18n("Clone primary screen"),self.secondary_groupbox)
        radio_id = self.secondary_radios.insert(self.secondary_clone_radio)
        self.secondary_options[radio_id] = self.xsetup.LAYOUT_CLONE
        self.secondary_option_ids[self.xsetup.LAYOUT_CLONE] = radio_id
        
        # Dual radio
        self.secondary_dual_radio = QRadioButton(i18n("Dual screen"),self.secondary_groupbox)
        radio_id = self.secondary_radios.insert(self.secondary_dual_radio)
        self.secondary_options[radio_id] = self.xsetup.LAYOUT_DUAL
        self.secondary_option_ids[self.xsetup.LAYOUT_DUAL] = radio_id
        
        self.secondary_radios.setButton(radio_id)

        hbox = QHBox(self.secondary_groupbox)
        spacer = QWidget(hbox)
        spacer.setFixedSize(20,1)
        hbox.setStretchFactor(spacer,0)
        
        self.secondary_position_combo = QComboBox(0,hbox,"")
        self.secondary_position_combo.insertItem(i18n("1 left of 2"))
        self.secondary_position_combo.insertItem(i18n("1 right of 2"))
        self.secondary_position_combo.insertItem(i18n("1 above 2"))
        self.secondary_position_combo.insertItem(i18n("1 below 2"))
        self.connect(self.secondary_position_combo,SIGNAL("activated(int)"),self.slotSecondaryPositionChange)

        spacer = QWidget(vbox)
        vbox.setStretchFactor(spacer,1)
        
        vbox = QVBox(self)
        top_layout.addWidget(vbox,1)
        
        if not self.compact_mode:
            # -- Right columns with preview, size and refresh widgets.
            
            # -- Preview Box.
            self.monitor_preview_stack = QWidgetStack(vbox)
            
            self.monitor_preview = MonitorPreview(self.monitor_preview_stack,self.imagedir)
            self.monitor_preview_stack.addWidget(self.monitor_preview)
            self.connect(self.monitor_preview,PYSIGNAL("focussed()"),self.slotMonitorFocussed)
            
            self.dual_monitor_preview = DualMonitorPreview(self.monitor_preview_stack, DUAL_PREVIEW_SIZE, self.imagedir)

            self.monitor_preview_stack.addWidget(self.dual_monitor_preview)
            self.connect(self.dual_monitor_preview,PYSIGNAL("pressed()"),self.slotMonitorFocussed)
            self.connect(self.dual_monitor_preview,PYSIGNAL("positionChanged()"),self.slotDualheadPreviewPositionChanged)
        
        # -- Size & Refresh Box.
        if not self.compact_mode:
            hbox = QHBox(vbox)
        else:
            hbox = QVBox(vbox)
        hbox.setSpacing(KDialog.spacingHint())
        
        self.resize_slider = ResizeSlider(hbox)
        self.connect(self.resize_slider,PYSIGNAL("resolutionChange(int)"),self.slotResolutionChange)

        hbox2 = QHBox(hbox)
        self.refresh_label = QLabel(hbox2,"RefreshLabel")
        self.refresh_label.setText(i18n("Refresh:"))
        
        self.size_refresh_combo = QComboBox(0,hbox2,"comboBox1") # gets filled in setRefreshRates()
        self.connect(self.size_refresh_combo,SIGNAL("activated(int)"),self.slotRefreshRateChange)
        if self.compact_mode:
            spacer = QWidget(hbox2)
            hbox2.setStretchFactor(spacer,1)
        
        spacer = QWidget(vbox)
        vbox.setStretchFactor(spacer,1)
        
        self.clearWState(Qt.WState_Polished)
        
    def setNotification(self,text):


Generated by  Doxygen 1.6.0   Back to index