Added toString() method.
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
#include "genericcore.h"
|
#include "genericcore.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -8,4 +9,6 @@ GenericCore::GenericCore() { qDebug() << "Creating core..."; }
|
|||||||
|
|
||||||
GenericCore::~GenericCore() { qDebug() << "Destroying core..."; }
|
GenericCore::~GenericCore() { qDebug() << "Destroying core..."; }
|
||||||
|
|
||||||
|
QString GenericCore::toString() const { return QString("GenericCore (Version x.y.z)"); }
|
||||||
|
|
||||||
void GenericCore::sayHello() const { qDebug() << "Hello from the core!"; }
|
void GenericCore::sayHello() const { qDebug() << "Hello from the core!"; }
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
#ifndef GENERICCORE_H
|
#ifndef GENERICCORE_H
|
||||||
#define GENERICCORE_H
|
#define GENERICCORE_H
|
||||||
|
|
||||||
|
class QString;
|
||||||
|
|
||||||
class GenericCore {
|
class GenericCore {
|
||||||
public:
|
public:
|
||||||
GenericCore();
|
GenericCore();
|
||||||
~GenericCore();
|
~GenericCore();
|
||||||
|
|
||||||
|
QString toString() const;
|
||||||
void sayHello() const;
|
void sayHello() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user