Exemplo n.º 1
0
 def __init__(self, parent=None):
     super(Merge, self).__init__(parent)
     self.repo = si.ActiveProject.Path
     ui_dir = os.path.join(os.path.dirname(__file__), "ui")
     self.ui = loadUi(os.path.join(ui_dir, "merge.ui"), self)
     self.setWindowIcon(parent.windowIcon())
     self.initUI()
Exemplo n.º 2
0
 def initUI(self):
     ui_dir = os.path.join(os.path.dirname(__file__), "ui")
     self.ui = loadUi(os.path.join(ui_dir, "remotes.ui"), self)
     for widget, icon_file in self.ICONS.iteritems():
         icon_file = os.path.join(ui_dir, "images", icon_file)
         getattr(self.ui, widget).setIcon(QtGui.QIcon(icon_file))
     self.reload_clicked()
Exemplo n.º 3
0
 def __init__(self, parent=None):
     super(Branches, self).__init__(parent)
     self.repo = si.ActiveProject.Path
     ui_dir = os.path.join(os.path.dirname(__file__), "ui")
     self.ui = loadUi(os.path.join(ui_dir, "branches.ui"), self)
     # set icons
     icons = {"remove_button": "iconmonstr-minus-icon-256.png"}
     for widget, icon_file in icons.iteritems():
         icon_file = os.path.join(ui_dir, "images", icon_file)
         getattr(self.ui, widget).setIcon(QtGui.QIcon(icon_file))
     # ui stuff
     self.initUI()
Exemplo n.º 4
0
 def initUI(self):
     ui_dir = os.path.join(os.path.dirname(__file__), "ui")
     self.ui = loadUi(os.path.join(ui_dir, "git.ui"), self)
     # set icons
     images_dir = os.path.join(ui_dir, "images")
     icon_file = os.path.join(images_dir, "git-icon.png")
     self.setWindowIcon(QtGui.QIcon(icon_file))
     for widget, icon_file in self.ICONS.iteritems():
         icon_file = os.path.join(images_dir, icon_file)
         getattr(self.ui, widget).setIcon(QtGui.QIcon(icon_file))
     if not bool(self.prefs.get("tracked")):
         self.prefs_clicked()
         return
     self.reload_clicked()
Exemplo n.º 5
0
 def __init__(self, parent=None):
     super(RigIconEditor, self).__init__(parent)
     uifile = os.path.join(os.path.dirname(__file__), "ui", "editor.ui")
     self.ui = loadUi(os.path.normpath(uifile), self)
     self.library_items = library.get_items()
     self.icons = list()
     self.multi = list()  # hold common multi selection values
     # func to set widget value by type
     self.set_type = {str: lambda widget, value: widget.setText(value),
                      bool: lambda widget, value: widget.setEnabled(value),
                      int: lambda widget, value: widget.setCurrentIndex(value),
                      float: lambda widget, value: widget.setValue(value),
                      list: lambda widget, value: self.set_color(value)}
     # fill gui values
     self.ui.shape_comboBox.clear()
     self.ui.shape_comboBox.addItem("Custom")
     for i in self.library_items:
         self.ui.shape_comboBox.addItem(i.get("Name"))
     # connect signals and load values using selection
     self._connect_signals()
     self.reload_clicked()
Exemplo n.º 6
0
 def __init__(self, parent=None):
     super(RigIconLibrary, self).__init__(parent)
     uifile = os.path.join(os.path.dirname(__file__), "ui", "library.ui")
     self.ui = loadUi(os.path.normpath(uifile), self)
     self.Reload_OnClicked()
Exemplo n.º 7
0
 def __init__(self, parent=None):
     super(RigIconLibrary, self).__init__(parent)
     uifile = os.path.join(os.path.dirname(__file__), "ui", "library.ui")
     self.ui = loadUi(os.path.normpath(uifile), self)
     self.Reload_OnClicked()