File: pass_info.h

package info (click to toggle)
xca 2.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,328 kB
  • sloc: cpp: 30,584; sh: 341; xml: 74; makefile: 56; python: 34
file content (78 lines) | stat: -rw-r--r-- 1,112 bytes parent folder | download | duplicates (2)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/* vi: set sw=4 ts=4:
 *
 * Copyright (C) 2001 - 2007 Christian Hohnstaedt.
 *
 * All rights reserved.
 */

#ifndef __PASS_INFO_H
#define __PASS_INFO_H

#include <QString>
#include <QObject>
#include <QApplication>

#include "lib/exception.h"

class QWidget;

class pass_info: public QObject
{
	Q_OBJECT

  private:
	QString title{};
	QString description{};
	QWidget *widget{};
	QString type{};
	QString pixmap{};
	enum open_result result{};

  public:
	pass_info(const QString &t, const QString &d, QWidget *w = nullptr);
	QString getTitle() const
	{
		return title;
	}
	QString getDescription() const
	{
		return description;
	}
	QWidget *getWidget()
	{
		if (!widget)
			widget = qApp->activeWindow();
		return widget;
	}
	QString getType() const
	{
		return type;
	}
	QString getImage() const
	{
		return pixmap;
	}
	enum open_result getResult() const
	{
		return result;
	}
	void setTitle(QString t)
	{
		title = t;
	}
	void setDescription(QString d)
	{
		description = d;
	}
	void setWidget(QWidget *w)
	{
		widget = w;
	}
	void setResult(enum open_result r)
	{
		result = r;
	}
	void setPin();
};

#endif