Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commitc9839607652d8b762f4ba7cbd142e4a682ec567e (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-30 20:43:29 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-30 20:43:29 +0300
Files5dbd9982ab59c87db4f6a836f37933e30de130be /src
FMI-OOP-P2_Tables-c9839607652d8b762f4ba7cbd142e4a682ec567e.tar
FMI-OOP-P2_Tables-c9839607652d8b762f4ba7cbd142e4a682ec567e.tar.gz
FMI-OOP-P2_Tables-c9839607652d8b762f4ba7cbd142e4a682ec567e.zip
Parent00bea258e12e4481c50c2e275243e9dfeaeee9ca (diff)
Autocommit at 30.05.2022 @ 20:43
4 files changed, 14 insertions, 12 deletions
-rw-r--r--src/UserInterface/UserInterface.cpp5
-rw-r--r--src/UserInterface/UserInterface.h2
-rw-r--r--src/backup.table5
-rw-r--r--src/main.cpp14
diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp
index 015e77f..f64b1f2 100644
--- a/src/UserInterface/UserInterface.cpp
+++ b/src/UserInterface/UserInterface.cpp
@@ -124,10 +124,7 @@ void UserInterface::com_edit(const char* params) {
/* Public */
-UserInterface::UserInterface(Table* inTable) : menu() {
- if (table == nullptr)
- table = inTable;
-
+UserInterface::UserInterface() : menu() {
menu.addCommand(Command("open", com_open));
menu.addCommand(Command("close", com_close));
menu.addCommand(Command("save", com_save));
diff --git a/src/UserInterface/UserInterface.h b/src/UserInterface/UserInterface.h
index 61d0dda..9da8754 100644
--- a/src/UserInterface/UserInterface.h
+++ b/src/UserInterface/UserInterface.h
@@ -23,7 +23,7 @@ class UserInterface {
static void com_edit(const char* params);
public:
- UserInterface(Table* table);
+ UserInterface();
void run();
};
diff --git a/src/backup.table b/src/backup.table
new file mode 100644
index 0000000..147e7e9
--- /dev/null
+++ b/src/backup.table
@@ -0,0 +1,5 @@
+8.6,3,"String","= 3 * R0C1 + R0C0 ^ R0C1 * 27 / R0C1 - 2 * 2.5 * 2 * 2 + R0C2 ^ R0C2",,
+,,,,,
+,,,,,
+,,,,,
+,,,,,
diff --git a/src/main.cpp b/src/main.cpp
index 0f47890..a14647f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,12 +1,12 @@
#include "UserInterface/UserInterface.h"
int main() {
- Table table(5, 5);
- table.putCell(0, 0, "8.6");
- table.putCell(0, 1, "0");
- table.putCell(0, 2, "\"String");
- table.putCell(0, 3, "\"= 3 * R0C1 + R0C0 ^ R0C1 * 27 / R0C1 - 2 * 2.5 * 2 * 2 + R0C2 ^ R0C2 + R9999C999999");
- // table.putCell(0, 3, "= 1 + 2 * 3 + 4 + 5");
- UserInterface ui(&table);
+ // Table table(5, 5);
+ // table.putCell(0, 0, "8.6");
+ // table.putCell(0, 1, "0");
+ // table.putCell(0, 2, "\"String");
+ // table.putCell(0, 3, "\"= 3 * R0C1 + R0C0 ^ R0C1 * 27 / R0C1 - 2 * 2.5 * 2 * 2 + R0C2 ^ R0C2 + R9999C999999");
+ // // table.putCell(0, 3, "= 1 + 2 * 3 + 4 + 5");
+ UserInterface ui;
ui.run();
}