aboutsummaryrefslogtreecommitdiff
path: root/src/lock.h
blob: 809ca3c6fbec3e64b26c927b285b109e4b4e0f78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef LOCK_H
#define LOCK_H

#include <QAction>
#include <QDebug>
#include <QGraphicsOpacityEffect>
#include <QKeyEvent>
#include <QPropertyAnimation>
#include <QWidget>

#include "moreapps.h"
#include "settingsmanager.h"

namespace Ui {
class Lock;
}

class Lock : public QWidget {
  Q_OBJECT

public:
  explicit Lock(QWidget *parent = nullptr);
  ~Lock();

  bool getIsLocked() const;

private slots:
  void on_passcode1_textChanged(const QString &arg1);
  void on_passcode2_textChanged(const QString &arg1);
  void on_setPass_clicked();
  bool check_password_set();
  void on_passcodeLogin_textChanged(const QString &arg1);
  void on_passcodeLogin_returnPressed();
  bool getCapsLockOn();
  void checkCaps();
  void on_cancelSetting_clicked();
  void animateIn();
  void animateOut();
public slots:
  void lock_app();
  void applyThemeQuirks();
  void signUp();
signals:
  void passwordSet();
  void passwordNotSet();
  void unLocked();

protected slots:
  void keyReleaseEvent(QKeyEvent *event);

  bool event(QEvent *e);

private:
  Ui::Lock *ui;
  bool isLocked = false;
  QAction *passcodeLoginAction;
};

#endif // LOCK_H