summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp16
-rw-r--r--core/pim/addressbook/addressbook.h0
2 files changed, 16 insertions, 0 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 86d1760..e11cf4c 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -116,48 +116,62 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
116 listTools = new QPEToolBar( this, "list operations" ); 116 listTools = new QPEToolBar( this, "list operations" );
117 117
118 118
119 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 119 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null,
120 0, this, 0 ); 120 0, this, 0 );
121 actionNew = a; 121 actionNew = a;
122 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); 122 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
123 a->addTo( edit ); 123 a->addTo( edit );
124 a->addTo( listTools ); 124 a->addTo( listTools );
125 125
126 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 126 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
127 0, this, 0 ); 127 0, this, 0 );
128 actionEdit = a; 128 actionEdit = a;
129 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 129 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
130 a->addTo( edit ); 130 a->addTo( edit );
131 a->addTo( listTools ); 131 a->addTo( listTools );
132 132
133 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 133 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
134 0, this, 0 ); 134 0, this, 0 );
135 actionTrash = a; 135 actionTrash = a;
136 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 136 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
137 a->addTo( edit ); 137 a->addTo( edit );
138 a->addTo( listTools ); 138 a->addTo( listTools );
139 139
140
141 // make it possible to go directly to businesscard via qcop call
142#if defined(Q_WS_QWS)
143#if !defined(QT_NO_COP)
144 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
145 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
146 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
147#endif
148#endif
149
150
151
152
153
140#ifndef MAKE_FOR_SHARP_ROM 154#ifndef MAKE_FOR_SHARP_ROM
141 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), 155 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
142 QString::null, 0, this, 0 ); 156 QString::null, 0, this, 0 );
143 actionFind = a; 157 actionFind = a;
144 connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); 158 connect( a, SIGNAL(activated()), this, SLOT(slotFind()) );
145 a->addTo( edit ); 159 a->addTo( edit );
146 a->addTo( listTools ); 160 a->addTo( listTools );
147#endif 161#endif
148 162
149 163
150 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ), 164 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ),
151 QString::null, 0, this, 0 ); 165 QString::null, 0, this, 0 );
152 //a->setEnabled( FALSE ); we got support for it now :) zecke 166 //a->setEnabled( FALSE ); we got support for it now :) zecke
153 actionMail = a; 167 actionMail = a;
154 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); 168 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
155 a->addTo( edit ); 169 a->addTo( edit );
156 a->addTo( listTools ); 170 a->addTo( listTools );
157 171
158 172
159 173
160 if ( Ir::supported() ) { 174 if ( Ir::supported() ) {
161 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, 175 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
162 0, this, 0 ); 176 0, this, 0 );
163 actionBeam = a; 177 actionBeam = a;
@@ -229,48 +243,50 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
229 catMenu->setCheckable( TRUE ); 243 catMenu->setCheckable( TRUE );
230 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 244 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
231 populateCategories(); 245 populateCategories();
232 246
233 mbList->insertItem( tr("View"), catMenu ); 247 mbList->insertItem( tr("View"), catMenu );
234 setCentralWidget( listContainer ); 248 setCentralWidget( listContainer );
235 249
236 fontMenu = new QPopupMenu(this); 250 fontMenu = new QPopupMenu(this);
237 fontMenu->setCheckable( true ); 251 fontMenu->setCheckable( true );
238 connect( fontMenu, SIGNAL(activated(int)), this, SLOT(slotSetFont(int))); 252 connect( fontMenu, SIGNAL(activated(int)), this, SLOT(slotSetFont(int)));
239 253
240 fontMenu->insertItem(tr( "Small" ), 0); 254 fontMenu->insertItem(tr( "Small" ), 0);
241 fontMenu->insertItem(tr( "Normal" ), 1); 255 fontMenu->insertItem(tr( "Normal" ), 1);
242 fontMenu->insertItem(tr( "Large" ), 2); 256 fontMenu->insertItem(tr( "Large" ), 2);
243 257
244 defaultFont = new QFont( abList->font() ); 258 defaultFont = new QFont( abList->font() );
245 259
246 slotSetFont(startFontSize); 260 slotSetFont(startFontSize);
247 261
248 mbList->insertItem( tr("Font"), fontMenu); 262 mbList->insertItem( tr("Font"), fontMenu);
249 setCentralWidget(listContainer); 263 setCentralWidget(listContainer);
250 264
251 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 265 // qDebug("adressbook contrsuction: t=%d", t.elapsed() );
252} 266}
267
268
253void AddressbookWindow::slotSetFont( int size ) { 269void AddressbookWindow::slotSetFont( int size ) {
254 270
255 if (size > 2 || size < 0) 271 if (size > 2 || size < 0)
256 size = 1; 272 size = 1;
257 273
258 startFontSize = size; 274 startFontSize = size;
259 275
260 QFont *currentFont; 276 QFont *currentFont;
261 277
262 switch (size) { 278 switch (size) {
263 case 0: 279 case 0:
264 fontMenu->setItemChecked(0, true); 280 fontMenu->setItemChecked(0, true);
265 fontMenu->setItemChecked(1, false); 281 fontMenu->setItemChecked(1, false);
266 fontMenu->setItemChecked(2, false); 282 fontMenu->setItemChecked(2, false);
267 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); 283 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) );
268 currentFont = new QFont (abList->font()); 284 currentFont = new QFont (abList->font());
269 abList->resizeRows(currentFont->pixelSize() + 7); 285 abList->resizeRows(currentFont->pixelSize() + 7);
270 break; 286 break;
271 case 1: 287 case 1:
272 fontMenu->setItemChecked(0, false); 288 fontMenu->setItemChecked(0, false);
273 fontMenu->setItemChecked(1, true); 289 fontMenu->setItemChecked(1, true);
274 fontMenu->setItemChecked(2, false); 290 fontMenu->setItemChecked(2, false);
275 abList->setFont( *defaultFont ); 291 abList->setFont( *defaultFont );
276 currentFont = new QFont (abList->font()); 292 currentFont = new QFont (abList->font());
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h
index da43731..34ca85d 100644
--- a/core/pim/addressbook/addressbook.h
+++ b/core/pim/addressbook/addressbook.h