summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.h')
-rw-r--r--Swift/QtUI/QtLoginWindow.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/Swift/QtUI/QtLoginWindow.h b/Swift/QtUI/QtLoginWindow.h
new file mode 100644
index 0000000..5a14202
--- /dev/null
+++ b/Swift/QtUI/QtLoginWindow.h
@@ -0,0 +1,42 @@
+#ifndef SWIFT_QtLoginWindow_H
+#define SWIFT_QtLoginWindow_H
+
+#include <QMainWindow>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QStackedWidget>
+
+#include "Swiften/Controllers/LoginWindow.h"
+#include "Swiften/Controllers/MainWindow.h"
+
+class QLabel;
+class QToolButton;
+
+namespace Swift {
+ class QtLoginWindow : public QMainWindow, public LoginWindow {
+ Q_OBJECT
+ public:
+ QtLoginWindow(const String& defaultJID, const String& defaultPassword, const String& defaultCertificate);
+
+ void morphInto(MainWindow *mainWindow);
+ virtual void loggedOut();
+ virtual void setMessage(const String& message);
+
+ private slots:
+ void loginClicked();
+ void handleCertficateChecked(bool);
+
+ private:
+ QLineEdit *username_;
+ QLineEdit *password_;
+ QPushButton *loginButton_;
+ QCheckBox *remember_;
+ QStackedWidget *stack_;
+ QLabel* message_;
+ QString certificateFile_;
+ QToolButton* certificateButton_;
+ };
+}
+
+#endif