~ubuntu-branches/debian/stretch/kdesvn/stretch

« back to all changes in this revision

Viewing changes to src/display_settings.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2005-12-19 21:47:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051219214739-9w63kn8qsyqcr0uh
Tags: 0.7.1-1
* New upstream release.
* Tightened build dependency on kdelibs4-dev because of the C++ allocator
  change.
* Tightened build dependency on libsvn0-dev as kdesvn now requires subversion
  1.2 or higher.
* Split up package into core application kdesvn and KIO plugin package
  kdesvn-kio-plugins.
* Updated menu icon.
* Use Debian libtool and regenerate the autotools files. Closes: #343952
  + Add build dependencies to automake1.9, autoconf and libtool.
  + Patch makefile_am.diff from Aurelien Jarno <aurel32@debian.org> adds
    missing libraries needed for linking. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <kdialog.h>
2
 
#include <klocale.h>
3
 
/****************************************************************************
4
 
** Form implementation generated from reading ui file './display_settings.ui'
5
 
**
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 $)
8
 
**
9
 
** WARNING! All changes made in this file will be lost!
10
 
****************************************************************************/
11
 
 
12
 
#include "display_settings.h"
13
 
 
14
 
#include <qvariant.h>
15
 
#include <qpushbutton.h>
16
 
#include <qlabel.h>
17
 
#include <knuminput.h>
18
 
#include <qcheckbox.h>
19
 
#include <qbuttongroup.h>
20
 
#include <qradiobutton.h>
21
 
#include <klineedit.h>
22
 
#include <qlayout.h>
23
 
#include <qtooltip.h>
24
 
#include <qwhatsthis.h>
25
 
 
26
 
/*
27
 
 *  Constructs a DisplaySettings as a child of 'parent', with the
28
 
 *  name 'name' and widget flags set to 'f'.
29
 
 */
30
 
DisplaySettings::DisplaySettings( QWidget* parent, const char* name, WFlags fl )
31
 
    : QWidget( parent, name, fl )
32
 
{
33
 
    if ( !name )
34
 
        setName( "DisplaySettings" );
35
 
    DisplaySettingsLayout = new QVBoxLayout( this, 11, 6, "DisplaySettingsLayout"); 
36
 
 
37
 
    layout1 = new QGridLayout( 0, 1, 1, 0, 6, "layout1"); 
38
 
 
39
 
    m_ListIconsSize_label = new QLabel( this, "m_ListIconsSize_label" );
40
 
 
41
 
    layout1->addWidget( m_ListIconsSize_label, 0, 0 );
42
 
 
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 );
47
 
 
48
 
    layout1->addWidget( kcfg_listview_icon_size, 0, 1 );
49
 
    DisplaySettingsLayout->addLayout( layout1 );
50
 
 
51
 
    kcfg_display_file_tips = new QCheckBox( this, "kcfg_display_file_tips" );
52
 
    DisplaySettingsLayout->addWidget( kcfg_display_file_tips );
53
 
 
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 );
56
 
 
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 );
63
 
 
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 );
67
 
 
68
 
    m_kompare = new QRadioButton( kcfg_use_kompare_for_diff, "m_kompare" );
69
 
    kcfg_use_kompare_for_diffLayout->addWidget( m_kompare );
70
 
 
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 );
74
 
 
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 );
78
 
 
79
 
    layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2"); 
80
 
 
81
 
    mdiff_display_label = new QLabel( this, "mdiff_display_label" );
82
 
 
83
 
    layout2->addWidget( mdiff_display_label, 0, 0 );
84
 
 
85
 
    kcfg_external_diff_display = new KLineEdit( this, "kcfg_external_diff_display" );
86
 
 
87
 
    layout2->addWidget( kcfg_external_diff_display, 0, 1 );
88
 
    DisplaySettingsLayout->addLayout( layout2 );
89
 
 
90
 
    layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3"); 
91
 
 
92
 
    m_MaxLogLabel = new QLabel( this, "m_MaxLogLabel" );
93
 
 
94
 
    layout3->addWidget( m_MaxLogLabel, 0, 0 );
95
 
 
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 );
99
 
 
100
 
    layout3->addWidget( kcfg_max_log_messages, 0, 1 );
101
 
    DisplaySettingsLayout->addLayout( layout3 );
102
 
    languageChange();
103
 
    resize( QSize(280, 299).expandedTo(minimumSizeHint()) );
104
 
    clearWState( WState_Polished );
105
 
 
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) ) );
112
 
}
113
 
 
114
 
/*
115
 
 *  Destroys the object and frees any allocated resources
116
 
 */
117
 
DisplaySettings::~DisplaySettings()
118
 
{
119
 
    // no need to delete child widgets, Qt does it all for us
120
 
}
121
 
 
122
 
/*
123
 
 *  Sets the strings of the subwidgets using the current
124
 
 *  language.
125
 
 */
126
 
void DisplaySettings::languageChange()
127
 
{
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"
142
 
"<br>\n"
143
 
"<tt>&lt;program&gt; &lt;param&gt; &lt;%f&gt;</tt>\n"
144
 
"<br>\n"
145
 
"%f will replaced with a temporary filename. If external may read data from\n"
146
 
"stdin, you may just type\n"
147
 
"<br>\n"
148
 
"<tt>&lt;program&gt; &lt;param&gt;</tt>\n"
149
 
"<br>\n"
150
 
"and Kdesvn will pipe data direct.\n"
151
 
"</p>" ) );
152
 
    m_MaxLogLabel->setText( tr2i18n( "Maximum logmessages in history:" ) );
153
 
}
154
 
 
155
 
void DisplaySettings::diffDispChanged()
156
 
{
157
 
    qWarning( "DisplaySettings::diffDispChanged(): Not implemented yet" );
158
 
}
159
 
 
160
 
void DisplaySettings::dispFileInfotoggled(bool)
161
 
{
162
 
    qWarning( "DisplaySettings::dispFileInfotoggled(bool): Not implemented yet" );
163
 
}
164
 
 
165
 
#include "display_settings.moc"