Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

decolistitem.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003 
00004                              Copyright (c)  2002 Robert Griebl <sandman@handhelds.org>
00005               =.
00006             .=l.
00007            .>+-=
00008  _;:,     .>    :=|.         This program is free software; you can
00009 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00010 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00011 .="- .-=="i,     .._         License as published by the Free Software
00012  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00013      ._= =}       :          or (at your option) any later version.
00014     .%`+i>       _;_.
00015     .i_,=:_.      -<s.       This program is distributed in the hope that
00016      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00017     : ..    .:,     . . .    without even the implied warranty of
00018     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00019   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00020 ..}^=.=       =       ;      Library General Public License for more
00021 ++=   -.     .`     .:       details.
00022 :     =  ...= . :.=-
00023  -.   .:....=;==+<;          You should have received a copy of the GNU
00024   -_. . .   )=.  =           Library General Public License along with
00025     --        :-=`           this library; see the file COPYING.LIB.
00026                              If not, write to the Free Software Foundation,
00027                              Inc., 59 Temple Place - Suite 330,
00028                              Boston, MA 02111-1307, USA.
00029 */
00030 
00031 #ifndef DECOLISTITEM_H
00032 #define DECOLISTITEM_H
00033 
00034 #include <qpe/windowdecorationinterface.h>
00035 #include <qlistbox.h>
00036 
00037 class DecoListItem : public QListBoxPixmap {
00038 public:
00039         DecoListItem ( const QString &t ) : QListBoxPixmap ( QPixmap ( ), t ) 
00040         { 
00041                 m_lib = 0;
00042                 m_window_if = 0;
00043 //              m_settings_if = 0;
00044         }
00045 
00046         DecoListItem ( QLibrary *lib, WindowDecorationInterface *iface ) : QListBoxPixmap ( iface-> icon ( ), iface-> name ( ))
00047         {
00048                 m_lib = lib;
00049                 m_window_if = iface;
00050                 
00051 //              iface-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &m_settings_if );         
00052         }
00053         
00054         virtual ~DecoListItem ( )
00055         {
00056 //              if ( m_settings_if )
00057 //                      m_settings_if-> release ( );
00058                 if ( m_window_if )
00059                         m_window_if-> release ( );
00060                 delete m_lib;
00061         }
00062         
00063         bool hasSettings ( ) const
00064         {
00065 //              return ( m_settings_if );
00066                 return false;
00067         }
00068 
00069         QWidget *settings ( QWidget * /*parent*/ )
00070         {
00071 //              return m_settings_if ? m_settings_if-> create ( parent ) : 0;
00072                 return 0;
00073         }
00074         
00075         bool setSettings ( bool /*accepted*/ ) 
00076         {
00077 //              if ( !m_settings_if )
00078 //                      return false;
00079         
00080 //              if ( accepted )
00081 //                      return m_settings_if-> accept ( );
00082 //              else {
00083 //                      m_settings_if-> reject ( );
00084 //                      return false;
00085 //              }
00086                 return false;
00087         }
00088 
00089         QString key ( )
00090         {
00091                 if ( m_lib )
00092                         return QFileInfo ( m_lib-> library ( )). fileName ( );
00093                 else
00094                         return text ( );
00095         }
00096         
00097         WindowDecorationInterface *interface ( )
00098         {
00099                 return m_window_if;
00100         }
00101 
00102 private:
00103         QLibrary *m_lib;
00104         WindowDecorationInterface *m_window_if;
00105 //      WindowDecorationSettingsInterface *m_settings_if;
00106 
00107 };
00108 
00109 #endif
00110 

Generated on Sat Nov 5 16:17:46 2005 for OPIE by  doxygen 1.4.2