summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjprefs.h
blob: e5181963e7aad2b9baf26410c738a950ed12f0d5 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
#ifndef KJPREFS_H
#define KJPREFS_H

//#include "kjprefswidget.h"
#include "kjskinselectorwidget.h"
#include "kjguisettingswidget.h"

// system includes
#include <tqwidget.h>
#include <noatun/pref.h>

#include <tdeio/job.h>
#include <kurlrequester.h>

class TQVBoxLayout; 
class TQHBoxLayout; 
class TQGridLayout; 
class TQComboBox;
class TQLabel;
class TQPushButton;
class TQTabWidget;
class TDEConfig;
class KJLoader;

class KJPrefs : public CModule
{
Q_OBJECT
  
public:
	KJPrefs(TQObject* parent);

	// Save which Skin is currently selected
	virtual void save();

	// Rebuild the Skinlist
	virtual void reopen();

	TQString skin( void ) const;

	int minimumPitch( void ) const;
	int maximumPitch( void ) const;

	int visTimerValue ( void ) const;

	int titleMovingUpdates ( void ) const;
	float titleMovingDistance ( void ) const;

	int visType ( void ) const;
	void setVisType ( int vis );

	bool useSysFont( void ) const;
	void setUseSysFont( bool );

	TQFont sysFont(void) const;
	void setSysFont(TQFont&);

	TQColor sysFontColor(void) const;
	void sysFontColor(TQColor &);

	bool displayTooltips( void ) const;
	bool displaySplash( void ) const;

public slots:
	// Installs a skin defined by the URL in mSkinRequester
	void installNewSkin( void );

	// Delete the currently selected Skin (does not work for systemwide skins!)
	void removeSelectedSkin ( void );

	// Show a preview of "skin" in mPixmap
	void showPreview(const TQString &skin);

	// gets called after a KIO-action has finished
	// KIO is used for installing/removing skins
	void slotResult(TDEIO::Job *job);

signals:
	void configChanged();

private:
	TQPixmap mPixmap; // preview Pixmap
	TDEConfig *cfg;

	// Dialog-Widgets
	TQTabWidget *mTabWidget;
	KJSkinselector *mSkinselectorWidget;
	KJGuiSettings *mGuiSettingsWidget;
};

/**
 * resolve a filename to its correct case.
 * badNodes is the amount of directories/files (at the end)
 * that aren't known)
 **/
TQString filenameNoCase(const TQString &filename, int badNodes=1);

#endif // KJPREFS_H