Commits

Rodrigo Pinheiro Matias  committed 119a5f7

diversas melhorias na interface.

  • Participants
  • Parent commits 5e9f26a
  • Tags 0.3.3

Comments (0)

Files changed (6)

File QSupervisorControl/__init__.py

 app_dir = os.path.dirname(os.path.abspath(__file__))
 data_dir = os.path.join(app_dir, 'data')
 
-VERSION = '0.3.2'
+VERSION = '0.3.3'
 DEBUG = False
-DEBUG = True
+# DEBUG = True
 
 __version__ = VERSION
 

File QSupervisorControl/data/about.ui

     </rect>
    </property>
    <property name="frameShape">
-    <enum>QFrame::StyledPanel</enum>
+    <enum>QFrame::NoFrame</enum>
    </property>
    <property name="frameShadow">
     <enum>QFrame::Raised</enum>
    </property>
-   <layout class="QHBoxLayout" name="horizontalLayout"/>
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <property name="margin">
+     <number>0</number>
+    </property>
+    <item>
+     <widget class="QLabel" name="lblImage">
+      <property name="text">
+       <string/>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignCenter</set>
+      </property>
+     </widget>
+    </item>
+   </layout>
   </widget>
   <widget class="QLabel" name="lblQSC">
    <property name="geometry">

File QSupervisorControl/data/olho-animal-tigre.jpg

Added
New image

File QSupervisorControl/db.py

 
     return sqlalchemy.create_engine(
         'sqlite:///%s' % os.path.join(os.environ.get('HOME'), 'qsc.dat'),
-        echo=True
+        echo=False
     )
 
 

File QSupervisorControl/ui/about.py

 # -*- coding: utf-8 -*-
 from QSupervisorControl.ui.layout.about import Ui_Form
-from PyQt4.QtGui import QDialog
+from PyQt4.QtGui import QDialog, QPixmap
 
+import os
+
+ui_dir = os.path.dirname(os.path.abspath(__file__))
+app_dir = os.path.dirname(ui_dir)
+data_dir = os.path.join(app_dir, 'data')
 
 class AboutDialog(QDialog):
 
         self._ui = Ui_Form()
         self._ui.setupUi(self)
 
+        self._ui.lblImage.setPixmap(
+            QPixmap(
+                os.path.join(
+                    data_dir,
+                    'olho-animal-tigre.jpg'
+                )
+            )
+        )
+
         self._connect()
 
     def _connect(self):

File QSupervisorControl/ui/layout/about.py

 
 # Form implementation generated from reading ui file 'QSupervisorControl/data/about.ui'
 #
-# Created: Sat Feb  2 01:07:54 2013
-#      by: PyQt4 UI code generator 4.9.3
+# Created: Thu Feb  7 14:28:02 2013
+#      by: PyQt4 UI code generator 4.9.6
 #
 # WARNING! All changes made in this file will be lost!
 
 try:
     _fromUtf8 = QtCore.QString.fromUtf8
 except AttributeError:
-    _fromUtf8 = lambda s: s
+    def _fromUtf8(s):
+        return s
+
+try:
+    _encoding = QtGui.QApplication.UnicodeUTF8
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig, _encoding)
+except AttributeError:
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig)
 
 class Ui_Form(object):
     def setupUi(self, Form):
         Form.setMaximumSize(QtCore.QSize(400, 415))
         self.frame = QtGui.QFrame(Form)
         self.frame.setGeometry(QtCore.QRect(10, 10, 381, 231))
-        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
+        self.frame.setFrameShape(QtGui.QFrame.NoFrame)
         self.frame.setFrameShadow(QtGui.QFrame.Raised)
         self.frame.setObjectName(_fromUtf8("frame"))
         self.horizontalLayout = QtGui.QHBoxLayout(self.frame)
+        self.horizontalLayout.setMargin(0)
         self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
+        self.lblImage = QtGui.QLabel(self.frame)
+        self.lblImage.setText(_fromUtf8(""))
+        self.lblImage.setAlignment(QtCore.Qt.AlignCenter)
+        self.lblImage.setObjectName(_fromUtf8("lblImage"))
+        self.horizontalLayout.addWidget(self.lblImage)
         self.lblQSC = QtGui.QLabel(Form)
         self.lblQSC.setGeometry(QtCore.QRect(10, 250, 381, 51))
         self.lblQSC.setLineWidth(0)
         QtCore.QMetaObject.connectSlotsByName(Form)
 
     def retranslateUi(self, Form):
-        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Sobre o QSupervisorControl", None, QtGui.QApplication.UnicodeUTF8))
-        self.lblQSC.setText(QtGui.QApplication.translate("Form", "<html><head/><body><p>QSupervisorControl é um software licenciado sobre <br/>Licença da Apache 2.0, mais informações podem ser obtidas no <a href=\"https://bitbucket.org/rodrigopmatias/qsupervisorcontrol\">https://bitbucket.org/rodrigopmatias/qsupervisorcontrol</a></p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
-        self.lblSC.setText(QtGui.QApplication.translate("Form", "<html><head/><body><p>O Supervisor é um software de terceiro e esta licenciado sobre uma licença BSD-derived, mais informações podem ser obtidas em <a href=\"http://supervisord.org\">http://supervisord.org/</a> </p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
-        self.bntOk.setText(QtGui.QApplication.translate("Form", "OK", None, QtGui.QApplication.UnicodeUTF8))
+        Form.setWindowTitle(_translate("Form", "Sobre o QSupervisorControl", None))
+        self.lblQSC.setText(_translate("Form", "<html><head/><body><p>QSupervisorControl é um software licenciado sobre <br/>Licença da Apache 2.0, mais informações podem ser obtidas no <a href=\"https://bitbucket.org/rodrigopmatias/qsupervisorcontrol\">https://bitbucket.org/rodrigopmatias/qsupervisorcontrol</a></p></body></html>", None))
+        self.lblSC.setText(_translate("Form", "<html><head/><body><p>O Supervisor é um software de terceiro e esta licenciado sobre uma licença BSD-derived, mais informações podem ser obtidas em <a href=\"http://supervisord.org\">http://supervisord.org/</a> </p></body></html>", None))
+        self.bntOk.setText(_translate("Form", "OK", None))