summaryrefslogtreecommitdiff
path: root/noncore/styles/metal/plugin.cpp
authorsandman <sandman>2002-07-06 16:42:29 (UTC)
committer sandman <sandman>2002-07-06 16:42:29 (UTC)
commit3a422983abc7342c9229dccac825d0608fca10f3 (patch) (side-by-side diff)
treefd0d71eab4df0b286b78efe24184525ae4c819a3 /noncore/styles/metal/plugin.cpp
parent8beb5fcdbca8110dc586a7e620bf8eae892087fb (diff)
downloadopie-3a422983abc7342c9229dccac825d0608fca10f3.zip
opie-3a422983abc7342c9229dccac825d0608fca10f3.tar.gz
opie-3a422983abc7342c9229dccac825d0608fca10f3.tar.bz2
Complete renovation of the external style API:
- created two QCom interfaces in "styleinterface.h" - moved the liquid/theme settings apps into the plugins - modified the plugin interface for all three styles - extended appearance to fully support the new API (replaces the settings apps) Additional work: - made a workaround in appearance for a Qt Bug -- now a QDialog again (this should really be fixed in Qt, but Z won't work that way)
Diffstat (limited to 'noncore/styles/metal/plugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/styles/metal/plugin.cpp52
1 files changed, 40 insertions, 12 deletions
diff --git a/noncore/styles/metal/plugin.cpp b/noncore/styles/metal/plugin.cpp
index e5bee10..1db4aac 100644
--- a/noncore/styles/metal/plugin.cpp
+++ b/noncore/styles/metal/plugin.cpp
@@ -1,29 +1,57 @@
#include "metal.h"
+#include "plugin.h"
-extern "C" {
- QStyle* allocate ( );
- int minor_version ( );
- int major_version ( );
- const char *description ( );
+MetalInterface::MetalInterface ( ) : ref ( 0 )
+{
}
-QStyle* allocate ( )
+MetalInterface::~MetalInterface ( )
+{
+}
+
+QStyle *MetalInterface::create ( )
{
return new MetalStyle ( );
}
-int minor_version ( )
+QString MetalInterface::name ( )
{
- return 0;
+ return QObject::tr( "Metal", "name" );
}
-int major_version ( )
+QString MetalInterface::description ( )
{
- return 1;
+ return QObject::tr( "Metal style", "description" );
}
-const char *description ( )
+QCString MetalInterface::key ( )
{
- return "Metal style plugin";
+ return QCString ( "metal" );
}
+
+unsigned int MetalInterface::version ( )
+{
+ return 100; // 1.0.0 (\d+.\d.\d)
+}
+
+QRESULT MetalInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
+{
+ *iface = 0;
+
+ if ( uuid == IID_QUnknown )
+ *iface = this;
+ else if ( uuid == IID_Style )
+ *iface = this;
+
+ if ( *iface )
+ (*iface)-> addRef ( );
+
+ return QS_OK;
+}
+
+Q_EXPORT_INTERFACE()
+{
+ Q_CREATE_INSTANCE( MetalInterface )
+}
+