summaryrefslogtreecommitdiffstats
path: root/bin/commander/application.py
blob: 2032bb3475581c5b7c7553055ab2581867498c13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
# -*- coding: iso8859-15 -*-

from commander.mainwindow import MainWindow
from qt import qApp, QTimer, QApplication, SIGNAL, SLOT

class CommanderApplication( QApplication ):
    
    def __init__( self, argv ):
        QApplication.__init__( self, argv )

    def initialize( self ):
        self.mw = MainWindow()
        self.mw.show()
        self.setMainWidget( self.mw )
    
        QTimer.singleShot( 0, self.mw.buildRescanPackages )

    def run( self ):
        self.connect( self, SIGNAL( "lastWindowClosed()" ), self, SLOT( "quit()" ) )
        print "--> exec_loop()"
        self.exec_loop()
        print "<-- exec_loop()"
        
#------------------------------------------------------------------------#
# main
#------------------------------------------------------------------------#

if __name__ == "__main__":
    import sys
    from qt import *
    app = CommanderApplication( sys.argv )
    app.exec_loop()