Tue, 01 Mar 2022 13:19:25 +0100
Finisch miscs dutch translation.
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /** |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | * InventorySuppliers.cpp is part of bmsapp. |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * bmsapp is free software: you can redistribute it and/or modify |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * it under the terms of the GNU General Public License as published by |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * the Free Software Foundation, either version 3 of the License, or |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * (at your option) any later version. |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * bmsapp is distributed in the hope that it will be useful, |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * GNU General Public License for more details. |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * You should have received a copy of the GNU General Public License |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | */ |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | #include "InventorySuppliers.h" |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
18 | #include "EditSupplier.h" |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | #include "../ui/ui_InventorySuppliers.h" |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | #include "config.h" |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
21 | #include "bmsapp.h" |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
23 | |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
24 | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | InventorySuppliers::InventorySuppliers(QWidget *parent) : QDialog(parent), ui(new Ui::InventorySuppliers) |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | { |
12
66e10898a2a9
Suppliers table refresh works after edit.
Michiel Broek <mbroek@mbse.eu>
parents:
11
diff
changeset
|
27 | qDebug() << "InventorySuppliers start"; |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
28 | |
7
51fbea52551e
The suppliers table now shows on the right screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
29 | ui->setupUi(this); |
11
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
30 | emit refreshTable(); |
7
51fbea52551e
The suppliers table now shows on the right screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
31 | |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
32 | setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING) ); |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
33 | } |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
34 | |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
35 | |
11
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
36 | void InventorySuppliers::refreshTable() |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
37 | { |
22
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
38 | qDebug() << "InventorySuppliers reload"; |
11
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
39 | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | QSqlQuery query("SELECT * FROM inventory_suppliers ORDER BY name"); |
22
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
41 | const QStringList labels({tr("Name"), tr("Address"), tr("City"), tr("Country"), tr("Phone"), tr("Edit")}); |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | |
22
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
43 | ui->tableSuppliers->setColumnCount(6); |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
44 | ui->tableSuppliers->setColumnWidth(0, 250); /* Name */ |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
45 | ui->tableSuppliers->setColumnWidth(1, 250); /* Address */ |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
46 | ui->tableSuppliers->setColumnWidth(2, 200); /* City */ |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
47 | ui->tableSuppliers->setColumnWidth(3, 120); /* Country */ |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
48 | ui->tableSuppliers->setColumnWidth(4, 120); /* Phone */ |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
49 | ui->tableSuppliers->setColumnWidth(5, 90); /* Edit button */ |
7
51fbea52551e
The suppliers table now shows on the right screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
50 | ui->tableSuppliers->setRowCount(query.size()); |
51fbea52551e
The suppliers table now shows on the right screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
51 | ui->tableSuppliers->setHorizontalHeaderLabels(labels); |
51fbea52551e
The suppliers table now shows on the right screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
52 | ui->tableSuppliers->verticalHeader()->hide(); |
22
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
53 | ui->tableSuppliers->setFixedSize(1030 + 24, 640); /* Even if this is too large, it works */ |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
54 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | query.first(); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | for (int ridx = 0 ; ridx < query.size() ; ridx++ ) { |
22
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
57 | ui->tableSuppliers->setItem(ridx, 0, new QTableWidgetItem(query.value(1).toString())); |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
58 | ui->tableSuppliers->setItem(ridx, 1, new QTableWidgetItem(query.value(2).toString())); |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
59 | ui->tableSuppliers->setItem(ridx, 2, new QTableWidgetItem(query.value(3).toString())); |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
60 | ui->tableSuppliers->setItem(ridx, 3, new QTableWidgetItem(query.value(5).toString())); |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
61 | ui->tableSuppliers->setItem(ridx, 4, new QTableWidgetItem(query.value(8).toString())); |
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
62 | |
8
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
63 | /* Add the Edit button */ |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
64 | QWidget* pWidget = new QWidget(); |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
65 | QPushButton* btn_edit = new QPushButton(); |
9
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
66 | btn_edit->setObjectName(QString("%1").arg(query.value(0).toString())); /* Send record with the button */ |
8
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
67 | btn_edit->setText(tr("Edit")); |
9
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
68 | connect(btn_edit, SIGNAL(clicked()), this, SLOT(on_editButton_clicked())); |
8
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
69 | QHBoxLayout* pLayout = new QHBoxLayout(pWidget); |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
70 | pLayout->addWidget(btn_edit); |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
12
diff
changeset
|
71 | pLayout->setContentsMargins(5, 0, 5, 0); |
8
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
72 | pWidget->setLayout(pLayout); |
22
b52978ee7412
Backport of the InventorySuppliers window.
Michiel Broek <mbroek@mbse.eu>
parents:
19
diff
changeset
|
73 | ui->tableSuppliers->setCellWidget(ridx, 5, pWidget); |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
74 | query.next(); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
75 | } |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
76 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
77 | setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING) ); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
78 | } |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
79 | |
9
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
80 | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
81 | InventorySuppliers::~InventorySuppliers() |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | { |
12
66e10898a2a9
Suppliers table refresh works after edit.
Michiel Broek <mbroek@mbse.eu>
parents:
11
diff
changeset
|
83 | qDebug() << "InventorySuppliers done"; |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
84 | delete ui; |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
85 | } |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
86 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
87 | |
11
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
88 | void InventorySuppliers::edit(int recno) |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
89 | { |
12
66e10898a2a9
Suppliers table refresh works after edit.
Michiel Broek <mbroek@mbse.eu>
parents:
11
diff
changeset
|
90 | qDebug() << "InventorySuppliers edit:" << recno; |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
91 | |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
92 | EditSupplier dialog(recno, this); |
11
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
93 | /* Signal from editor if a refresh is needed */ |
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
94 | connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable())); |
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
95 | dialog.setModal(true); |
c9cdc15d3caf
The Supplier editor saves changes and inserts new suppliers. It sends a signal to InventorySuppliers when done (always for now). Refresh the table still doesn't work. Added a missing iconn in the Inventory menus dropdown.
Michiel Broek <mbroek@mbse.eu>
parents:
10
diff
changeset
|
96 | dialog.exec(); |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
97 | } |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
98 | |
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
99 | |
9
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
100 | void InventorySuppliers::on_editButton_clicked() |
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
101 | { |
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
102 | QPushButton *pb = qobject_cast<QPushButton *>(QObject::sender()); |
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
103 | int recno = pb->objectName().toInt(); |
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
104 | qDebug() << Q_FUNC_INFO << recno; |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
105 | edit(recno); |
9
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
106 | } |
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
107 | |
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
108 | |
8
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
109 | void InventorySuppliers::on_insertButton_clicked() |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
110 | { |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
111 | qDebug() << Q_FUNC_INFO; |
10
8aa2bd9ba9e8
Added the EditSupplier popup window. It is now ready to validate the form data.
Michiel Broek <mbroek@mbse.eu>
parents:
9
diff
changeset
|
112 | edit(-1); |
8
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
113 | } |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
114 | |
ac4e363c09a7
The table screen is more or less complete.
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
115 | |
9
85656dc48131
The Edit buttons include the record number in the database. Ready to build the modal supplier edit/insert/delete screen.
Michiel Broek <mbroek@mbse.eu>
parents:
8
diff
changeset
|
116 | void InventorySuppliers::on_quitButton_clicked() |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
117 | { |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
118 | emit firstWindow(); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
119 | } |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
120 |