Diffstat (limited to 'noncore/styles/liquid/plugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/liquid/plugin.cpp | 81 |
1 files changed, 26 insertions, 55 deletions
diff --git a/noncore/styles/liquid/plugin.cpp b/noncore/styles/liquid/plugin.cpp index 5f4c8e5..0740420 100644 --- a/noncore/styles/liquid/plugin.cpp +++ b/noncore/styles/liquid/plugin.cpp @@ -1 +1,3 @@ +#include <qapplication.h> + #include "liquid.h" @@ -8,2 +10,3 @@ LiquidInterface::LiquidInterface ( ) : ref ( 0 ) { + m_widget = 0; } @@ -14,3 +17,3 @@ LiquidInterface::~LiquidInterface ( ) -QStyle *LiquidInterface::create ( ) +QStyle *LiquidInterface::style ( ) { @@ -19,60 +22,18 @@ QStyle *LiquidInterface::create ( ) -QString LiquidInterface::name ( ) -{ - return QObject::tr( "Liquid", "name" ); -} - -QString LiquidInterface::description ( ) -{ - return QObject::tr( "High Performance Liquid style by Mosfet", "description" ); -} - -QCString LiquidInterface::key ( ) +QString LiquidInterface::name ( ) const { - return QCString ( "liquid" ); + return qApp-> translate ( "Styles", "Liquid" ); } -unsigned int LiquidInterface::version ( ) +QString LiquidInterface::description ( ) const { - return 100; // 1.0.0 (\d+.\d.\d) + return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" ); } -QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) +bool LiquidInterface::hasSettings ( ) const { - static LiquidSettingsInterface *setiface = 0; - - *iface = 0; - - if ( uuid == IID_QUnknown ) - *iface = this; - else if ( uuid == IID_Style ) - *iface = this; - else if ( uuid == IID_StyleSettings ) { - if ( !setiface ) - setiface = new LiquidSettingsInterface ( ); - *iface = setiface; - } - - if ( *iface ) - (*iface)-> addRef ( ); - - return QS_OK; + return true; } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( LiquidInterface ) -} - - -LiquidSettingsInterface::LiquidSettingsInterface ( ) : ref ( 0 ) -{ - m_widget = 0; -} - -LiquidSettingsInterface::~LiquidSettingsInterface ( ) -{ -} - -QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name ) +QWidget *LiquidInterface::create ( QWidget *parent, const char *name ) { @@ -83,3 +44,3 @@ QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name ) -bool LiquidSettingsInterface::accept ( ) +bool LiquidInterface::accept ( ) { @@ -91,3 +52,3 @@ bool LiquidSettingsInterface::accept ( ) -void LiquidSettingsInterface::reject ( ) +void LiquidInterface::reject ( ) { @@ -95,3 +56,4 @@ void LiquidSettingsInterface::reject ( ) -QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) + +QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { @@ -99,6 +61,7 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt - if ( uuid == IID_QUnknown ) *iface = this; - else if ( uuid == IID_StyleSettings ) + else if ( uuid == IID_Style ) + *iface = this; + else if ( uuid == IID_StyleExtended ) *iface = this; @@ -111,2 +74,10 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt +Q_EXPORT_INTERFACE() +{ + Q_CREATE_INSTANCE( LiquidInterface ) +} + + + + // Hack for Retail Z experiments |