3
/****************************************************************************
4
** Form implementation generated from reading ui file './display_settings.ui'
6
** Created: Mi Okt 5 12:02:41 2005
7
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $)
9
** WARNING! All changes made in this file will be lost!
10
****************************************************************************/
12
#include "display_settings.h"
15
#include <qpushbutton.h>
17
#include <knuminput.h>
18
#include <qcheckbox.h>
19
#include <qbuttongroup.h>
20
#include <qradiobutton.h>
21
#include <klineedit.h>
24
#include <qwhatsthis.h>
27
* Constructs a DisplaySettings as a child of 'parent', with the
28
* name 'name' and widget flags set to 'f'.
30
DisplaySettings::DisplaySettings( QWidget* parent, const char* name, WFlags fl )
31
: QWidget( parent, name, fl )
34
setName( "DisplaySettings" );
35
DisplaySettingsLayout = new QVBoxLayout( this, 11, 6, "DisplaySettingsLayout");
37
layout1 = new QGridLayout( 0, 1, 1, 0, 6, "layout1");
39
m_ListIconsSize_label = new QLabel( this, "m_ListIconsSize_label" );
41
layout1->addWidget( m_ListIconsSize_label, 0, 0 );
43
kcfg_listview_icon_size = new KIntSpinBox( this, "kcfg_listview_icon_size" );
44
kcfg_listview_icon_size->setMaxValue( 128 );
45
kcfg_listview_icon_size->setMinValue( 16 );
46
kcfg_listview_icon_size->setValue( 22 );
48
layout1->addWidget( kcfg_listview_icon_size, 0, 1 );
49
DisplaySettingsLayout->addLayout( layout1 );
51
kcfg_display_file_tips = new QCheckBox( this, "kcfg_display_file_tips" );
52
DisplaySettingsLayout->addWidget( kcfg_display_file_tips );
54
kcfg_display_previews_in_file_tips = new QCheckBox( this, "kcfg_display_previews_in_file_tips" );
55
DisplaySettingsLayout->addWidget( kcfg_display_previews_in_file_tips );
57
kcfg_use_kompare_for_diff = new QButtonGroup( this, "kcfg_use_kompare_for_diff" );
58
kcfg_use_kompare_for_diff->setColumnLayout(0, Qt::Vertical );
59
kcfg_use_kompare_for_diff->layout()->setSpacing( 6 );
60
kcfg_use_kompare_for_diff->layout()->setMargin( 11 );
61
kcfg_use_kompare_for_diffLayout = new QVBoxLayout( kcfg_use_kompare_for_diff->layout() );
62
kcfg_use_kompare_for_diffLayout->setAlignment( Qt::AlignTop );
64
m_internal = new QRadioButton( kcfg_use_kompare_for_diff, "m_internal" );
65
m_internal->setChecked( TRUE );
66
kcfg_use_kompare_for_diffLayout->addWidget( m_internal );
68
m_kompare = new QRadioButton( kcfg_use_kompare_for_diff, "m_kompare" );
69
kcfg_use_kompare_for_diffLayout->addWidget( m_kompare );
71
m_other = new QRadioButton( kcfg_use_kompare_for_diff, "m_other" );
72
kcfg_use_kompare_for_diffLayout->addWidget( m_other );
73
DisplaySettingsLayout->addWidget( kcfg_use_kompare_for_diff );
75
m_extern_hint = new QLabel( this, "m_extern_hint" );
76
m_extern_hint->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
77
DisplaySettingsLayout->addWidget( m_extern_hint );
79
layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2");
81
mdiff_display_label = new QLabel( this, "mdiff_display_label" );
83
layout2->addWidget( mdiff_display_label, 0, 0 );
85
kcfg_external_diff_display = new KLineEdit( this, "kcfg_external_diff_display" );
87
layout2->addWidget( kcfg_external_diff_display, 0, 1 );
88
DisplaySettingsLayout->addLayout( layout2 );
90
layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3");
92
m_MaxLogLabel = new QLabel( this, "m_MaxLogLabel" );
94
layout3->addWidget( m_MaxLogLabel, 0, 0 );
96
kcfg_max_log_messages = new KIntSpinBox( this, "kcfg_max_log_messages" );
97
kcfg_max_log_messages->setMaxValue( 150 );
98
kcfg_max_log_messages->setMinValue( 0 );
100
layout3->addWidget( kcfg_max_log_messages, 0, 1 );
101
DisplaySettingsLayout->addLayout( layout3 );
103
resize( QSize(280, 299).expandedTo(minimumSizeHint()) );
104
clearWState( WState_Polished );
106
// signals and slots connections
107
connect( kcfg_external_diff_display, SIGNAL( selectionChanged() ), this, SLOT( diffDispChanged() ) );
108
connect( m_internal, SIGNAL( clicked() ), this, SLOT( diffDispChanged() ) );
109
connect( m_kompare, SIGNAL( clicked() ), this, SLOT( diffDispChanged() ) );
110
connect( m_other, SIGNAL( clicked() ), this, SLOT( diffDispChanged() ) );
111
connect( kcfg_display_file_tips, SIGNAL( toggled(bool) ), this, SLOT( dispFileInfotoggled(bool) ) );
115
* Destroys the object and frees any allocated resources
117
DisplaySettings::~DisplaySettings()
119
// no need to delete child widgets, Qt does it all for us
123
* Sets the strings of the subwidgets using the current
126
void DisplaySettings::languageChange()
128
setCaption( tr2i18n( "Settings" ) );
129
m_ListIconsSize_label->setText( tr2i18n( "Size of Listviewicons" ) );
130
kcfg_display_file_tips->setText( tr2i18n( "Show file info" ) );
131
QWhatsThis::add( kcfg_display_file_tips, tr2i18n( "Here you can control if, when moving the mouse over a file, you want to see a small popup window with additional information about that file" ) );
132
kcfg_display_previews_in_file_tips->setText( tr2i18n( "Display previews in file tips" ) );
133
QWhatsThis::add( kcfg_display_previews_in_file_tips, tr2i18n( "Here you can control if you want the popup window to contain a larger preview for the file, when moving the mouse over it" ) );
134
kcfg_use_kompare_for_diff->setTitle( tr2i18n( "Diff display" ) );
135
m_internal->setText( tr2i18n( "Internal" ) );
136
m_kompare->setText( tr2i18n( "Use Kompare for diff" ) );
137
m_other->setText( tr2i18n( "Use other diff display" ) );
138
m_extern_hint->setText( tr2i18n( "see \"Whats this\" for details" ) );
139
mdiff_display_label->setText( tr2i18n( "External diff display:" ) );
140
QWhatsThis::add( kcfg_external_diff_display, tr2i18n( "<p align=\"left\">\n"
141
"Enter an external program in form\n"
143
"<tt><program> <param> <%f></tt>\n"
145
"%f will replaced with a temporary filename. If external may read data from\n"
146
"stdin, you may just type\n"
148
"<tt><program> <param></tt>\n"
150
"and Kdesvn will pipe data direct.\n"
152
m_MaxLogLabel->setText( tr2i18n( "Maximum logmessages in history:" ) );
155
void DisplaySettings::diffDispChanged()
157
qWarning( "DisplaySettings::diffDispChanged(): Not implemented yet" );
160
void DisplaySettings::dispFileInfotoggled(bool)
162
qWarning( "DisplaySettings::dispFileInfotoggled(bool): Not implemented yet" );
165
#include "display_settings.moc"