Diffstat (limited to 'korganizer/publishdialog_base.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/publishdialog_base.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/korganizer/publishdialog_base.cpp b/korganizer/publishdialog_base.cpp index 683f7e9..ce5c542 100644 --- a/korganizer/publishdialog_base.cpp +++ b/korganizer/publishdialog_base.cpp | |||
@@ -1,160 +1,163 @@ | |||
1 | #include <klocale.h> | 1 | #include <klocale.h> |
2 | /**************************************************************************** | 2 | /**************************************************************************** |
3 | ** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/korganizer/publishdialog_base.ui' | 3 | ** Form implementation generated from reading ui file '/build/kde/cvs/korge/kdepim/korganizer/publishdialog_base.ui' |
4 | ** | 4 | ** |
5 | ** Created: Sat Mar 29 22:31:35 2003 | 5 | ** Created: Sat Mar 29 22:31:35 2003 |
6 | ** by: The User Interface Compiler () | 6 | ** by: The User Interface Compiler () |
7 | ** | 7 | ** |
8 | ** WARNING! All changes made in this file will be lost! | 8 | ** WARNING! All changes made in this file will be lost! |
9 | ****************************************************************************/ | 9 | ****************************************************************************/ |
10 | 10 | ||
11 | #include "publishdialog_base.h" | 11 | #include "publishdialog_base.h" |
12 | 12 | ||
13 | #include <qvariant.h> | 13 | #include <qvariant.h> |
14 | #include <qframe.h> | 14 | #include <q3frame.h> |
15 | #include <qheader.h> | 15 | #include <q3header.h> |
16 | #include <qlabel.h> | 16 | #include <qlabel.h> |
17 | #include <qlineedit.h> | 17 | #include <qlineedit.h> |
18 | #include <qlistview.h> | 18 | #include <q3listview.h> |
19 | #include <qpushbutton.h> | 19 | #include <qpushbutton.h> |
20 | #include <qlayout.h> | 20 | #include <qlayout.h> |
21 | #include <qtooltip.h> | 21 | #include <qtooltip.h> |
22 | #include <qwhatsthis.h> | 22 | #include <q3whatsthis.h> |
23 | //Added by qt3to4: | ||
24 | #include <Q3GridLayout> | ||
25 | #include <Q3HBoxLayout> | ||
23 | 26 | ||
24 | /* | 27 | /* |
25 | * Constructs a PublishDialog_base as a child of 'parent', with the | 28 | * Constructs a PublishDialog_base as a child of 'parent', with the |
26 | * name 'name' and widget flags set to 'f'. | 29 | * name 'name' and widget flags set to 'f'. |
27 | * | 30 | * |
28 | * The dialog will by default be modeless, unless you set 'modal' to | 31 | * The dialog will by default be modeless, unless you set 'modal' to |
29 | * TRUE to construct a modal dialog. | 32 | * TRUE to construct a modal dialog. |
30 | */ | 33 | */ |
31 | PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) | 34 | PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) |
32 | : QDialog( parent, name, modal, fl ) | 35 | : QDialog( parent, name, modal, fl ) |
33 | 36 | ||
34 | { | 37 | { |
35 | if ( !name ) | 38 | if ( !name ) |
36 | setName( "PublishDialog_base" ); | 39 | setName( "PublishDialog_base" ); |
37 | PublishDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout"); | 40 | PublishDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout"); |
38 | 41 | ||
39 | mAddressListView = new QListView( this, "mAddressListView" ); | 42 | mAddressListView = new Q3ListView( this, "mAddressListView" ); |
40 | mAddressListView->addColumn( tr2i18n( "Name" ) ); | 43 | mAddressListView->addColumn( tr2i18n( "Name" ) ); |
41 | mAddressListView->addColumn( tr2i18n( "Email" ) ); | 44 | mAddressListView->addColumn( tr2i18n( "Email" ) ); |
42 | 45 | ||
43 | PublishDialog_baseLayout->addMultiCellWidget( mAddressListView, 0, 3, 0, 1 ); | 46 | PublishDialog_baseLayout->addMultiCellWidget( mAddressListView, 0, 3, 0, 1 ); |
44 | 47 | ||
45 | TextLabel1 = new QLabel( this, "TextLabel1" ); | 48 | TextLabel1 = new QLabel( this, "TextLabel1" ); |
46 | 49 | ||
47 | PublishDialog_baseLayout->addWidget( TextLabel1, 4, 0 ); | 50 | PublishDialog_baseLayout->addWidget( TextLabel1, 4, 0 ); |
48 | 51 | ||
49 | TextLabel2 = new QLabel( this, "TextLabel2" ); | 52 | TextLabel2 = new QLabel( this, "TextLabel2" ); |
50 | 53 | ||
51 | PublishDialog_baseLayout->addWidget( TextLabel2, 5, 0 ); | 54 | PublishDialog_baseLayout->addWidget( TextLabel2, 5, 0 ); |
52 | 55 | ||
53 | mEmailLineEdit = new QLineEdit( this, "mEmailLineEdit" ); | 56 | mEmailLineEdit = new QLineEdit( this, "mEmailLineEdit" ); |
54 | 57 | ||
55 | PublishDialog_baseLayout->addWidget( mEmailLineEdit, 5, 1 ); | 58 | PublishDialog_baseLayout->addWidget( mEmailLineEdit, 5, 1 ); |
56 | 59 | ||
57 | mNameLineEdit = new QLineEdit( this, "mNameLineEdit" ); | 60 | mNameLineEdit = new QLineEdit( this, "mNameLineEdit" ); |
58 | 61 | ||
59 | PublishDialog_baseLayout->addWidget( mNameLineEdit, 4, 1 ); | 62 | PublishDialog_baseLayout->addWidget( mNameLineEdit, 4, 1 ); |
60 | 63 | ||
61 | PushButton10 = new QPushButton( this, "PushButton10" ); | 64 | PushButton10 = new QPushButton( this, "PushButton10" ); |
62 | 65 | ||
63 | PublishDialog_baseLayout->addWidget( PushButton10, 0, 2 ); | 66 | PublishDialog_baseLayout->addWidget( PushButton10, 0, 2 ); |
64 | 67 | ||
65 | PushButton12 = new QPushButton( this, "PushButton12" ); | 68 | PushButton12 = new QPushButton( this, "PushButton12" ); |
66 | 69 | ||
67 | PublishDialog_baseLayout->addWidget( PushButton12, 2, 2 ); | 70 | PublishDialog_baseLayout->addWidget( PushButton12, 2, 2 ); |
68 | 71 | ||
69 | PushButton11 = new QPushButton( this, "PushButton11" ); | 72 | PushButton11 = new QPushButton( this, "PushButton11" ); |
70 | 73 | ||
71 | PublishDialog_baseLayout->addWidget( PushButton11, 1, 2 ); | 74 | PublishDialog_baseLayout->addWidget( PushButton11, 1, 2 ); |
72 | QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 75 | QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
73 | PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 ); | 76 | PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 ); |
74 | 77 | ||
75 | Line2 = new QFrame( this, "Line2" ); | 78 | Line2 = new Q3Frame( this, "Line2" ); |
76 | Line2->setFrameShape( QFrame::HLine ); | 79 | Line2->setFrameShape( Q3Frame::HLine ); |
77 | Line2->setFrameShadow( QFrame::Sunken ); | 80 | Line2->setFrameShadow( Q3Frame::Sunken ); |
78 | Line2->setFrameShape( QFrame::HLine ); | 81 | Line2->setFrameShape( Q3Frame::HLine ); |
79 | 82 | ||
80 | PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 ); | 83 | PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 ); |
81 | 84 | ||
82 | layout95 = new QHBoxLayout( 0, 0, 6, "layout95"); | 85 | layout95 = new Q3HBoxLayout( 0, 0, 6, "layout95"); |
83 | QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); | 86 | QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); |
84 | layout95->addItem( spacer_2 ); | 87 | layout95->addItem( spacer_2 ); |
85 | 88 | ||
86 | PushButton9 = new QPushButton( this, "PushButton9" ); | 89 | PushButton9 = new QPushButton( this, "PushButton9" ); |
87 | PushButton9->setDefault( TRUE ); | 90 | PushButton9->setDefault( TRUE ); |
88 | layout95->addWidget( PushButton9 ); | 91 | layout95->addWidget( PushButton9 ); |
89 | 92 | ||
90 | PushButton8 = new QPushButton( this, "PushButton8" ); | 93 | PushButton8 = new QPushButton( this, "PushButton8" ); |
91 | layout95->addWidget( PushButton8 ); | 94 | layout95->addWidget( PushButton8 ); |
92 | 95 | ||
93 | PublishDialog_baseLayout->addMultiCellLayout( layout95, 7, 7, 0, 2 ); | 96 | PublishDialog_baseLayout->addMultiCellLayout( layout95, 7, 7, 0, 2 ); |
94 | languageChange(); | 97 | languageChange(); |
95 | resize( QSize(420, 379).expandedTo(minimumSizeHint()) ); | 98 | resize( QSize(420, 379).expandedTo(minimumSizeHint()) ); |
96 | 99 | ||
97 | // signals and slots connections | 100 | // signals and slots connections |
98 | connect( PushButton10, SIGNAL( clicked() ), this, SLOT( addItem() ) ); | 101 | connect( PushButton10, SIGNAL( clicked() ), this, SLOT( addItem() ) ); |
99 | connect( PushButton11, SIGNAL( clicked() ), this, SLOT( removeItem() ) ); | 102 | connect( PushButton11, SIGNAL( clicked() ), this, SLOT( removeItem() ) ); |
100 | connect( PushButton12, SIGNAL( clicked() ), this, SLOT( openAddressbook() ) ); | 103 | connect( PushButton12, SIGNAL( clicked() ), this, SLOT( openAddressbook() ) ); |
101 | connect( PushButton9, SIGNAL( clicked() ), this, SLOT( accept() ) ); | 104 | connect( PushButton9, SIGNAL( clicked() ), this, SLOT( accept() ) ); |
102 | connect( mNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( updateItem() ) ); | 105 | connect( mNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( updateItem() ) ); |
103 | connect( mEmailLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( updateItem() ) ); | 106 | connect( mEmailLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( updateItem() ) ); |
104 | connect( PushButton8, SIGNAL( clicked() ), this, SLOT( reject() ) ); | 107 | connect( PushButton8, SIGNAL( clicked() ), this, SLOT( reject() ) ); |
105 | 108 | ||
106 | // tab order | 109 | // tab order |
107 | setTabOrder( mAddressListView, mNameLineEdit ); | 110 | setTabOrder( mAddressListView, mNameLineEdit ); |
108 | setTabOrder( mNameLineEdit, mEmailLineEdit ); | 111 | setTabOrder( mNameLineEdit, mEmailLineEdit ); |
109 | setTabOrder( mEmailLineEdit, PushButton10 ); | 112 | setTabOrder( mEmailLineEdit, PushButton10 ); |
110 | setTabOrder( PushButton10, PushButton11 ); | 113 | setTabOrder( PushButton10, PushButton11 ); |
111 | setTabOrder( PushButton11, PushButton12 ); | 114 | setTabOrder( PushButton11, PushButton12 ); |
112 | setTabOrder( PushButton12, PushButton9 ); | 115 | setTabOrder( PushButton12, PushButton9 ); |
113 | setTabOrder( PushButton9, PushButton8 ); | 116 | setTabOrder( PushButton9, PushButton8 ); |
114 | } | 117 | } |
115 | 118 | ||
116 | /* | 119 | /* |
117 | * Destroys the object and frees any allocated resources | 120 | * Destroys the object and frees any allocated resources |
118 | */ | 121 | */ |
119 | PublishDialog_base::~PublishDialog_base() | 122 | PublishDialog_base::~PublishDialog_base() |
120 | { | 123 | { |
121 | // no need to delete child widgets, Qt does it all for us | 124 | // no need to delete child widgets, Qt does it all for us |
122 | } | 125 | } |
123 | 126 | ||
124 | /* | 127 | /* |
125 | * Sets the strings of the subwidgets using the current | 128 | * Sets the strings of the subwidgets using the current |
126 | * language. | 129 | * language. |
127 | */ | 130 | */ |
128 | void PublishDialog_base::languageChange() | 131 | void PublishDialog_base::languageChange() |
129 | { | 132 | { |
130 | setCaption( tr2i18n( "Form1" ) ); | 133 | setCaption( tr2i18n( "Form1" ) ); |
131 | mAddressListView->header()->setLabel( 0, tr2i18n( "Name" ) ); | 134 | mAddressListView->header()->setLabel( 0, tr2i18n( "Name" ) ); |
132 | mAddressListView->header()->setLabel( 1, tr2i18n( "Email" ) ); | 135 | mAddressListView->header()->setLabel( 1, tr2i18n( "Email" ) ); |
133 | TextLabel1->setText( tr2i18n( "Name:" ) ); | 136 | TextLabel1->setText( tr2i18n( "Name:" ) ); |
134 | TextLabel2->setText( tr2i18n( "Email:" ) ); | 137 | TextLabel2->setText( tr2i18n( "Email:" ) ); |
135 | PushButton10->setText( tr2i18n( "&New" ) ); | 138 | PushButton10->setText( tr2i18n( "&New" ) ); |
136 | PushButton12->setText( tr2i18n( "&Addressbook" ) ); | 139 | PushButton12->setText( tr2i18n( "&Addressbook" ) ); |
137 | PushButton11->setText( tr2i18n( "&Remove" ) ); | 140 | PushButton11->setText( tr2i18n( "&Remove" ) ); |
138 | PushButton9->setText( tr2i18n( "&OK" ) ); | 141 | PushButton9->setText( tr2i18n( "&OK" ) ); |
139 | PushButton8->setText( tr2i18n( "&Cancel" ) ); | 142 | PushButton8->setText( tr2i18n( "&Cancel" ) ); |
140 | } | 143 | } |
141 | 144 | ||
142 | void PublishDialog_base::addItem() | 145 | void PublishDialog_base::addItem() |
143 | { | 146 | { |
144 | qWarning( "PublishDialog_base::addItem(): Not implemented yet" ); | 147 | qWarning( "PublishDialog_base::addItem(): Not implemented yet" ); |
145 | } | 148 | } |
146 | 149 | ||
147 | void PublishDialog_base::removeItem() | 150 | void PublishDialog_base::removeItem() |
148 | { | 151 | { |
149 | qWarning( "PublishDialog_base::removeItem(): Not implemented yet" ); | 152 | qWarning( "PublishDialog_base::removeItem(): Not implemented yet" ); |
150 | } | 153 | } |
151 | 154 | ||
152 | void PublishDialog_base::openAddressbook() | 155 | void PublishDialog_base::openAddressbook() |
153 | { | 156 | { |
154 | qWarning( "PublishDialog_base::openAddressbook(): Not implemented yet" ); | 157 | qWarning( "PublishDialog_base::openAddressbook(): Not implemented yet" ); |
155 | } | 158 | } |
156 | 159 | ||
157 | void PublishDialog_base::updateItem() | 160 | void PublishDialog_base::updateItem() |
158 | { | 161 | { |
159 | qWarning( "PublishDialog_base::updateItem(): Not implemented yet" ); | 162 | qWarning( "PublishDialog_base::updateItem(): Not implemented yet" ); |
160 | } | 163 | } |