edit address dialog: basic data/widget binding
This commit is contained in:
@@ -28,6 +28,7 @@ public:
|
||||
int rowCount(const QModelIndex &parent) const;
|
||||
int columnCount(const QModelIndex &parent) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
bool setData(const QModelIndex & index, const QVariant & value, int role);
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
QModelIndex index(int row, int column, const QModelIndex & parent) const;
|
||||
|
||||
|
||||
@@ -3,9 +3,14 @@
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDataWidgetMapper;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Ui {
|
||||
class EditAddressDialog;
|
||||
}
|
||||
class AddressTableModel;
|
||||
|
||||
class EditAddressDialog : public QDialog
|
||||
{
|
||||
@@ -22,8 +27,12 @@ public:
|
||||
explicit EditAddressDialog(Mode mode, QWidget *parent = 0);
|
||||
~EditAddressDialog();
|
||||
|
||||
void setModel(AddressTableModel *model);
|
||||
void loadRow(int row);
|
||||
|
||||
private:
|
||||
Ui::EditAddressDialog *ui;
|
||||
QDataWidgetMapper *mapper;
|
||||
};
|
||||
|
||||
#endif // EDITADDRESSDIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user