blob: f5c32adee42c73d90d18cd99dd260f0cb1c0569d (
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
//-----------------------------------------------------------------------------
//
// KDE Display screen saver setup module
//
// Copyright (c) Martin R. Jones 1996
// Copyright (C) Chris Howells 2004
//
#ifndef __SCRNSAVE_H__
#define __SCRNSAVE_H__
#include <tqwidget.h>
#include <tdecmodule.h>
#include "kssmonitor.h"
#include "saverconfig.h"
#include "testwin.h"
#include "advanceddialog.h"
#include "kssmonitor.h"
#include "saverlist.h"
class TQTimer;
class TQSpinBox;
class TQSlider;
class TQCheckBox;
class TQLabel;
class TQListView;
class TQListViewItem;
class TQPushButton;
class KIntNumInput;
class TDEProcess;
//===========================================================================
class KScreenSaver : public TDECModule
{
TQ_OBJECT
public:
KScreenSaver(TQWidget *parent, const char *name, const TQStringList &);
~KScreenSaver();
virtual void load();
virtual void load(bool useDefaults);
virtual void save();
virtual void defaults();
void updateValues();
void readSettings(bool useDefaults);
protected slots:
void slotEnable( bool );
void slotScreenSaver( TQListViewItem* );
void slotSetup();
void slotAdvanced();
void slotTest();
void slotStopTest();
void slotTimeoutChanged( int );
void slotLockTimeoutChanged( int );
void slotLock( bool );
void slotDelaySaverStart( bool );
void slotUseTSAK( bool );
void slotUseUnmanagedLockWindows( bool );
void slotHideActiveWindowsFromSaver( bool );
void slotHideCancelButton( bool );
void processLockouts();
void slotSetupDone(TDEProcess*);
// when selecting a new screensaver, the old preview will
// be killed. -- This callback is responsible for restarting the
// new preview
void slotPreviewExited(TDEProcess *);
void findSavers();
protected:
void writeSettings();
void getSaverNames();
void setMonitor();
void setDefaults();
void resizeEvent( TQResizeEvent * );
void mousePressEvent(TQMouseEvent *);
void keyPressEvent(TQKeyEvent *);
protected:
TestWin *mTestWin;
TDEProcess *mTestProc;
TDEProcess *mSetupProc;
TDEProcess *mPreviewProc;
KSSMonitor *mMonitor;
TQPushButton *mSetupBt;
TQPushButton *mTestBt;
TQListView *mSaverListView;
TQSpinBox *mWaitEdit;
TQSpinBox *mWaitLockEdit;
TQCheckBox *mLockCheckBox;
TQCheckBox *mStarsCheckBox;
TQCheckBox *mEnabledCheckBox;
TQLabel *mMonitorLabel;
TQLabel *mActivateLbl;
TQLabel *mLockLbl;
TQStringList mSaverFileList;
SaverList mSaverList;
TQTimer *mLoadTimer;
TQGroupBox *mSaverGroup;
TQGroupBox *mSettingsGroup;
TQCheckBox *mDelaySaverStartCheckBox;
TQCheckBox *mUseTSAKCheckBox;
TQCheckBox *mUseUnmanagedLockWindowsCheckBox;
TQCheckBox *mHideActiveWindowsFromSaverCheckBox;
TQCheckBox *mHideCancelButtonCheckBox;
int mSelected;
int mPrevSelected;
int mNumLoaded;
bool mChanged;
bool mTesting;
// Settings
int mTimeout;
int mLockTimeout;
bool mLock;
bool mEnabled;
TQString mSaver;
bool mImmutable;
bool mDelaySaverStart;
bool mUseTSAK;
bool mUseUnmanagedLockWindows;
bool mHideActiveWindowsFromSaver;
bool mHideCancelButton;
KSimpleConfig* mTDMConfig;
};
#endif
|