Revision 4061b346
Von Christian Ehringfeld vor etwa 10 Jahren hinzugefügt
| samples/example/models/contact.h | ||
|---|---|---|
|
|
||
|
public:
|
||
|
enum Category {EMAIL, MOBILE, LANDLINE, MESSENGER, EXTRA} ;
|
||
|
Q_ENUM(Category)
|
||
|
Q_INVOKABLE Contact() {}
|
||
|
Contact(QString label, Category category, QString content);
|
||
|
const QHash<QString, CuteEntityManager::Relation> getRelations() const
|
||
| samples/example/models/person.h | ||
|---|---|---|
|
|
||
|
public:
|
||
|
enum class Gender {MALE, FEMALE, UNKNOWNGENDER};
|
||
|
Q_ENUM(Gender)
|
||
|
enum class NameOrder {FIRST_FAMILY_NAME_ORDER, FAMILY_FIRST_NAME_ORDER};
|
||
|
Q_ENUM(NameOrder)
|
||
|
Q_INVOKABLE explicit Person(QObject *parent = 0);
|
||
|
Person(QString firstName, QString familyName,
|
||
|
Gender gender = Gender::UNKNOWNGENDER,
|
||
| samples/simple/article.cpp | ||
|---|---|---|
|
}
|
||
|
|
||
|
Article::~Article() {
|
||
|
|
||
|
}
|
||
|
|
||
|
Article::Article() : Entity() {
|
||
| ... | ... | |
|
this->name = name;
|
||
|
}
|
||
|
|
||
|
double Article::getPrice() const
|
||
|
{
|
||
|
double Article::getPrice() const {
|
||
|
return price;
|
||
|
}
|
||
|
|
||
|
void Article::setPrice(double value)
|
||
|
{
|
||
|
void Article::setPrice(double value) {
|
||
|
price = value;
|
||
|
}
|
||
| tests/tables/tst_tables.cpp | ||
|---|---|---|
|
}
|
||
|
|
||
|
void Tables::cleanupTestCase() {
|
||
|
// if (this->e) {
|
||
|
// delete this->e;
|
||
|
// this->e = nullptr;
|
||
|
// }
|
||
|
if (this->e) {
|
||
|
delete this->e;
|
||
|
this->e = nullptr;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void Tables::testStartup() {
|
||
Auch abrufbar als: Unified diff
samples again