SF.net SVN: fclient:[860] trunk/fclient/fclient/impl/MainWindow.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-08-02 11:35:50
|
Revision: 860
http://fclient.svn.sourceforge.net/fclient/?rev=860&view=rev
Author: jUrner
Date: 2008-08-02 11:35:59 +0000 (Sat, 02 Aug 2008)
Log Message:
-----------
add app icon
Modified Paths:
--------------
trunk/fclient/fclient/impl/MainWindow.py
Modified: trunk/fclient/fclient/impl/MainWindow.py
===================================================================
--- trunk/fclient/fclient/impl/MainWindow.py 2008-08-02 11:35:44 UTC (rev 859)
+++ trunk/fclient/fclient/impl/MainWindow.py 2008-08-02 11:35:59 UTC (rev 860)
@@ -76,7 +76,6 @@
return menu
-
class StatusBar(QtGui.QStatusBar):
def __init__(self, parent):
@@ -85,6 +84,19 @@
#config.ObjectRegistry.register(self)
parent.setStatusBar(self)
+class TitleBar(QtCore.QObject):
+
+ def __init__(self, parent):
+ QtCore.QObject.__init__(self, parent)
+ self.setInfo('')
+
+ def setInfo(self, text):
+ if text:
+ title = config.FcAppName + ' - [%s]' % text
+ else:
+ title = config.FcAppName
+ self.parent().setWindowTitle(title)
+
#**********************************************************************************
#
#**********************************************************************************
@@ -101,24 +113,32 @@
self.fcActions = Actions(self)
self.setMenuBar(MenuBar(self))
self.setStatusBar(StatusBar(self))
+ self.fcTitleBar = TitleBar(self)
+ self.setWindowIcon(config.fcResources.getIcon('fclient', 32, iconTheme='application', ext='.svg'))
self.restoreGeometry(self.fcSettings.value('Geometry'))
- ##################################################
+ ##################################
+ ## methods
+ ##################################
+ def titleBar(self):
+ return self.fcTitleBar
+
+
+ ##################################
## events
- ##################################################
+ ##################################
def closeEvent(self, event):
self.fcSettings.setValues(Geometry=self.saveGeometry())
-
-
+
def showEvent(self, event):
if self._isCreated:
return
self._isCreated = True
- ##################################################
+ ###################################
## event onrs
- ##################################################
+ ###################################
def onActPreferencesTriggered(self):
dlg = Prefs.PrefsDlg(self)
if dlg.exec_() == dlg.Accepted:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|