add notes tab

This commit is contained in:
tobtoht
2025-03-26 10:06:48 +01:00
parent 480ebc29ba
commit 19b78b9c70
4 changed files with 44 additions and 0 deletions
+11
View File
@@ -251,6 +251,12 @@ void MainWindow::initWidgets() {
ui->tabWidget->setCurrentIndex(this->findTab("Send"));
});
// [Notes]
ui->notes->setPlainText(m_wallet->getCacheAttribute("wallet.notes"));
connect(ui->notes, &QPlainTextEdit::textChanged, [this] {
m_wallet->setCacheAttribute("wallet.notes", ui->notes->toPlainText());
});
// [Plugins..]
for (auto* plugin : m_plugins) {
if (!plugin->hasParent()) {
@@ -339,6 +345,11 @@ void MainWindow::initMenu() {
m_tabShowHideMapper["Contacts"] = new ToggleTab(ui->tabContacts, "Contacts", "Contacts", ui->actionShow_Contacts, this);
m_tabShowHideSignalMapper->setMapping(ui->actionShow_Contacts, "Contacts");
// Show/Hide Notes
connect(ui->actionShow_Notes, &QAction::triggered, m_tabShowHideSignalMapper, QOverload<>::of(&QSignalMapper::map));
m_tabShowHideMapper["Notes"] = new ToggleTab(ui->tabNotes, "Notes", "Notes", ui->actionShow_Notes, this);
m_tabShowHideSignalMapper->setMapping(ui->actionShow_Notes, "Notes");
// Show/Hide Plugins..
for (const auto &plugin : m_plugins) {
if (plugin->parent() != "") {