X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fscreens%2Fmainscreen.py;fp=sface%2Fscreens%2Fmainscreen.py;h=910fd73322a5a443ddbfd668646a5568c9aabb5c;hp=9bb94ccd5d7011df5b0d4449d7b4d97472f25dd6;hb=4813cee39486920b72900197aae6b14204892af2;hpb=66adcf0e47106c3809e8b29c91edb2cc32b36081 diff --git a/sface/screens/mainscreen.py b/sface/screens/mainscreen.py index 9bb94cc..910fd73 100644 --- a/sface/screens/mainscreen.py +++ b/sface/screens/mainscreen.py @@ -359,6 +359,7 @@ class SliceWidget(QWidget): bottomlayout.addWidget(renew, 0, Qt.AlignLeft) bottomlayout.addStretch() bottomlayout.addWidget(submit, 0, Qt.AlignRight) + self.bottomlayout = bottomlayout layout = QVBoxLayout() layout.addLayout(toplayout) @@ -754,3 +755,11 @@ class MainScreen(SfaScreen): # rspec. QTimer.singleShot(2500, self.sliceWidget.refresh) + def addMainScreenButton(self, caption, action): + # allows another screen to add a button to mainscreen + button = QPushButton(caption, self) + self.sliceWidget.bottomlayout.insertWidget(2, button) + self.sliceWidget.connect(button, SIGNAL('clicked()'), action) + return button + +