Example #1
0
 def add_buttons_to_layout(self, layout):
     """Add tool buttons to layout"""
      # Image orientation
     angle_label = QLabel(_("Angle (°):"))
     layout.addWidget(angle_label)
     self.angle_combo = QComboBox(self)
     self.angle_combo.addItems(self.ROTATION_ANGLES)
     self.angle_combo.setCurrentIndex(1)
     self.angle_combo.currentIndexChanged.connect(
                              lambda index: self.apply_transformation())
     layout.addWidget(self.angle_combo)
     layout.addSpacing(10)
     
     # Image flipping
     flip_label = QLabel(_("Flip:"))
     layout.addWidget(flip_label)
     hflip = create_toolbutton(self, text="", icon=get_icon("hflip.png"),
                       toggled=lambda state: self.apply_transformation(),
                       autoraise=False)
     self.hflip_btn = hflip
     layout.addWidget(hflip)
     vflip = create_toolbutton(self, text="", icon=get_icon("vflip.png"),
                       toggled=lambda state: self.apply_transformation(),
                       autoraise=False)
     self.vflip_btn = vflip
     layout.addWidget(vflip)
     layout.addSpacing(15)
     
     self.add_reset_button(layout)
Example #2
0
    def add_buttons_to_layout(self, layout):
        """Add tool buttons to layout"""
        # Image orientation
        angle_label = QLabel(_("Angle (°):"))
        layout.addWidget(angle_label)
        self.angle_combo = QComboBox(self)
        self.angle_combo.addItems(self.ROTATION_ANGLES)
        self.angle_combo.setCurrentIndex(1)
        self.angle_combo.currentIndexChanged.connect(
            lambda index: self.apply_transformation())
        layout.addWidget(self.angle_combo)
        layout.addSpacing(10)

        # Image flipping
        flip_label = QLabel(_("Flip:"))
        layout.addWidget(flip_label)
        hflip = create_toolbutton(
            self,
            text="",
            icon=get_icon("hflip.png"),
            toggled=lambda state: self.apply_transformation(),
            autoraise=False)
        self.hflip_btn = hflip
        layout.addWidget(hflip)
        vflip = create_toolbutton(
            self,
            text="",
            icon=get_icon("vflip.png"),
            toggled=lambda state: self.apply_transformation(),
            autoraise=False)
        self.vflip_btn = vflip
        layout.addWidget(vflip)
        layout.addSpacing(15)

        self.add_reset_button(layout)
Example #3
0
File: base.py Project: mindw/guiqwt
 def add_apply_button(self, layout):
     """Add the standard apply button"""
     apply_btn = create_toolbutton(self, text=_("Apply"),
                                   icon=get_icon("apply.png"),
                                   triggered=self.apply_transformation,
                                   autoraise=False)
     layout.addWidget(apply_btn)
     layout.addStretch()
Example #4
0
File: base.py Project: mindw/guiqwt
 def add_reset_button(self, layout):
     """Add the standard reset button"""
     edit_options_btn = create_toolbutton(self, text=_("Reset"),
                                          icon=get_icon("eraser.png"),
                                          triggered=self.reset,
                                          autoraise=False)
     layout.addWidget(edit_options_btn)
     layout.addStretch()