mirror of https://github.com/qTox/qTox.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
716 B
38 lines
716 B
#ifndef PASSWORDEDIT_H |
|
#define PASSWORDEDIT_H |
|
|
|
#include <QAction> |
|
#include <QLineEdit> |
|
|
|
class PasswordEdit : public QLineEdit |
|
{ |
|
Q_OBJECT |
|
public: |
|
explicit PasswordEdit(QWidget* parent); |
|
~PasswordEdit(); |
|
|
|
protected: |
|
virtual void showEvent(QShowEvent* event); |
|
virtual void hideEvent(QHideEvent* event); |
|
|
|
private: |
|
class EventHandler : QObject |
|
{ |
|
public: |
|
QVector<QAction*> actions; |
|
|
|
EventHandler(); |
|
~EventHandler(); |
|
void updateActions(); |
|
bool eventFilter(QObject *obj, QEvent *event); |
|
}; |
|
|
|
void registerHandler(); |
|
void unregisterHandler(); |
|
|
|
private: |
|
QAction* action; |
|
|
|
static EventHandler* eventHandler; |
|
}; |
|
#endif // PASSWORDEDIT_H
|
|
|