Changeset 9088:a3d02c4c389a in orange


Ignore:
Timestamp:
10/09/11 15:29:24 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
25a27e9f782f3f945fa12201edda842119afe681
Message:

Added rotate button (in zoom-select toolbar) to 3d widgets

Location:
orange/OrangeWidgets
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Visualize Qt/OWLinProjQt.py

    r9045 r9088  
    166166        if "3d" in name_lower: 
    167167            toolbar_buttons = [ 
    168                 gui.Select, 
     168                gui.StateButtonsBegin, 
     169                    (gui.UserButton, 'Rotate', 'state', ROTATING, None, 'Dlg_undo'), 
     170                    gui.Select, 
     171                gui.StateButtonsEnd, 
    169172                gui.Spacing, 
    170173                gui.SendSelection, 
  • orange/OrangeWidgets/Visualize Qt/OWScatterPlot3D.py

    r8975 r9088  
    1111from plot.owtheme import ScatterLightTheme, ScatterDarkTheme 
    1212from plot import OWPoint 
    13 from plot.primitives import normalize, normal_from_points 
    1413 
    1514import orange 
     
    648647 
    649648        gui = self.plot.gui 
    650         self.zoom_select_toolbar = gui.zoom_select_toolbar(self.main_tab, buttons=gui.default_zoom_select_buttons) 
     649        buttons = gui.default_zoom_select_buttons 
     650        buttons.insert(2, (gui.UserButton, 'Rotate', 'state', ROTATING, None, 'Dlg_undo')) 
     651        self.zoom_select_toolbar = gui.zoom_select_toolbar(self.main_tab, buttons=buttons) 
    651652        self.connect(self.zoom_select_toolbar.buttons[gui.SendSelection], SIGNAL("clicked()"), self.send_selection) 
    652653        self.connect(self.zoom_select_toolbar.buttons[gui.Zoom], SIGNAL("clicked()"), self.plot.unselect_all_points) 
  • orange/OrangeWidgets/plot/owconstants.py

    r8883 r9088  
    3737SELECTION_TOGGLE = 2 
    3838SELECTION_REPLACE = 3 
     39 
     40# Used in 3D widgets 
     41ROTATING = 5 
  • orange/OrangeWidgets/plot/owplot3d.py

    r9085 r9088  
    2727from owlegend import OWLegend, OWLegendItem, OWLegendTitle, OWLegendGradient 
    2828from owopenglrenderer import OWOpenGLRenderer 
    29 from owconstants import ZOOMING, PANNING 
     29from owconstants import ZOOMING, PANNING, ROTATING 
    3030 
    3131from OWColorPalette import ColorPaletteGenerator 
     
    10681068            elif self.state == PANNING: 
    10691069                self._state = PlotState.PANNING 
    1070             elif QApplication.keyboardModifiers() & Qt.ShiftModifier: 
     1070            elif self.state == ROTATING or QApplication.keyboardModifiers() & Qt.ShiftModifier: 
    10711071                self._state = PlotState.ROTATING 
    10721072            else: 
Note: See TracChangeset for help on using the changeset viewer.