00001 #include <qapplication.h> 00002 00003 #include "liquid.h" 00004 #include "liquidset.h" 00005 #include "plugin.h" 00006 00007 00008 00009 LiquidInterface::LiquidInterface ( ) 00010 { 00011 m_widget = 0; 00012 } 00013 00014 LiquidInterface::~LiquidInterface ( ) 00015 { 00016 } 00017 00018 QStyle *LiquidInterface::style ( ) 00019 { 00020 return new LiquidStyle ( ); 00021 } 00022 00023 QString LiquidInterface::name ( ) const 00024 { 00025 return qApp-> translate ( "Styles", "Liquid" ); 00026 } 00027 00028 QString LiquidInterface::description ( ) const 00029 { 00030 return qApp-> translate ( "Styles", "High Performance Liquid style by Mosfet" ); 00031 } 00032 00033 bool LiquidInterface::hasSettings ( ) const 00034 { 00035 return true; 00036 } 00037 00038 QWidget *LiquidInterface::create ( QWidget *parent, const char *name ) 00039 { 00040 m_widget = new LiquidSettings ( parent, name ? name : "LIQUID-SETTINGS" ); 00041 00042 return m_widget; 00043 } 00044 00045 bool LiquidInterface::accept ( ) 00046 { 00047 if ( !m_widget ) 00048 return false; 00049 00050 return m_widget-> writeConfig ( ); 00051 } 00052 00053 void LiquidInterface::reject ( ) 00054 { 00055 } 00056 00057 00058 QRESULT LiquidInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 00059 { 00060 *iface = 0; 00061 00062 if ( uuid == IID_QUnknown ) 00063 *iface = this; 00064 else if ( uuid == IID_Style ) 00065 *iface = this; 00066 else if ( uuid == IID_StyleExtended ) 00067 *iface = this; 00068 else 00069 return QS_FALSE; 00070 00071 if ( *iface ) 00072 (*iface)-> addRef ( ); 00073 00074 return QS_OK; 00075 } 00076 00077 Q_EXPORT_INTERFACE() 00078 { 00079 Q_CREATE_INSTANCE( LiquidInterface ) 00080 } 00081
1.4.2