summaryrefslogtreecommitdiffabout
path: root/libkdepim/categoryeditdialog_base.cpp
blob: ac991903ac730d06c50886be04f961eb5e2110a7 (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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/libkdepim/categoryeditdialog_base.ui'
**
** Created: Sat Mar 29 21:46:09 2003
**      by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "categoryeditdialog_base.h"

#include <qvariant.h>
#include <qheader.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a CategoryEditDialog_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.
 */
CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, true, fl )

{
    if ( !name )
	setName( "CategoryEditDialog_base" );
    CategoryEditDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout"); 

    mEdit = new QLineEdit( this, "mEdit" );

    CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 1 );

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

    // mButtonHelp = new QPushButton( this, "mButtonHelp" );
    //mButtonHelp->setAutoDefault( TRUE );
    //Layout13->addWidget( mButtonHelp );
    //QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    //Layout13->addItem( spacer );

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

    mButtonOk = new QPushButton( this, "mButtonOk" );
    mButtonOk->setAutoDefault( TRUE );
    mButtonOk->setDefault( TRUE );
    Layout13->addWidget( mButtonOk );

    mButtonCancel = new QPushButton( this, "mButtonCancel" );
    mButtonCancel->setAutoDefault( TRUE );
    Layout13->addWidget( mButtonCancel );

    CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 );

    mCategories = new QListView( this, "mCategories" );
    mCategories->addColumn( tr2i18n( "Category" ) );

    CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 );

    layout103 = new QVBoxLayout( 0, 0, 6, "layout103"); 

    mButtonAdd = new QPushButton( this, "mButtonAdd" );
    layout103->addWidget( mButtonAdd );

    mButtonModify = new QPushButton( this, "mButtonModify" );
    layout103->addWidget( mButtonModify );

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

    CategoryEditDialog_baseLayout->addLayout( layout103, 0, 1 );
    languageChange();
    resize( sizeHint() );

    // signals and slots connections
    connect( mButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( mButtonAdd, SIGNAL( clicked() ), this, SLOT( add() ) );
    connect( mButtonModify, SIGNAL( clicked() ), this, SLOT( modify() ) );
    connect( mButtonRemove, SIGNAL( clicked() ), this, SLOT( remove() ) );
    connect( mButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
    //connect( mApply, SIGNAL( clicked() ), this, SLOT( slotApply() ) );

    // tab order
   //  setTabOrder( mCategories, mEdit );
//     setTabOrder( mEdit, mButtonAdd );
//     setTabOrder( mButtonAdd, mButtonModify );
//     setTabOrder( mButtonModify, mButtonRemove );
//     setTabOrder( mButtonRemove, mButtonHelp );
//     setTabOrder( mButtonHelp, mApply );
//     setTabOrder( mApply, mButtonOk );
//     setTabOrder( mButtonOk, mButtonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CategoryEditDialog_base::languageChange()
{
    setCaption( tr2i18n( "Edit Categories" ) );
    //    mButtonHelp->setText( tr2i18n( "&Help" ) );
    //   mApply->setText( tr2i18n( "&Apply" ) );
    mButtonOk->setText( tr2i18n( "&OK" ) );
    mButtonCancel->setText( tr2i18n( "&Cancel" ) );
    mCategories->header()->setLabel( 0, tr2i18n( "Category" ) );
    mButtonAdd->setText( tr2i18n( "A&dd" ) );
    mButtonModify->setText( tr2i18n( "&Modify" ) );
    mButtonRemove->setText( tr2i18n( "&Remove" ) );
}

void CategoryEditDialog_base::add()
{
    qWarning( "CategoryEditDialog_base::add(): Not implemented yet" );
}

void CategoryEditDialog_base::modify()
{
    qWarning( "CategoryEditDialog_base::modify(): Not implemented yet" );
}

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

void CategoryEditDialog_base::remove()
{
    qWarning( "CategoryEditDialog_base::remove(): Not implemented yet" );
}

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

#include "categoryeditdialog_base.moc"