MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / checkLeftPanelSeparators

Method checkLeftPanelSeparators

nixnote.cpp:3737–3781  ·  view source on GitHub ↗

This function will show/hide all of the separators between the trees on the left side of the gui.

Source from the content-addressed store, hash-verified

3735// This function will show/hide all of the separators between the trees on the left side
3736// of the gui.
3737void NixNote::checkLeftPanelSeparators() {
3738 bool s1 = false;
3739 bool s2 = false;
3740 bool s3 = false;
3741 bool s4 = false;
3742 bool s5 = false;
3743
3744 bool tags;
3745 bool notebooks;
3746 bool favorites;
3747 bool searches;
3748 bool attributes;
3749 bool trash;
3750
3751 global.settings->beginGroup("SaveState");
3752 favorites = global.settings->value("favoritesTreeVisible", true).toBool();
3753 notebooks = global.settings->value("notebookTreeVisible",true).toBool();
3754 tags = global.settings->value("tagTreeVisible", true).toBool();
3755 searches = global.settings->value("savedSearchTreeVisible", true).toBool();
3756 attributes = global.settings->value("attributeTreeVisible", true).toBool();
3757 trash = global.settings->value("trashTreeVisible", true).toBool();
3758 global.settings->endGroup();
3759
3760 if (favorites && (notebooks || tags || searches || attributes || trash)) {
3761 s1=true;
3762 }
3763 if (notebooks && (tags || searches || attributes || trash)) {
3764 s2=true;
3765 }
3766 if (tags && (searches || attributes || trash)) {
3767 s3=true;
3768 }
3769 if (searches && (attributes || trash)) {
3770 s4=true;
3771 }
3772 if (attributes && trash) {
3773 s5=true;
3774 }
3775
3776 leftSeparator1->setVisible(s1);
3777 leftSeparator2->setVisible(s2);
3778 leftSeparator3->setVisible(s3);
3779 leftseparator4->setVisible(s4);
3780 leftSeparator5->setVisible(s5);
3781}
3782
3783
3784

Callers

nothing calls this directly

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected