[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/uirtk
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2004-09-12 21:28:50
Message-ID: 20040912212850.D59942322 () office ! kde ! org
[Download RAW message or body]

CVS commit by kainhofe: 

Fix the top-level widget problem (wrong class name was used), a good suggestion from \
tronical to obtain the connection list for a widget


  M +21 -1     TODO   1.3
  M +1 -1      uiextractor.cpp   1.7


--- kdenonbeta/uirtk/TODO  #1.2:1.3
@@ -7,5 +7,24 @@
      column/row headers, etc.
   -) Connections between the widgets should be automatically generated. Is there
-     any way to get a list of all connections of a QObject?
+     any way to get a list of all connections of a QObject? 
+                 Tronical has a nice solution for this (AKA dirty hack :-) ):
+        [22:39] <danimo> reinhold: tronical has an interesting suggestion
+        [22:39] <danimo> [22:36] <tronical> danimo: 
+                                   class GetMeTheConnections : public QObject { 
+                                         public:
+                                                 static const QConnectionList \
*connectionsForSignal(QObject *sender, const char *signal) { +                        \
return static_cast<GetMeTheConnections \
*>(sender)->connectionsForSignalInternal(signal);  +                                  \
}  +                                         private: 
+                                           const QConnectionList \
*connectionsForSignalInternal(const char *signal) {  +                                \
return receivers(signal);  +                                                 } 
+                                         }; (untested)
+        [22:39] <danimo> [22:37] <tronical> danimo: then 
+                                   const QConnectionList *conns = \
GetMeTheConnections::connectionsForSignal(bleh, foobar); +        [22:40] <tronical> \
(of course using a better class name ;-) +        [22:40] <tronical> (meaning please \
choose another one if you use this hack :) +                 
+                 
   -) Lots of properties are extracted although they are not actually needed. 
      What's the best way to find out if a property is really manually set?
@@ -15,4 +34,5 @@
   -) QIconSet of QToolButtons not written!
   -) Pixmaps are not supported yet.
+        -) SizePolicy (if set manually) always seems to be extracted as Fixed \
instead of the correct value.  
   

--- kdenonbeta/uirtk/uiextractor.cpp  #1.6:1.7
@@ -212,4 +212,5 @@ QString ExtractUI::retrieveUI( QWidget *
                         // we're no longer the top-level widget!
                         depth++;
+                        classType = QString::null;
                         
                         postText += "</vbox>\n</widget>\n";
@@ -674,5 +675,4 @@ QString ExtractUI::adjustClassName( cons
                 }
         }
-   
         return cn;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic