aboutsummaryrefslogtreecommitdiff
path: root/xxcc.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-06-12 23:47:17 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-06-29 14:09:46 +0200
commit05b2584fa4d773f5a88ed3ce98f5dd8304e11c34 (patch)
treef72e73c3259b8100e886f49f67ecc669b7667502 /xxcc.h
parent3b8fafc4122848219898245d52dabd669cacb4ba (diff)
First commit
Diffstat (limited to 'xxcc.h')
-rw-r--r--xxcc.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/xxcc.h b/xxcc.h
new file mode 100644
index 0000000..a3eda5d
--- /dev/null
+++ b/xxcc.h
@@ -0,0 +1,43 @@
+#ifndef XXCC_H
+#define XXCC_H
+
+#include "ui_xxcc.h"
+#include "client.h"
+#include "credentials.h"
+#include "jiddb.h"
+#include <QDateTime>
+#include <QList>
+#include <QWidget>
+#include <QSqlDatabase>
+#include <QString>
+#include <QXmppMessage.h>
+
+class xxcc : public QWidget
+{
+ Q_OBJECT
+
+public:
+ xxcc(QWidget *parent = nullptr);
+ ~xxcc();
+
+private:
+ enum Tab {Conversations, Chat};
+ Ui_main ui;
+ QList<Client *> clients;
+ QList<JidDb *> databases;
+ Credentials creds;
+ Client *selected;
+ void setupDatabases(const QList<Credentials::Pair> &pairs);
+ void connectAccounts(const QList<Credentials::Pair> &pairs);
+ void storeMessage(const QXmppMessage &msg, Direction dir) const;
+ void retrieveConversations();
+
+private Q_SLOTS:
+ void startChat(QString from, QString to);
+ void addInMessage(const QXmppMessage &msg);
+ void addOutMessage(const QXmppMessage &msg);
+ void addAccount(Client *c);
+ void send(void);
+};
+
+#endif