xca/lib/pass_info.h
Christian Hohnstaedt 993da2d474 Use C++11 initializers for all non-static class members
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.

 - Fix indentations of section declarators.
 - Replace NULL by nullptr when feasible.
 - Sort private section: properties first, then methods.
2023-10-08 22:19:18 +02:00

79 lines
1.1 KiB
C++

/* 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