• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tderesources
 

tderesources

configpage.h

00001 /*
00002     This file is part of libtderesources.
00003 
00004     Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
00005     Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
00006     Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
00007 
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Library General Public
00010     License as published by the Free Software Foundation; either
00011     version 2 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Library General Public License for more details.
00017 
00018     You should have received a copy of the GNU Library General Public License
00019     along with this library; see the file COPYING.LIB.  If not, write to
00020     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021     Boston, MA 02110-1301, USA.
00022 */
00023 #ifndef TDERESOURCES_CONFIGPAGE_H
00024 #define TDERESOURCES_CONFIGPAGE_H
00025 
00026 #include <ksharedptr.h>
00027 #include <tqstringlist.h>
00028 #include <tqwidget.h>
00029 
00030 #include "manager.h"
00031 
00032 class KComboBox;
00033 class TDEListView;
00034 
00035 class TQListViewItem;
00036 class TQPushButton;
00037 
00038 namespace KRES {
00039 
00040 class TDERESOURCES_EXPORT ResourcePageInfo : public TDEShared
00041 {
00042   public:
00043     ResourcePageInfo();
00044     ~ResourcePageInfo();
00045     Manager<Resource> *mManager;
00046     TDEConfig *mConfig;
00047 };
00048 
00049 class Resource;
00050 class ConfigViewItem;
00051 
00052 class TDERESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<Resource>
00053 {
00054   Q_OBJECT
00055 
00056   public:
00057     ConfigPage( TQWidget *parent = 0, const char *name = 0 );
00058     virtual ~ConfigPage();
00059 
00060     void load();
00061     void save();
00062     virtual void defaults();
00063 
00064   public slots:
00065     void slotFamilyChanged( int );
00066     void slotAdd();
00067     void slotRemove();
00068     void slotEdit();
00069     void slotStandard();
00070     void slotSelectionChanged();
00071 
00072   public:
00073     // From ManagerObserver<Resource>
00074     virtual void resourceAdded( Resource *resource );
00075     virtual void resourceModified( Resource *resource );
00076     virtual void resourceDeleted( Resource *resource );
00077 
00078   protected:
00079     ConfigViewItem *findItem( Resource *resource );
00080 
00081   protected slots:
00082     void slotItemClicked( TQListViewItem * );
00083 
00084   signals:
00085     void changed( bool );
00086 
00087   private:
00088     void loadManager( const TQString& family );
00089     void saveResourceSettings();
00090 
00091     Manager<Resource>* mCurrentManager;
00092     TDEConfig* mCurrentConfig;
00093     TDEConfig* mConfig;
00094     TQString mFamily;
00095     TQStringList mFamilyMap;
00096     TQValueList<TDESharedPtr<ResourcePageInfo> > mInfoMap;
00097 
00098     KComboBox* mFamilyCombo;
00099     TDEListView* mListView;
00100     TQPushButton* mAddButton;
00101     TQPushButton* mRemoveButton;
00102     TQPushButton* mEditButton;
00103     TQPushButton* mStandardButton;
00104 
00105     TQListViewItem* mLastItem;
00106 };
00107 
00108 }
00109 
00110 #endif

tderesources

Skip menu "tderesources"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

tderesources

Skip menu "tderesources"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tderesources by doxygen 1.7.1
This website is maintained by Timothy Pearson.