summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtStatusWidget.h')
-rw-r--r--Swift/QtUI/QtStatusWidget.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/Swift/QtUI/QtStatusWidget.h b/Swift/QtUI/QtStatusWidget.h
index 95c1870..84994d8 100644
--- a/Swift/QtUI/QtStatusWidget.h
+++ b/Swift/QtUI/QtStatusWidget.h
@@ -10,23 +10,50 @@
#include "Swiften/Elements/StatusShow.h"
#include <QWidget>
+#include <QMap>
+#include <QIcon>
class QComboBox;
+class QLabel;
+class QStackedWidget;
class QLineEdit;
+class QListWidget;
+class QListWidgetItem;
namespace Swift {
class QtStatusWidget : public QWidget {
Q_OBJECT
public:
QtStatusWidget(QWidget *parent);
+ ~QtStatusWidget();
StatusShow::Type getSelectedStatusShow();
void setStatusType(StatusShow::Type type);
signals:
- void onChangeStatusRequest(StatusShow::Type showType);
+ void onChangeStatusRequest(StatusShow::Type showType, const QString& text);
+ public slots:
+ void setStatusText(const QString& text);
private slots:
- void handleTypeSelected(int index);
+ void generateList();
+ void handleClicked();
+ void handleEditComplete();
+ void handleEditCancelled();
+ protected slots:
+ virtual void mousePressEvent(QMouseEvent* event);
+ void handleItemClicked(QListWidgetItem* item);
private:
- QComboBox *types_;
+ void viewMode();
+ //QComboBox *types_;
+ QStackedWidget* stack_;
+ QLabel* statusIcon_;
+ QLabel* statusTextLabel_;
+ QLineEdit* statusEdit_;
+ QString statusText_;
+ QMap<StatusShow::Type, QIcon> icons_;
+ StatusShow::Type selectedStatusType_;
+ bool isClicking_;
+ QListWidget* menu_;
+ QCursor editCursor_;
+ QCursor viewCursor_;
};
}