summaryrefslogtreecommitdiffabout
path: root/libkdepim/categoryselectdialog_base.cpp
blob: 5d53ac4d7d019f0966c85406c33a567d6743c3be (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
132
133
134
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/libkdepim/categoryselectdialog_base.ui'
**
** Created: Sat Mar 29 21:46:05 2003
**      by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "categoryselectdialog_base.h"

#include <qvariant.h>
#include <q3header.h>
#include <q3listview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <q3whatsthis.h>
//Added by qt3to4:
#include <Q3VBoxLayout>
#include <Q3HBoxLayout>

/* 
 *  Constructs a CategorySelectDialog_base as a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
    : QDialog( parent, name, modal, fl )

{
    if ( !name )
	setName( "CategorySelectDialog_base" );
    CategorySelectDialog_baseLayout = new Q3VBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout"); 

    mCategories = new Q3ListView( this, "mCategories" );
    mCategories->addColumn( i18n( "Category" ) );
    CategorySelectDialog_baseLayout->addWidget( mCategories );
    mSetColorCat = new QPushButton( this, "msetColor" );
    CategorySelectDialog_baseLayout->addWidget( mSetColorCat );
    Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12"); 

    mClear = new QPushButton( this, "mClear" );
    Layout12->addWidget( mClear );
    // QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    //Layout12->addItem( spacer );

    mButtonEdit = new QPushButton( this, "mButtonEdit" );
    Layout12->addWidget( mButtonEdit );
    CategorySelectDialog_baseLayout->addLayout( Layout12 );

    Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11"); 

    //mButtonHelp = new QPushButton( this, "mButtonHelp" );
    //Layout11->addWidget( mButtonHelp );
    //QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    // Layout11->addItem( spacer_2 );

    //mApply = new QPushButton( this, "mApply" );
    // Layout11->addWidget( mApply );

    mButtonOk = new QPushButton( this, "mButtonOk" );
    mButtonOk->setOn( FALSE );
    mButtonOk->setDefault( TRUE );
    Layout11->addWidget( mButtonOk );

    mButtonCancel = new QPushButton( this, "mButtonCancel" );
    Layout11->addWidget( mButtonCancel );
    CategorySelectDialog_baseLayout->addLayout( Layout11 );
    languageChange();
    // resize( sizeHint() );

    // signals and slots connections
    connect( mButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( mButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
    connect( mClear, SIGNAL( clicked() ), this, SLOT( clear() ) );
    //connect( mApply, SIGNAL( clicked() ), this, SLOT( slotApply() ) );

    // tab order
    setTabOrder( mCategories, mClear );
    setTabOrder( mClear, mButtonEdit );
    setTabOrder( mButtonEdit, mButtonOk );//mButtonHelp );
    // setTabOrder( mButtonHelp, mApply );
    // setTabOrder( mApply, mButtonOk );
    setTabOrder( mButtonOk, mButtonCancel );
    // showMaximized();
    //raise();
    mSetColorCat->hide();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CategorySelectDialog_base::languageChange()
{
    setCaption( i18n( "Select Categories" ) );
    mCategories->header()->setLabel( 0, tr2i18n( "Category" ) );
    mClear->setText( i18n( " &Deselect All " ) );
    mButtonEdit->setText( i18n( " &Edit Categories " ) );
    // mButtonHelp->setText( tr2i18n( "&Help" ) );
    //mApply->setText( i18n( "&Apply" ) );
    mButtonOk->setText( i18n( "&OK" ) );
    mSetColorCat->setText( i18n( "Set current as color category" ) );
    mButtonCancel->setText( i18n( "&Cancel" ) );
}

void CategorySelectDialog_base::clear()
{
    qWarning( "CategorySelectDialog_base::clear(): Not implemented yet" );
}

void CategorySelectDialog_base::slotApply()
{
    qWarning( "CategorySelectDialog_base::slotApply(): Not implemented yet" );
}

void CategorySelectDialog_base::slotOk()
{
    qWarning( "CategorySelectDialog_base::slotOk(): Not implemented yet" );
}

//US#include "categoryselectdialog_base.moc"