mirror of
https://github.com/feather-wallet/feather.git
synced 2025-04-24 05:08:12 +00:00
add notes tab
This commit is contained in:
parent
480ebc29ba
commit
19b78b9c70
4 changed files with 44 additions and 0 deletions
src
|
@ -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() != "") {
|
||||
|
|
|
@ -169,6 +169,32 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabNotes">
|
||||
<attribute name="icon">
|
||||
<iconset resource="assets.qrc">
|
||||
<normaloff>:/assets/images/tab_notes.png</normaloff>:/assets/images/tab_notes.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string>Notes</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="notes"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -587,6 +613,7 @@
|
|||
<addaction name="actionPlaceholderBegin"/>
|
||||
<addaction name="actionShow_Coins"/>
|
||||
<addaction name="actionShow_Contacts"/>
|
||||
<addaction name="actionShow_Notes"/>
|
||||
<addaction name="actionPlaceholderEnd"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionShow_Searchbar"/>
|
||||
|
@ -962,6 +989,11 @@
|
|||
<string>Show Contacts</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Notes">
|
||||
<property name="text">
|
||||
<string>Show Notes</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
<file>assets/images/tab_contacts.png</file>
|
||||
<file>assets/images/tab_history.png</file>
|
||||
<file>assets/images/tab_home.png</file>
|
||||
<file>assets/images/tab_notes.png</file>
|
||||
<file>assets/images/tab_party.png</file>
|
||||
<file>assets/images/tab_receive.png</file>
|
||||
<file>assets/images/tab_send.png</file>
|
||||
|
|
BIN
src/assets/images/tab_notes.png
Normal file
BIN
src/assets/images/tab_notes.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 5.5 KiB |
Loading…
Reference in a new issue