summaryrefslogtreecommitdiffabout
path: root/libkabcwrap/addresseedialog.cpp
Side-by-side diff
Diffstat (limited to 'libkabcwrap/addresseedialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkabcwrap/addresseedialog.cpp69
1 files changed, 0 insertions, 69 deletions
diff --git a/libkabcwrap/addresseedialog.cpp b/libkabcwrap/addresseedialog.cpp
deleted file mode 100644
index e0fe354..0000000
--- a/libkabcwrap/addresseedialog.cpp
+++ b/dev/null
@@ -1,69 +0,0 @@
-#include <qlistview.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include "addresseedialog.h"
-#include "select_addressee_base.h"
-
-using namespace KABC;
-
-Addressee AddresseeDialog::getAddressee( QWidget *parent ) {
-
- Addressee result;
- if (!getInterface()) {
- QMessageBox::warning(parent,"Plugin missing", "Plugins for Qtopia/Opie\naddressbook missing.\nPlease install\nlibqtopiakabc.so/libopiekabc.so\nunder $QPEDIR/plugins/korganizer.\nQtopia-plugin needs libqpepim.", 0L );
- } else {
-
- // qDebug("Start: AddresseeDialog::getAddressee");
-
- Addressee::List list = getAddresseesFromPlugin();
-
- SelectAddressee *selAddressee = new SelectAddressee(parent,"SelectAddressee", true);
- QListView *contactList = selAddressee->contactList;
- contactList->setSelectionMode(QListView::Single);
- if (!contactList) {
- Addressee emptyAddressee;
- return emptyAddressee;
- }
-
- for (uint i=0; i < list.count(); i++) {
- Addressee a = list[i];
- QString fullName = a.formattedName();
- QString defaultEmail = a.preferredEmail();
- //qDebug("Adding " + fullName);
- QListViewItem *item = new QListViewItem(contactList, fullName, defaultEmail);
- }
- if ( QApplication::desktop()->width() < 480 ) {
- selAddressee->setMinimumWidth( 220 );
- } else {
- selAddressee->setMinimumWidth( 440 );
- }
- if (selAddressee->exec()) {
- QListViewItem *selectedItem = contactList->selectedItem();
- if (selectedItem) {
- uint i=0;
- for (i=0; i < list.count() && (list[i].formattedName() != selectedItem->text(0)); i++);
- if (i<list.count()) {
- result = list[i];
- }
- }
- }
- delete selAddressee;
- //qDebug("End: AddresseeDialog::getAddressee");
-}
- return result;
-
-}
-
-Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) {
- //qDebug("Start: AddresseeDialog::getAddressees");
-
- KOAddressBookInterface *iface = getInterface();
-
- Addressee::List results;
- if (iface) {
- Addressee a = getAddressee(parent);
- results.append(a);
- }
- //qDebug("End: AddresseeDialog::getAddressees");
- return results;
-}