Added onlineID and accessUrl widgets to the edit item dialog layout. No functionality yet.

This commit is contained in:
2026-02-17 11:42:29 +01:00
parent f1a436ead0
commit 7a8859843e
4 changed files with 118 additions and 84 deletions

View File

@ -15,6 +15,8 @@ class QItemSelectionModel;
class QStringListModel;
class QTableView;
#include "QrCodeGenerator.h"
class ItemDetailMapper : public QWidget {
Q_OBJECT
public:
@ -29,13 +31,14 @@ class ItemDetailMapper : public QWidget {
void contentChanged(const QString text);
private slots:
void onCurrentIndexChanged(const QModelIndex& current, const QModelIndex& previous);
void rowsInserted(const QModelIndex& parent, int start, int end);
void rowsRemoved(const QModelIndex& parent, int start, int end);
void toPrevious();
void toNext();
void updateButtons(int row);
void emitContentChanged(const QModelIndex& currentIndex);
void onCurrentIndexChanged(const QModelIndex& current, const QModelIndex& previous);
void updateQRCode(const QString text = "");
private:
/// *** members ***
@ -46,7 +49,8 @@ class ItemDetailMapper : public QWidget {
std::unique_ptr<QDataWidgetMapper> m_mapper;
/// GUI elements
/// *** GUI elements ***
/// left layout
QLabel* m_numberLabel;
QSpinBox* m_numberBox;
@ -82,7 +86,21 @@ class ItemDetailMapper : public QWidget {
QLabel* m_mailLabel;
QLineEdit* m_mailEdit;
/// Model mapper stuff
/// right layout
QPushButton* m_createOnlineAccountButton = nullptr;
QPushButton* m_sendInviteMailButton = nullptr;
QLabel* m_onlineIdLabel;
QLineEdit* m_onlineIdDisplay = nullptr;
QLabel* m_accessCodeLabel;
QLineEdit* m_accessCodeDisplay = nullptr;
QLabel* m_qrCodeDisplay = nullptr;
QrCodeGenerator m_generator;
QLineEdit* m_accessUrlDisplay = nullptr;
/// *** Model mapper stuff ***
QPushButton* m_nextButton;
QPushButton* m_previousButton;
};