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 @@ | |||
1 | #include <qapplication.h> | ||
2 | |||
1 | #include "liquid.h" | 3 | #include "liquid.h" |
@@ -8,2 +10,3 @@ LiquidInterface::LiquidInterface ( ) : ref ( 0 ) | |||
8 | { | 10 | { |
11 | m_widget = 0; | ||
9 | } | 12 | } |
@@ -14,3 +17,3 @@ LiquidInterface::~LiquidInterface ( ) | |||
14 | 17 | ||
15 | QStyle *LiquidInterface::create ( ) | 18 | QStyle *LiquidInterface::style ( ) |
16 | { | 19 | { |
@@ -19,60 +22,18 @@ QStyle *LiquidInterface::create ( ) | |||
19 | 22 | ||
20 | QString LiquidInterface::name ( ) | 23 | QString LiquidInterface::name ( ) const |
21 | { | ||
22 | return QObject::tr( "Liquid", "name" ); | ||
23 | } | ||
24 | |||
25 | QString LiquidInterface::description ( ) | ||
26 | { | ||
27 | return QObject::tr( "High Performance Liquid style by Mosfet", "description" ); | ||
28 | } | ||
29 | |||
30 | QCString LiquidInterface::key ( ) | ||
31 | { | 24 | { |
32 | return QCString ( "liquid" ); | 25 | return qApp-> translate ( "Styles", "Liquid" ); |
33 | } | 26 | } |
34 | 27 | ||
35 | unsigned int LiquidInterface::version ( ) | 28 | QString LiquidInterface::description ( ) const |
36 | { | 29 | { |
37 | return 100; // 1.0.0 (\d+.\d.\d) | 30 | return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" ); |
38 | } | 31 | } |
39 | 32 | ||
40 | QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 33 | bool LiquidInterface::hasSettings ( ) const |
41 | { | 34 | { |
42 | static LiquidSettingsInterface *setiface = 0; | 35 | return true; |
43 | |||
44 | *iface = 0; | ||
45 | |||
46 | if ( uuid == IID_QUnknown ) | ||
47 | *iface = this; | ||
48 | else if ( uuid == IID_Style ) | ||
49 | *iface = this; | ||
50 | else if ( uuid == IID_StyleSettings ) { | ||
51 | if ( !setiface ) | ||
52 | setiface = new LiquidSettingsInterface ( ); | ||
53 | *iface = setiface; | ||
54 | } | ||
55 | |||
56 | if ( *iface ) | ||
57 | (*iface)-> addRef ( ); | ||
58 | |||
59 | return QS_OK; | ||
60 | } | 36 | } |
61 | 37 | ||
62 | Q_EXPORT_INTERFACE() | 38 | QWidget *LiquidInterface::create ( QWidget *parent, const char *name ) |
63 | { | ||
64 | Q_CREATE_INSTANCE( LiquidInterface ) | ||
65 | } | ||
66 | |||
67 | |||
68 | LiquidSettingsInterface::LiquidSettingsInterface ( ) : ref ( 0 ) | ||
69 | { | ||
70 | m_widget = 0; | ||
71 | } | ||
72 | |||
73 | LiquidSettingsInterface::~LiquidSettingsInterface ( ) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name ) | ||
78 | { | 39 | { |
@@ -83,3 +44,3 @@ QWidget *LiquidSettingsInterface::create ( QWidget *parent, const char *name ) | |||
83 | 44 | ||
84 | bool LiquidSettingsInterface::accept ( ) | 45 | bool LiquidInterface::accept ( ) |
85 | { | 46 | { |
@@ -91,3 +52,3 @@ bool LiquidSettingsInterface::accept ( ) | |||
91 | 52 | ||
92 | void LiquidSettingsInterface::reject ( ) | 53 | void LiquidInterface::reject ( ) |
93 | { | 54 | { |
@@ -95,3 +56,4 @@ void LiquidSettingsInterface::reject ( ) | |||
95 | 56 | ||
96 | QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 57 | |
58 | QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | ||
97 | { | 59 | { |
@@ -99,6 +61,7 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt | |||
99 | 61 | ||
100 | |||
101 | if ( uuid == IID_QUnknown ) | 62 | if ( uuid == IID_QUnknown ) |
102 | *iface = this; | 63 | *iface = this; |
103 | else if ( uuid == IID_StyleSettings ) | 64 | else if ( uuid == IID_Style ) |
65 | *iface = this; | ||
66 | else if ( uuid == IID_StyleExtended ) | ||
104 | *iface = this; | 67 | *iface = this; |
@@ -111,2 +74,10 @@ QRESULT LiquidSettingsInterface::queryInterface ( const QUuid &uuid, QUnknownInt | |||
111 | 74 | ||
75 | Q_EXPORT_INTERFACE() | ||
76 | { | ||
77 | Q_CREATE_INSTANCE( LiquidInterface ) | ||
78 | } | ||
79 | |||
80 | |||
81 | |||
82 | |||
112 | // Hack for Retail Z experiments | 83 | // Hack for Retail Z experiments |