summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/ui/addcontactpage.h
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/ui/addcontactpage.h')
-rw-r--r--kopete/libkopete/ui/addcontactpage.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/kopete/libkopete/ui/addcontactpage.h b/kopete/libkopete/ui/addcontactpage.h
new file mode 100644
index 00000000..506c5bcc
--- /dev/null
+++ b/kopete/libkopete/ui/addcontactpage.h
@@ -0,0 +1,65 @@
+/*
+ addcontactpage.h - Kopete's Add Contact GUI
+
+ Copyright (c) 2002 by Duncan Mac-Vicar Prett <duncan@kde.org>
+
+ Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This library is free software; you can redistribute it and/or *
+ * modify it under the terms of the GNU Lesser General Public *
+ * License as published by the Free Software Foundation; either *
+ * version 2 of the License, or (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef ADDCONTACTPAGE_H
+#define ADDCONTACTPAGE_H
+
+#include <qwidget.h>
+#include <kopeteprotocol.h>
+
+#include "kopete_export.h"
+
+/**
+ * @author Duncan Mac-Vicar P. <duncan@kde.org>
+ * @todo i want to be able to have a assync apply.
+ * (in the case of jabber, i need to translate the legacy id to a JID)
+ * this could also be usefull in the case of MLSN to check if no error (and also jabber)
+ */
+class KOPETE_EXPORT AddContactPage : public QWidget
+{
+Q_OBJECT
+
+public:
+ AddContactPage(QWidget *parent=0, const char *name=0);
+ virtual ~AddContactPage();
+ //Kopete::Protocol *protocol;
+
+ /**
+ * Plugin should reimplement this methode.
+ * return true if the content of the page are valid
+ *
+ * This method is called in the add account wizzard when the user press the next button
+ * and this page is showed. when it return false, it does not go to the nextpage.
+ * You should popup a dialog to explain WHY the page has not been validate
+ */
+ virtual bool validateData()=0;
+
+ /**
+ * add the contact the the specified meta contact, with the given account
+ * return false if the contact has not been added
+ */
+ virtual bool apply(Kopete::Account * , Kopete::MetaContact *) = 0;
+
+signals:
+ /**
+ * New incarnation of validateData, emit it everytime you think the current data is valid/invalid
+ */
+ void dataValid( AddContactPage *, bool);
+};
+
+#endif
+// vim: set noet ts=4 sts=4 sw=4: