blob: 3c0e3c1be49039bffe7e69e43b2e7c00d7836685 (
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
|
/***************************************************************************
previewoptions.cpp - description
-------------------
begin : Fri Aug 4 2000
copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
(C) 2002, 2004 Andras Mantia <amantia@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. *
* *
***************************************************************************/
#include "previewoptions.h"
#include "previewoptions.moc"
// qt includes
#include <tqradiobutton.h>
#include <tqcheckbox.h>
// kde includes
#include <klocale.h>
#include <kmessagebox.h>
PreviewOptions::PreviewOptions(TQWidget *tqparent, const char *name)
: PreviewOptionsS(tqparent,name)
{
}
PreviewOptions::~PreviewOptions(){
}
void PreviewOptions::setWindowLayout(const TQString& tqlayout )
{
if ( tqlayout == "Default") resetLayout->setChecked(true);
else resetLayout->setChecked(false);
}
void PreviewOptions::setPosition(const TQString& position )
{
radioEditor->setChecked(true);
if ( position == "Toolview" ) radioToolview->setChecked(true);
}
TQString PreviewOptions::position()
{
TQString position = "Editor";
if ( radioToolview->isChecked() )
position = "Toolview";
return position;
}
void PreviewOptions::setDocPosition(const TQString &position)
{
radioNewDocTab->setChecked(true);
if (position == "Toolview") radioSeparateDocView->setChecked(true);
}
TQString PreviewOptions::docPosition()
{
TQString position = "Tab";
if (radioSeparateDocView->isChecked()) position = "Toolview";
return position;
}
TQString PreviewOptions::tqlayout()
{
TQString tqlayout = "Custom";
if ( resetLayout->isChecked() )
tqlayout = "Default";
return tqlayout;
}
TQString PreviewOptions::closeButtons()
{
TQString closeButtonState = "ShowAlways";
if (radioDelayedCloseButtons->isChecked())
closeButtonState = "ShowDelayed";
if (radioNoCloseButtons->isChecked())
closeButtonState = "Disabled";
return closeButtonState;
}
void PreviewOptions::setCloseButtons(const TQString &state)
{
if (state == "ShowAlways") radioShowCloseButtons->setChecked(true);
if (state == "ShowDelayed") radioDelayedCloseButtons->setChecked(true);
if (state == "Disabled") radioNoCloseButtons->setChecked(true);
}
void PreviewOptions::setToolviewTabs(uint state)
{
radioIcon->setChecked(true);
if (state == 3) radioIconText->setChecked(true);
if (state == 1) radioText->setChecked(true);
m_toolviewTabs = state;
}
uint PreviewOptions::toolviewTabs()
{
uint state = 0;
if (radioIconText->isChecked()) state = 3;
if (radioText->isChecked()) state = 1;
return state;
}
void PreviewOptions::setHiddenFiles(bool show)
{
showHidden->setChecked(show);
}
bool PreviewOptions::hiddenFiles()
{
return showHidden->isChecked();
}
void PreviewOptions::setSaveTrees(bool show)
{
saveLocalTrees->setChecked(show);
}
bool PreviewOptions::saveTrees()
{
return saveLocalTrees->isChecked();
}
|