Changeset 889

Show
Ignore:
Timestamp:
07/11/07 09:46:06 (1 year ago)
Author:
timdewhirst
Message:

jahwidgets
- minor whitespace changes

Location:
trunk/jahwidgets/src/qt3
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/jahwidgets/src/qt3/widgets/label.h

    r832 r889  
    3535        } 
    3636 
    37  protected: 
     37protected: 
    3838        void mouseReleaseEvent( QMouseEvent* e ) { 
    3939                emit clicked_changed(); 
  • trunk/jahwidgets/src/qt3/wrapper/internal_adapter.hpp

    r843 r889  
     1/* -*- tab-width: 4; indent-tabs-mode: t -*- */  
    12// jahwidgets - A widget library representation. 
    23 
     
    2627{ 
    2728public: 
    28     internal_adapter( QObject* owner, QObject* notifier, const char* qtprop, pcos::property pcosprop ) 
    29         : QObject( owner ), 
    30           m_owner( owner ), 
    31           m_notifier( notifier ? notifier : owner ), 
    32           m_qtPropertyName( qtprop ), 
    33           m_pcosProperty( pcosprop ) 
    34     {} 
     29        internal_adapter( QObject* owner, QObject* notifier, const char* qtprop, pcos::property pcosprop ) 
     30                : QObject( owner ), 
     31                  m_owner( owner ), 
     32                  m_notifier( notifier ? notifier : owner ), 
     33                  m_qtPropertyName( qtprop ), 
     34                  m_pcosProperty( pcosprop ) 
     35        {} 
    3536 
    36     virtual void onWidgetChanged() = 0; 
     37        virtual void onWidgetChanged() = 0; 
    3738 
    38     bool isQtPropertyWritable() 
    39     { 
    40                                 int propertyIndex = m_owner->metaObject()->findProperty( m_qtPropertyName, true ); 
    41                                 if ( propertyIndex == -1 ) 
    42                                 { 
    43                                                 qWarning( "failed to find property %s; ignoring", m_qtPropertyName.ascii() ); 
    44                                                 return false; 
    45                                 } 
     39        bool isQtPropertyWritable() 
     40        { 
     41                int propertyIndex = m_owner->metaObject()->findProperty( m_qtPropertyName, true ); 
     42                if ( propertyIndex == -1 ) 
     43                { 
     44                        qWarning( "failed to find property %s; ignoring", m_qtPropertyName.ascii() ); 
     45                        return false; 
     46                } 
     47                 
     48                bool isWritable = m_owner->metaObject()->property( propertyIndex, true )->writable(); 
     49                //      qDebug( "internal_adapter::isQtPropertyWritable: %s: %s",  
     50                //              m_qtPropertyName.ascii(),  
     51                //              isWritable ? "true" : "false" ); 
    4652 
    47                                 bool isWritable = m_owner->metaObject()->property( propertyIndex, true )->writable(); 
    48 //      qDebug( "internal_adapter::isQtPropertyWritable: %s: %s",  
    49 //              m_qtPropertyName.ascii(),  
    50 //              isWritable ? "true" : "false" ); 
     53                return isWritable; 
     54        } 
    5155 
    52                                 return isWritable; 
    53     } 
     56        bool doesSignalExist( const QString& p ) 
     57        { 
     58                return m_notifier->metaObject()->signalNames( true ).contains( p ); 
     59        } 
    5460 
    55     bool doesSignalExist( const QString& p ) 
    56     { 
    57                                 return m_notifier->metaObject()->signalNames( true ).contains( p ); 
    58     } 
    59  
    60                 QString signalSignatureForProp( const char* prop ) 
    61                 { 
    62                                 QStringList signal_list = QStringList::fromStrList( m_notifier->metaObject()->signalNames( true ) ); 
    63                                 QStringList matches = signal_list.grep( QRegExp( "^" + QString(prop) + ".*" ) ); 
    64                                 if ( !matches.empty() ) 
    65                                                 return matches[0]; 
    66                                 else 
    67                                                 return QString::null; 
    68                 } 
     61        QString signalSignatureForProp( const char* prop ) 
     62        { 
     63                QStringList signal_list = QStringList::fromStrList( m_notifier->metaObject()->signalNames( true ) ); 
     64                QStringList matches = signal_list.grep( QRegExp( "^" + QString(prop) + ".*" ) ); 
     65                if ( !matches.empty() ) 
     66                        return matches[0]; 
     67                else 
     68                        return QString::null; 
     69        } 
    6970 
    7071protected: 
    71     QObject* m_owner; 
    72     QObject* m_notifier; 
    73     QString m_qtPropertyName; 
    74     pcos::property m_pcosProperty; 
     72        QObject* m_owner; 
     73        QObject* m_notifier; 
     74        QString m_qtPropertyName; 
     75        pcos::property m_pcosProperty; 
    7576}; 
    7677