--- /dev/null
+#ifndef IDWIDGET_H
+#define IDWIDGET_H
+
+#include <QtGui/qpushbutton.h>
+#include <QtGui/qinputdialog.h>
+#include <QtGui/qpainter.h>
+#include "tpsession.h"
+
+class IdWidget : public QPushButton
+{
+ Q_OBJECT
+
+private:
+
+ bool showId;
+ tpSession *tp;
+ QPixmap *pHidden;
+ QPixmap *pShown;
+
+public:
+ IdWidget(tpSession *tp);
+
+ QSize sizeHint() const
+ {
+ return QSize(200, 75);
+ }
+
+public slots:
+ void changeState();
+ void setButtonState(bool showId);
+
+protected:
+ void paintEvent(QPaintEvent *event)
+ {
+ QPainter p(this);
+ p.setBrush(QColor(0, 0, 0, 128));
+ p.setPen(Qt::NoPen);
+ p.drawRoundedRect(rect(), 25, 25);
+ p.end();
+
+ QPushButton::paintEvent(event);
+ }
+};
+
+#endif