You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
2.8 KiB
111 lines
2.8 KiB
15 years ago
|
/*
|
||
12 years ago
|
This file is part of libtderesources.
|
||
15 years ago
|
|
||
|
Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
|
||
|
Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
|
||
|
Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation; either
|
||
|
version 2 of the License, or (at your option) any later version.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
#ifndef KRESOURCES_CONFIGPAGE_H
|
||
|
#define KRESOURCES_CONFIGPAGE_H
|
||
|
|
||
|
#include <ksharedptr.h>
|
||
15 years ago
|
#include <tqstringlist.h>
|
||
|
#include <tqwidget.h>
|
||
15 years ago
|
|
||
|
#include "manager.h"
|
||
|
|
||
|
class KComboBox;
|
||
|
class KListView;
|
||
|
|
||
15 years ago
|
class TQListViewItem;
|
||
|
class TQPushButton;
|
||
15 years ago
|
|
||
|
namespace KRES {
|
||
|
|
||
|
class KRESOURCES_EXPORT ResourcePageInfo : public KShared
|
||
|
{
|
||
|
public:
|
||
|
ResourcePageInfo();
|
||
|
~ResourcePageInfo();
|
||
|
Manager<Resource> *mManager;
|
||
12 years ago
|
TDEConfig *mConfig;
|
||
15 years ago
|
};
|
||
|
|
||
|
class Resource;
|
||
|
class ConfigViewItem;
|
||
|
|
||
15 years ago
|
class KRESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<Resource>
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
15 years ago
|
ConfigPage( TQWidget *parent = 0, const char *name = 0 );
|
||
15 years ago
|
virtual ~ConfigPage();
|
||
|
|
||
|
void load();
|
||
|
void save();
|
||
|
virtual void defaults();
|
||
|
|
||
|
public slots:
|
||
|
void slotFamilyChanged( int );
|
||
|
void slotAdd();
|
||
|
void slotRemove();
|
||
|
void slotEdit();
|
||
|
void slotStandard();
|
||
|
void slotSelectionChanged();
|
||
|
|
||
|
public:
|
||
|
// From ManagerObserver<Resource>
|
||
|
virtual void resourceAdded( Resource *resource );
|
||
|
virtual void resourceModified( Resource *resource );
|
||
|
virtual void resourceDeleted( Resource *resource );
|
||
|
|
||
|
protected:
|
||
14 years ago
|
ConfigViewItem *findItem( Resource *resource );
|
||
15 years ago
|
|
||
|
protected slots:
|
||
15 years ago
|
void slotItemClicked( TQListViewItem * );
|
||
15 years ago
|
|
||
|
signals:
|
||
|
void changed( bool );
|
||
|
|
||
|
private:
|
||
15 years ago
|
void loadManager( const TQString& family );
|
||
15 years ago
|
void saveResourceSettings();
|
||
|
|
||
|
Manager<Resource>* mCurrentManager;
|
||
12 years ago
|
TDEConfig* mCurrentConfig;
|
||
|
TDEConfig* mConfig;
|
||
15 years ago
|
TQString mFamily;
|
||
|
TQStringList mFamilyMap;
|
||
|
TQValueList<KSharedPtr<ResourcePageInfo> > mInfoMap;
|
||
15 years ago
|
|
||
|
KComboBox* mFamilyCombo;
|
||
|
KListView* mListView;
|
||
15 years ago
|
TQPushButton* mAddButton;
|
||
|
TQPushButton* mRemoveButton;
|
||
|
TQPushButton* mEditButton;
|
||
|
TQPushButton* mStandardButton;
|
||
15 years ago
|
|
||
15 years ago
|
TQListViewItem* mLastItem;
|
||
15 years ago
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|