summaryrefslogtreecommitdiffstats
path: root/kcontrol/konsole/schemaeditor.h
blob: 612c43b99cbb2bacb0b9c5adebe618535c5c9daa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/***************************************************************************
                          schemaeditor.h  -  description
                             -------------------
    begin                : mar apr 17 16:44:59 CEST 2001
    copyright            : (C) 2001 by Andrea Rizzi
    email                : rizzi@kde.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef SCHEMAEDITOR_H
#define SCHEMAEDITOR_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <kapplication.h>
#include <tqwidget.h>
class TQPixmap;
class KSharedPixmap;

#include "schemadialog.h"

/** SchemaEditor is the base class of the porject */
class SchemaEditor : public SchemaDialog
{
  Q_OBJECT 
  public:
    /** constructor */
    SchemaEditor(TQWidget* parent=0, const char *name=0);
    /** destructor */
    ~SchemaEditor();

    TQString schema();
    void setSchema(TQString);
    bool isModified() const { return schMod; }
    void querySave();

  signals:
  	void changed();
	void schemaListChanged(const TQStringList &titles, const TQStringList &filenames);

  public slots:
  	void slotColorChanged(int);
  	void imageSelect();  	
	void slotTypeChanged(int);
	void readSchema(int);
	void saveCurrent();
	void removeCurrent();
	void previewLoaded(bool l);		
	void getList();
  private slots:
	void show();
	void schemaModified();
	void loadAllSchema(TQString currentFile="");
	void updatePreview();
  private:
	bool schMod;
  	TQMemArray<TQColor> color;
	TQMemArray<int> type; // 0= custom, 1= sysfg, 2=sysbg, 3=rcolor
	TQMemArray<bool> transparent;
	TQMemArray<bool> bold;
	TQPixmap pix;
	KSharedPixmap *spix;
	TQString defaultSchema;	
	bool loaded;
	bool schemaLoaded;
	bool change;
	int oldSchema;
	int oldSlot;
	TQString readSchemaTitle(const TQString& filename);
	void schemaListChanged();

};

#endif