commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/forms/src/uidrivers/qt QTApp.py common.py ...


From: Jason Cater
Subject: gnue/forms/src/uidrivers/qt QTApp.py common.py ...
Date: Fri, 07 Mar 2003 00:14:29 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    03/03/07 00:14:28

Modified files:
        forms/src/uidrivers/qt: QTApp.py common.py 
        forms/src/uidrivers/qt/widgets: box.py button.py entry.py 

Log message:
        fixes for dropdown support

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/qt/QTApp.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/qt/common.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/qt/widgets/box.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/qt/widgets/button.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/src/uidrivers/qt/widgets/entry.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gnue/forms/src/uidrivers/qt/QTApp.py
diff -c gnue/forms/src/uidrivers/qt/QTApp.py:1.1 
gnue/forms/src/uidrivers/qt/QTApp.py:1.2
*** gnue/forms/src/uidrivers/qt/QTApp.py:1.1    Fri Feb 21 01:30:50 2003
--- gnue/forms/src/uidrivers/qt/QTApp.py        Fri Mar  7 00:14:27 2003
***************
*** 27,35 ****
  # NOTES:
  #
  
- from qt import *
  from gnue.common.apps import GDebug
  import sys
  
  __QtApp = None
  
--- 27,36 ----
  # NOTES:
  #
  
  from gnue.common.apps import GDebug
  import sys
+ 
+ from qt import *
  
  __QtApp = None
  
Index: gnue/forms/src/uidrivers/qt/common.py
diff -c gnue/forms/src/uidrivers/qt/common.py:1.3 
gnue/forms/src/uidrivers/qt/common.py:1.4
*** gnue/forms/src/uidrivers/qt/common.py:1.3   Tue Mar  4 23:12:02 2003
--- gnue/forms/src/uidrivers/qt/common.py       Fri Mar  7 00:14:27 2003
***************
*** 1,3 ****
--- 1,32 ----
+ #
+ # This file is part of GNU Enterprise.
+ #
+ # GNU Enterprise is free software; you can redistribute it
+ # and/or modify it under the terms of the GNU General Public
+ # License as published by the Free Software Foundation; either
+ # version 2, or (at your option) any later version.
+ #
+ # GNU Enterprise is distributed in the hope that it will be
+ # useful, but WITHOUT ANY WARRANTY; without even the implied
+ # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ # PURPOSE. See the GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public
+ # License along with program; see the file COPYING. If not,
+ # write to the Free Software Foundation, Inc., 59 Temple Place
+ # - Suite 330, Boston, MA 02111-1307, USA.
+ #
+ # Copyright 2000-2003 Free Software Foundation
+ #
+ # FILE:
+ # UIqt.py
+ #
+ # DESCRIPTION:
+ # A QT-based user interface driver for GNUe forms.
+ #
+ # NOTES:
+ #
+ 
  import string
  from qt import *
  from gnue.common import events
***************
*** 25,31 ****
  #FIX#    'cp1251': wxFONTENCODING_CP1251,
  #FIX#    'cp1252': wxFONTENCODING_CP1252
     '':''        
!     }
  
  disabledColour = 0 # wxLIGHT_GREY
  
--- 54,60 ----
  #FIX#    'cp1251': wxFONTENCODING_CP1251,
  #FIX#    'cp1252': wxFONTENCODING_CP1252
     '':''        
!     }   
  
  disabledColour = 0 # wxLIGHT_GREY
  
Index: gnue/forms/src/uidrivers/qt/widgets/box.py
diff -c gnue/forms/src/uidrivers/qt/widgets/box.py:1.1 
gnue/forms/src/uidrivers/qt/widgets/box.py:1.2
*** gnue/forms/src/uidrivers/qt/widgets/box.py:1.1      Fri Feb 21 01:30:50 2003
--- gnue/forms/src/uidrivers/qt/widgets/box.py  Fri Mar  7 00:14:28 2003
***************
*** 19,25 ****
  # Copyright 2000-2003 Free Software Foundation
  #
  # FILE:
! # UY=UIqt.py
  #
  # DESCRIPTION:
  # A QT-based user interface driver for GNUe forms.
--- 19,25 ----
  # Copyright 2000-2003 Free Software Foundation
  #
  # FILE:
! # UIqt.py
  #
  # DESCRIPTION:
  # A QT-based user interface driver for GNUe forms.
Index: gnue/forms/src/uidrivers/qt/widgets/button.py
diff -c gnue/forms/src/uidrivers/qt/widgets/button.py:1.3 
gnue/forms/src/uidrivers/qt/widgets/button.py:1.4
*** gnue/forms/src/uidrivers/qt/widgets/button.py:1.3   Sun Mar  2 13:46:31 2003
--- gnue/forms/src/uidrivers/qt/widgets/button.py       Fri Mar  7 00:14:28 2003
***************
*** 64,70 ****
      return newWidget
  
    def buttonHandler(self):
!     print "Button clicked"
  ##    if event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED:
  ##      action = None
  ##      object = _eventObjToQtWindow(event)
--- 64,72 ----
      return newWidget
  
    def buttonHandler(self):
!     print self._uiDriver._IdToGFObj
!     gfObject     = self._uiDriver._IdToGFObj[id(self)]
!     self._eventHandler('buttonActivated', gfObject)
  ##    if event.GetEventType() == wxEVT_COMMAND_BUTTON_CLICKED:
  ##      action = None
  ##      object = _eventObjToQtWindow(event)
Index: gnue/forms/src/uidrivers/qt/widgets/entry.py
diff -c gnue/forms/src/uidrivers/qt/widgets/entry.py:1.3 
gnue/forms/src/uidrivers/qt/widgets/entry.py:1.4
*** gnue/forms/src/uidrivers/qt/widgets/entry.py:1.3    Thu Mar  6 01:51:22 2003
--- gnue/forms/src/uidrivers/qt/widgets/entry.py        Fri Mar  7 00:14:28 2003
***************
*** 50,60 ****
        else:
          choices = [""]
  
!       newWidget = QComboBox(event.container)
        
        if event.initialize:
!         for choice in choices: 
!           newWidget.insertItem(choice)
          newWidget._origAllowedValues = object._field._allowedValues
          newWidget.setEditable(1)
          newWidget.setCurrentItem(0)
--- 50,60 ----
        else:
          choices = [""]
  
!       newWidget = _ComboBox(event.container)
!       newWidget.setInsertionPolicy(QComboBox.NoInsertion)
        
        if event.initialize:
!         newWidget.setChoices(choices)
          newWidget._origAllowedValues = object._field._allowedValues
          newWidget.setEditable(1)
          newWidget.setCurrentItem(0)
***************
*** 102,107 ****
--- 102,119 ----
      return newWidget
  
  
+ class _ComboBox (QComboBox): 
+ 
+   def setChoices(self,choices): 
+     self.__choices = choices
+     for choice in choices: 
+       self.insertItem(choice)
+     
+   def setText(self, text): 
+     self.setCurrentItem(self.__choices.index(text))
+     
+     
+     
  configuration = {
      'baseClass'  : UIEntry,
      'provides'   : 'GFEntry',




reply via email to

[Prev in Thread] Current Thread [Next in Thread]