mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-20 01:14:27 +01:00
feat: add entry edit
This commit is contained in:
parent
a165216ec7
commit
e9a326c141
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -22,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE
|
|||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_DEPRECATED
|
QT_WARNING_DISABLE_DEPRECATED
|
||||||
struct qt_meta_stringdata_blogEntry_t {
|
struct qt_meta_stringdata_blogEntry_t {
|
||||||
const uint offsetsAndSize[24];
|
const uint offsetsAndSize[30];
|
||||||
char stringdata0[132];
|
char stringdata0[185];
|
||||||
};
|
};
|
||||||
#define QT_MOC_LITERAL(ofs, len) \
|
#define QT_MOC_LITERAL(ofs, len) \
|
||||||
uint(offsetof(qt_meta_stringdata_blogEntry_t, stringdata0) + ofs), len
|
uint(offsetof(qt_meta_stringdata_blogEntry_t, stringdata0) + ofs), len
|
||||||
@ -40,13 +40,17 @@ QT_MOC_LITERAL(74, 12), // "QJsonObject&"
|
|||||||
QT_MOC_LITERAL(87, 5), // "users"
|
QT_MOC_LITERAL(87, 5), // "users"
|
||||||
QT_MOC_LITERAL(93, 4), // "name"
|
QT_MOC_LITERAL(93, 4), // "name"
|
||||||
QT_MOC_LITERAL(98, 11), // "removeEntry"
|
QT_MOC_LITERAL(98, 11), // "removeEntry"
|
||||||
QT_MOC_LITERAL(110, 21) // "on_pushButton_clicked"
|
QT_MOC_LITERAL(110, 21), // "on_pushButton_clicked"
|
||||||
|
QT_MOC_LITERAL(132, 26), // "on_editEntryButton_clicked"
|
||||||
|
QT_MOC_LITERAL(159, 9), // "editEntry"
|
||||||
|
QT_MOC_LITERAL(169, 15) // "saveEditedEntry"
|
||||||
|
|
||||||
},
|
},
|
||||||
"blogEntry\0on_saveEntry_clicked\0\0"
|
"blogEntry\0on_saveEntry_clicked\0\0"
|
||||||
"saveEntry\0readJsonFile\0title\0saveJsonFile\0"
|
"saveEntry\0readJsonFile\0title\0saveJsonFile\0"
|
||||||
"QJsonObject&\0users\0name\0removeEntry\0"
|
"QJsonObject&\0users\0name\0removeEntry\0"
|
||||||
"on_pushButton_clicked"
|
"on_pushButton_clicked\0on_editEntryButton_clicked\0"
|
||||||
|
"editEntry\0saveEditedEntry"
|
||||||
};
|
};
|
||||||
#undef QT_MOC_LITERAL
|
#undef QT_MOC_LITERAL
|
||||||
|
|
||||||
@ -56,7 +60,7 @@ static const uint qt_meta_data_blogEntry[] = {
|
|||||||
10, // revision
|
10, // revision
|
||||||
0, // classname
|
0, // classname
|
||||||
0, 0, // classinfo
|
0, 0, // classinfo
|
||||||
6, 14, // methods
|
9, 14, // methods
|
||||||
0, 0, // properties
|
0, 0, // properties
|
||||||
0, 0, // enums/sets
|
0, 0, // enums/sets
|
||||||
0, 0, // constructors
|
0, 0, // constructors
|
||||||
@ -64,12 +68,15 @@ static const uint qt_meta_data_blogEntry[] = {
|
|||||||
0, // signalCount
|
0, // signalCount
|
||||||
|
|
||||||
// slots: name, argc, parameters, tag, flags, initial metatype offsets
|
// slots: name, argc, parameters, tag, flags, initial metatype offsets
|
||||||
1, 0, 50, 2, 0x08, 1 /* Private */,
|
1, 0, 68, 2, 0x08, 1 /* Private */,
|
||||||
3, 0, 51, 2, 0x08, 2 /* Private */,
|
3, 0, 69, 2, 0x08, 2 /* Private */,
|
||||||
4, 1, 52, 2, 0x08, 3 /* Private */,
|
4, 1, 70, 2, 0x08, 3 /* Private */,
|
||||||
6, 2, 55, 2, 0x108, 5 /* Private | MethodIsConst */,
|
6, 2, 73, 2, 0x108, 5 /* Private | MethodIsConst */,
|
||||||
10, 0, 60, 2, 0x08, 8 /* Private */,
|
10, 0, 78, 2, 0x08, 8 /* Private */,
|
||||||
11, 0, 61, 2, 0x08, 9 /* Private */,
|
11, 0, 79, 2, 0x08, 9 /* Private */,
|
||||||
|
12, 0, 80, 2, 0x08, 10 /* Private */,
|
||||||
|
13, 0, 81, 2, 0x08, 11 /* Private */,
|
||||||
|
14, 0, 82, 2, 0x08, 12 /* Private */,
|
||||||
|
|
||||||
// slots: parameters
|
// slots: parameters
|
||||||
QMetaType::Void,
|
QMetaType::Void,
|
||||||
@ -77,6 +84,9 @@ static const uint qt_meta_data_blogEntry[] = {
|
|||||||
QMetaType::QJsonObject, QMetaType::QString, 5,
|
QMetaType::QJsonObject, QMetaType::QString, 5,
|
||||||
QMetaType::Void, 0x80000000 | 7, QMetaType::QString, 8, 9,
|
QMetaType::Void, 0x80000000 | 7, QMetaType::QString, 8, 9,
|
||||||
QMetaType::Void,
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
QMetaType::Void,
|
QMetaType::Void,
|
||||||
|
|
||||||
0 // eod
|
0 // eod
|
||||||
@ -95,6 +105,9 @@ void blogEntry::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, v
|
|||||||
case 3: _t->saveJsonFile((*reinterpret_cast< std::add_pointer_t<QJsonObject&>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break;
|
case 3: _t->saveJsonFile((*reinterpret_cast< std::add_pointer_t<QJsonObject&>>(_a[1])),(*reinterpret_cast< std::add_pointer_t<QString>>(_a[2]))); break;
|
||||||
case 4: _t->removeEntry(); break;
|
case 4: _t->removeEntry(); break;
|
||||||
case 5: _t->on_pushButton_clicked(); break;
|
case 5: _t->on_pushButton_clicked(); break;
|
||||||
|
case 6: _t->on_editEntryButton_clicked(); break;
|
||||||
|
case 7: _t->editEntry(); break;
|
||||||
|
case 8: _t->saveEditedEntry(); break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -108,7 +121,7 @@ const QMetaObject blogEntry::staticMetaObject = { {
|
|||||||
nullptr,
|
nullptr,
|
||||||
qt_incomplete_metaTypeArray<qt_meta_stringdata_blogEntry_t
|
qt_incomplete_metaTypeArray<qt_meta_stringdata_blogEntry_t
|
||||||
, QtPrivate::TypeAndForceComplete<blogEntry, std::true_type>
|
, QtPrivate::TypeAndForceComplete<blogEntry, std::true_type>
|
||||||
, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<QJsonObject, std::false_type>, QtPrivate::TypeAndForceComplete<const QString, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<QJsonObject &, std::false_type>, QtPrivate::TypeAndForceComplete<const QString, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>
|
, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<QJsonObject, std::false_type>, QtPrivate::TypeAndForceComplete<const QString, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<QJsonObject &, std::false_type>, QtPrivate::TypeAndForceComplete<const QString, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>, QtPrivate::TypeAndForceComplete<void, std::false_type>
|
||||||
|
|
||||||
|
|
||||||
>,
|
>,
|
||||||
@ -135,13 +148,13 @@ int blogEntry::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
|||||||
if (_id < 0)
|
if (_id < 0)
|
||||||
return _id;
|
return _id;
|
||||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
if (_id < 6)
|
if (_id < 9)
|
||||||
qt_static_metacall(this, _c, _id, _a);
|
qt_static_metacall(this, _c, _id, _a);
|
||||||
_id -= 6;
|
_id -= 9;
|
||||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||||
if (_id < 6)
|
if (_id < 9)
|
||||||
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
*reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
|
||||||
_id -= 6;
|
_id -= 9;
|
||||||
}
|
}
|
||||||
return _id;
|
return _id;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@ -30,6 +30,7 @@ public:
|
|||||||
QTextEdit *textEdit;
|
QTextEdit *textEdit;
|
||||||
QPushButton *saveEntry;
|
QPushButton *saveEntry;
|
||||||
QPushButton *pushButton;
|
QPushButton *pushButton;
|
||||||
|
QPushButton *editEntryButton;
|
||||||
|
|
||||||
void setupUi(QWidget *blogEntry)
|
void setupUi(QWidget *blogEntry)
|
||||||
{
|
{
|
||||||
@ -61,6 +62,7 @@ public:
|
|||||||
|
|
||||||
saveEntry = new QPushButton(blogEntry);
|
saveEntry = new QPushButton(blogEntry);
|
||||||
saveEntry->setObjectName(QString::fromUtf8("saveEntry"));
|
saveEntry->setObjectName(QString::fromUtf8("saveEntry"));
|
||||||
|
saveEntry->setFlat(false);
|
||||||
|
|
||||||
formLayout->setWidget(4, QFormLayout::FieldRole, saveEntry);
|
formLayout->setWidget(4, QFormLayout::FieldRole, saveEntry);
|
||||||
|
|
||||||
@ -69,6 +71,11 @@ public:
|
|||||||
|
|
||||||
formLayout->setWidget(5, QFormLayout::FieldRole, pushButton);
|
formLayout->setWidget(5, QFormLayout::FieldRole, pushButton);
|
||||||
|
|
||||||
|
editEntryButton = new QPushButton(blogEntry);
|
||||||
|
editEntryButton->setObjectName(QString::fromUtf8("editEntryButton"));
|
||||||
|
|
||||||
|
formLayout->setWidget(6, QFormLayout::FieldRole, editEntryButton);
|
||||||
|
|
||||||
|
|
||||||
retranslateUi(blogEntry);
|
retranslateUi(blogEntry);
|
||||||
|
|
||||||
@ -83,6 +90,7 @@ public:
|
|||||||
dateTime->setText(QCoreApplication::translate("blogEntry", "Date Time", nullptr));
|
dateTime->setText(QCoreApplication::translate("blogEntry", "Date Time", nullptr));
|
||||||
saveEntry->setText(QCoreApplication::translate("blogEntry", "Save Entry", nullptr));
|
saveEntry->setText(QCoreApplication::translate("blogEntry", "Save Entry", nullptr));
|
||||||
pushButton->setText(QCoreApplication::translate("blogEntry", "Remove Entry", nullptr));
|
pushButton->setText(QCoreApplication::translate("blogEntry", "Remove Entry", nullptr));
|
||||||
|
editEntryButton->setText(QCoreApplication::translate("blogEntry", "Edit Entry", nullptr));
|
||||||
} // retranslateUi
|
} // retranslateUi
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user