4 from ost
import LogError
5 from ost
import gui, gfx
11 QWidget.__init__(self)
12 self.
_line = QLineEdit(self)
13 self.
_load = QToolButton(self)
14 self._load.setAttribute(Qt.WA_MacSmallSize)
15 QObject.connect(self.
_line, SIGNAL(
'returnPressed()'),
17 QObject.connect(self.
_load, SIGNAL(
'clicked()'),
19 hbox = QHBoxLayout(self)
20 hbox.addWidget(self.
_line,1)
21 hbox.addWidget(self.
_load,0)
26 self._load.setMenu(self.
_menu)
29 self.setFixedHeight(self._load.height())
30 self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
32 def _RemoteMenu(self):
34 action_group = QActionGroup(menu)
35 for k,v
in REMOTE_REPOSITORIES.iteritems():
36 action = menu.addAction(v.name)
37 action.setCheckable(
True)
39 action.setChecked(
True)
40 action.setData(QVariant(k))
41 action_group.addAction(action)
42 QObject.connect(menu, SIGNAL(
'triggered(QAction*)'),
45 def _UpdateLoadButton(self, current):
46 name = REMOTE_REPOSITORIES[current].name
47 self._load.setText(
'load from %s ' % name)
49 def _ToggleRepo(self, action):
56 for p
in str(self._line.text()).split(
','):
59 split_ids.append(k.strip())
60 self._line.setText(
'')
61 for split_id
in split_ids:
74 remote_loader_for_panel=
gui.Widget(remote_loader)
75 remote_loader_for_panel.qobject.setSizePolicy(QSizePolicy.Expanding,
77 panels=gui.GostyApp.Instance().perspective.panels
78 panels.AddWidgetToPool(
"Remote Loader",remote_loader_for_panel)
main class for organization and root for the graphical display
graphical rendering of mol::EntityHandle entites