File: kicondialogui.cpp

package info (click to toggle)
basket 1.0.2-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,272 kB
  • ctags: 3,211
  • sloc: cpp: 28,424; sh: 9,518; perl: 2,730; makefile: 235
file content (110 lines) | stat: -rw-r--r-- 4,076 bytes parent folder | download
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
#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './kicondialogui.ui'
**
** Created: jeu avr 12 14:11:15 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kicondialogui.h"

#include <qvariant.h>
#include <kiconviewsearchline.h>
#include <klistbox.h>
#include <qlabel.h>
#include <kprogress.h>
#include <kpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kiconcanvas.h"

/*
 *  Constructs a KIconDialogUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KIconDialogUI::KIconDialogUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "KIconDialogUI" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( QSize( 0, 0 ) );
    KIconDialogUILayout = new QGridLayout( this, 1, 1, 0, 6, "KIconDialogUILayout"); 

    listBox = new KListBox( this, "listBox" );
    listBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, 0, 0, listBox->sizePolicy().hasHeightForWidth() ) );

    KIconDialogUILayout->addWidget( listBox, 0, 0 );

    iconCanvas = new KIconCanvas( this, "iconCanvas" );
    iconCanvas->setMinimumSize( QSize( 370, 290 ) );
    iconCanvas->setFocusPolicy( KIconCanvas::WheelFocus );
    iconCanvas->setProperty( "gridX", 80 );
    iconCanvas->setProperty( "wordWrapIconText", QVariant( FALSE, 0 ) );

    KIconDialogUILayout->addWidget( iconCanvas, 0, 1 );

    layout4 = new QVBoxLayout( 0, 0, 0, "layout4"); 

    layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); 

    filterLabel = new QLabel( this, "filterLabel" );
    filterLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, filterLabel->sizePolicy().hasHeightForWidth() ) );
    layout3->addWidget( filterLabel );

    searchLine = new KIconViewSearchLine( this, "searchLine" );
    searchLine->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, searchLine->sizePolicy().hasHeightForWidth() ) );
    searchLine->setFocusPolicy( KIconViewSearchLine::StrongFocus );
    layout3->addWidget( searchLine );
    layout4->addLayout( layout3 );

    progressBar = new KProgress( this, "progressBar" );
    progressBar->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, progressBar->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( progressBar );

    KIconDialogUILayout->addLayout( layout4, 1, 1 );

    browseButton = new KPushButton( this, "browseButton" );
    browseButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, browseButton->sizePolicy().hasHeightForWidth() ) );
    browseButton->setOn( FALSE );
    browseButton->setProperty( "stdItem", 18 );

    KIconDialogUILayout->addWidget( browseButton, 1, 0 );
    languageChange();
    resize( QSize(474, 340).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( listBox, iconCanvas );
    setTabOrder( iconCanvas, browseButton );
    setTabOrder( browseButton, searchLine );

    // buddies
    filterLabel->setBuddy( searchLine );
}

/*
 *  Destroys the object and frees any allocated resources
 */
KIconDialogUI::~KIconDialogUI()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KIconDialogUI::languageChange()
{
    setCaption( tr2i18n( "KIconDialogUI" ) );
    filterLabel->setText( tr2i18n( "Fi&lter:" ) );
    browseButton->setText( tr2i18n( "&Open..." ) );
    browseButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
}

#include "kicondialogui.moc"