def __init__(self, app, parent, view, name): KMainWindow.__init__(self, parent, name) self.app = app self.conn = app.conn self.view = view(self.app, self) self.setCentralWidget(self.view) self.show()
def __init__(self, parent): KMainWindow.__init__(self, parent, 'Uncover Truth Frontend') self.app = get_application_pointer() self.splitView = QSplitter(self, 'splitView') self.listView = KListView(self.splitView, 'guests_view') self.textView = InfoPart(self.splitView) self.initlistView() self.connect(self.listView, SIGNAL('selectionChanged()'), self.selectionChanged) self.connect(self.textView, PYSIGNAL('GuestInfoUpdated'), self.refreshDisplay) self.setCentralWidget(self.splitView) collection = self.actionCollection() self.quitAction = KStdAction.quit(self.close, collection) self.newGuestAction = KStdAction.openNew(self.slotNewGuest, collection) self.selectAllAction = KStdAction.selectAll(self.slotSelectAll, collection) mainmenu = KPopupMenu(self) self.newGuestAction.plug(mainmenu) self.selectAllAction.plug(mainmenu) self.quitAction.plug(mainmenu) menubar = self.menuBar() menubar.insertItem('&Main', mainmenu) toolbar = self.toolBar() self.newGuestAction.plug(toolbar) self.quitAction.plug(toolbar) self.new_guest_dialog = None # resize window self.resize(400, 500) self.splitView.setSizes([75, 325])
def __init__(self, app, parent, recselector, name): KMainWindow.__init__(self, parent, name) self.app = app self.conn = app.conn self.mainView = recselector(self.app, self) self.setCentralWidget(self.mainView) self.show()
def __init__(self, app, parent, suite): KMainWindow.__init__(self, parent, 'PackageSelector') self.app = app self.conn = app.conn self.mainView = PackageSelector(self.app, self, suite) self.mainView.recView.doc.set_suite(suite) self.setCentralWidget(self.mainView) self.show()
def __init__(self, app, parent, suite): KMainWindow.__init__(self, parent) self.mainView = TemplateEditor(self.app, self, suite) self.setCentralWidget(self.mainView) self.initActions() self.initMenus() self.initToolbar() self.show()
def __init__(self, app, parent): KMainWindow.__init__(self, parent) dbwidget(self, app) self.manager = InstallerManager(self.conn) self.mainView = KPushButton('hello there', self) self.setCentralWidget(self.mainView) self.setCaption('Installer Management') self.show()
def __init__(self, app, parent, dtype): KMainWindow.__init__(self, parent) #self.app = app dbwidget(self, app) self.mainView = BaseDifferWidget(self.app, self, dtype) self.initActions() self.initMenus() self.initToolbar() self.setCentralWidget(self.mainView) self.show()
def __init__(self, app, parent): KMainWindow.__init__(self, parent) self.app = app self.icons = KIconLoader() self.initActions() self.initMenus() self.initToolbar() self.conn = app.conn self.cfg = app.cfg self.cursor = StatementCursor(self.conn) self.mainView = None self.resize(400, 300) self.show()
def __init__(self, app, parent, ticketid): KMainWindow.__init__(self, parent, 'TicketAssigner') self.resize(400, 300) self.listBox = KActionSelector(self) self.listBox.setShowUpDownButtons(False) self.setMainWidget(self.listBox) self.app = app self.db = app.db self.manager = TicketManager(self.app) self.ticketid = ticketid self.initlistView() self.show() self.connect(self, SIGNAL('okClicked()'), self.update_clients)
def __init__(self, app, *args): KMainWindow.__init__(self, *args) self.app = app self.icons = KIconLoader() if self.app.pgpool is not None: self.systray = KSystemTray(self) self.systray.setPixmap(self.icons.loadIcon('connect_no', 1)) self.systray.show() self.initActions() self.initMenus() self.initToolbar() self.db = app.db self.cfg = app.cfg
def __init__(self, app, parent, etype): KMainWindow.__init__(self, parent) #self.app = app dbwidget(self, app) self.mainView = EnvironmentList(self.app, self, etype) self.initActions() self.initMenus() self.initToolbar() self.setCentralWidget(self.mainView) self.mainView.refreshlistView() self.resize(600, 500) self.show()
def __init__(self, app, parent, view, name): KMainWindow.__init__(self, parent, name) self.app = app self.conn = app.conn self.mainView = QSplitter(self, 'mainView') self.listView = KListView(self.mainView) self.listView.setRootIsDecorated(True) self.view = view(self.app, self.mainView) self.setCentralWidget(self.mainView) if hasattr(self, 'initlistView'): self.initlistView() self.connect(self.listView, SIGNAL('selectionChanged()'), self.selectionChanged) self.show()
def __init__(self, parent): KMainWindow.__init__(self, parent, 'PyKDE Dosbox Frontend') # setup app pointer self.app = get_application_pointer() self._init_common() self.setAcceptDrops(True) # place a splitter in the window self.splitView = QSplitter(self, 'splitView') # place a listview in the splitter (on the left) self.listView = KListView(self.splitView, 'games_view') # fill listview self.initlistView() # try to resize splitter # this is a kind of ugly hack, but seems to work ok x, y = self.myconfig.get_xy('mainwindow', 'mainwindow_size') self.splitView.setSizes([int(.1*x), int(.9*x)]) # setup signals self.connect(self.listView, SIGNAL('selectionChanged()'), self.selectionChanged) # place text browser in splitter #self.textView = InfoBrowser(self.splitView) # i may eventually use the KHTMLPart instead # of the KTextBrowser if self.app.myconfig.getboolean('mainwindow', 'use_khtml_part'): self.textView = InfoPart(self.splitView) else: self.textView = InfoBrowser(self.splitView) self.connect(self.textView, PYSIGNAL('GameInfoSet'), self.selectGame) self.statusbar = KStatusBar(self) self._set_current_profile(self.app.dosbox.current_profile) # set main widget self.setCentralWidget(self.splitView) # setup dialog pointers # it would be nice if I knew a better way to get # information from dialogs self.new_game_dir_dialog = None self.add_new_game_dlg = None self.set_profile_dlg = None # here we add some methods to the dcop object self.app.dcop.addMethod('void selectGame (QString)', self.selectGame) self.app.dcop.addMethod('void launchSelectedGame()', self.slotLaunchDosbox)
def __init__(self, app, *args): KMainWindow.__init__(self, *args) self.app = app self.icons = KIconLoader() self.initActions() self.initMenus() self.initToolbar() self.conn = app.conn self.cfg = app.cfg self.cursor = StatementCursor(self.conn) self.listView = KListView(self) self.listView.setRootIsDecorated(True) self.listView.addColumn('widget') self.setCentralWidget(self.listView) self.refreshListView() self.connect(self.listView, SIGNAL('selectionChanged()'), self.selectionChanged)
def __init__(self, app, parent): KMainWindow.__init__(self, parent, 'AdminWidget') self.app = app self.db = app.db self.manager = AdminDb(self.app) self.mainView = QSplitter(self, 'main view') self.listView = KListView(self.mainView) self.groupView = KListView(self.mainView) self.setCentralWidget(self.mainView) self.initActions() self.initMenus() self.initToolbar() self.initlistView() self.connect(self.listView, SIGNAL('selectionChanged()'), self.selectionChanged) self.dialogs = {} self.show()
def __init__(self, app, *args): KMainWindow.__init__(self, *args) self.app = app self.icons = KIconLoader() self._environ_types = ['default', 'current'] self._differ_types = ['trait', 'family'] self.conn = app.conn self.cfg = app.cfg self.cursor = StatementCursor(self.conn) self._suites = [x.suite for x in self.cursor.select(table='suites')] self.initActions() self.initMenus() self.initToolbar() self.listView = KListView(self) self.listView.setRootIsDecorated(True) self.listView.addColumn('widget') self.setCentralWidget(self.listView) self.refreshListView() self.setCaption('Main Menu') self.connect(self.listView, SIGNAL('selectionChanged()'), self.selectionChanged)
def setSource(self, url): action, context, id = str(url).split('.') id = int(id) print action, context, id if context == 'trouble': if action == 'show': print 'showing ticket %d' % id win = KMainWindow(self) v = TroubleActionView(self.app, win, id) v.setID(id) v.resize(700, 900) win.setCentralWidget(v) win.setCaption('TroubleView') win.resize(700, 900) win.show() elif action == 'assign': print 'need to assign ticket' TicketAssigner(self.app, self, id)
def __init__(self, app, parent, profile): KMainWindow.__init__(self, parent, 'TraitAssigner') self.page = QFrame(self) self.vbox = QVBoxLayout(self.page, 5, 7) self.listBox = KActionSelector(self.page) self.listBox.setShowUpDownButtons(True) self.setCentralWidget(self.page) self.vbox.addWidget(self.listBox) hbox = QHBoxLayout(self.page, 5, 7) self.vbox.addLayout(hbox) self.ok_button = KPushButton('ok', self.page) self.cancel_button = KPushButton('cancel', self.page) hbox.addWidget(self.ok_button) hbox.addWidget(self.cancel_button) self.app = app self.db = app.db self.profile = Profile(app.conn) self.profile.set_profile(profile) self.suite = self.profile.current.suite self.traits = StatementCursor(app.conn) self.traits.set_table('%s_traits' % self.suite) self.initlistView() self.show()
import sys from kdecore import KAboutData, KApplication, KCmdLineArgs, KConfigSkeleton from kdeui import KConfigDialog, KMainWindow KCmdLineArgs.init(sys.argv, KAboutData("test", "test", "1.0")) app = KApplication() mainWin = KMainWindow(None, "test") app.setMainWidget(mainWin) cfg = KConfigSkeleton("test") dlg = KConfigDialog(mainWin, "settings", cfg) mainWin.show() app.exec_loop()
def __init__(self, parent, name='MainWindow'): KMainWindow.__init__(self, parent, name) self.initActions() self.initMenus() if hasattr(self, 'initToolbar'): self.initToolbar()
def __init__(self, parent, app): KMainWindow.__init__(self, parent, 'AdminWidget')
#!/usr/bin/env python import sys from kdeui import KMainWindow, KApplication class KMainWindow(KMainWindow): def __init__(self): KTMainWindow.__init__(self) app = KApplication(sys.argv, "KDraw - Python") window = KMainWindow() window.show() app.exec_loop()
def __init__(self, parent, name='BaseMainWindow'): KMainWindow.__init__(self, parent, name) HasDialogs.__init__(self) self.app = get_application_pointer()
def __init__(self, parent, name='BaseMainWindow'): KMainWindow.__init__(self, parent, name) self.app = get_application_pointer() self.myconfig = self.app.myconfig
def __init__(self, parent, name='MainWindow'): #KMainWindow.__init__(self, parent, name, Qt.WType_Dialog) KMainWindow.__init__(self, parent, name)
set_main_frame(self) DOM.init() for m in pygwt_processMetas(): minst = module_load(m) minst.onModuleLoad() class MainSplitter(QSplitter): def __init__(self, parent, name='MainSplitter'): QSplitter.__init__(self, parent, name) #self.browser = TestTextBrowser(self) self.kpart = TestTextPart(self) if __name__ == '__main__': appname = 'textbrowser_image' version = '-1' about = KAboutData(appname, appname, version) KCmdLineArgs.init(sys.argv, about) app = KApplication() win = KMainWindow() split = MainSplitter(win) win.setCentralWidget(split) win.show() app.setMainWidget(win) app.exec_loop()