team4alfanous team mailing list archive
-
team4alfanous team
-
Mailing list archive
-
Message #00232
[Branch ~team4alfanous/alfanous/alfanous-git] Rev 418: Run the about dialog when the user click on "about interface" in main menu
------------------------------------------------------------
revno: 418
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Sun 2012-11-04 17:05:31 +0100
message:
Run the about dialog when the user click on "about interface" in main menu
modified:
src/alfanous-desktop/Gui.py
src/alfanous-desktop/UI/aboutDlg.ui
--
lp:alfanous
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git
Your team Alfanous team is subscribed to branch lp:alfanous.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous-desktop/Gui.py'
--- src/alfanous-desktop/Gui.py 2012-11-04 13:11:28 +0000
+++ src/alfanous-desktop/Gui.py 2012-11-04 16:05:31 +0000
@@ -29,7 +29,6 @@
TODO use QT Localization instead of gettext
TODO Use tree widget to show results
TODO printing
-TODO load Qt resources on realtime or at least compile them on realtime if missed
"""
## Importing modules
@@ -192,7 +191,7 @@
QtCore.QObject.connect( self.o_stat_from, QtCore.SIGNAL( "valueChanged(int)" ), self.stat_to_min )
QtCore.QObject.connect( self.m_exit, QtCore.SIGNAL( "clicked()" ), self.exit )
QtCore.QObject.connect( self.m_help, QtCore.SIGNAL( "clicked()" ), self.help )
- QtCore.QObject.connect( self.m_about, QtCore.SIGNAL( "clicked()" ), self.about )
+ QtCore.QObject.connect( self.m_about, QtCore.SIGNAL( "triggered(bool)" ), self.about )
QtCore.QObject.connect( self.a_save, QtCore.SIGNAL( "clicked()" ), self.save_results )
QtCore.QObject.connect( self.a_print, QtCore.SIGNAL( "clicked()" ), self.print_results )
@@ -214,6 +213,7 @@
"""
The main search function
"""
+
# add to history
self.history.insert( 0, self.o_query.currentText() )
self.o_query.clear()
@@ -617,11 +617,13 @@
painter.end()
- def about( self ):
- """ deprecated """
- html = """to replace with about dialog """
- self.o_results.setText( html )
-
+ def about( self , state ):
+ """ Show about-dialog """
+
+ AboutDialog = QtGui.QDialog()
+ dlg=Ui_aboutDlg()
+ dlg.setupUi(AboutDialog)
+ AboutDialog.exec_()
def help( self ):
@@ -641,6 +643,7 @@
MainWindow.show()
app.exec_()
+
ui.exit()
if __name__ == "__main__":
=== modified file 'src/alfanous-desktop/UI/aboutDlg.ui'
--- src/alfanous-desktop/UI/aboutDlg.ui 2012-11-04 15:06:14 +0000
+++ src/alfanous-desktop/UI/aboutDlg.ui 2012-11-04 16:05:31 +0000
@@ -26,7 +26,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">