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

Method toggleVisible

nixnote.cpp:2810–2836  ·  view source on GitHub ↗

Toggle the window visibility. Used when closing to the tray.

Source from the content-addressed store, hash-verified

2808//* the tray.
2809//************************************************************
2810void NixNote::toggleVisible() {
2811 if (minimizeToTray || closeToTray) {
2812 if (isMinimized() || !isVisible()) {
2813 setWindowState(Qt::WindowActive) ;
2814 this->show();
2815 this->raise();
2816 this->showNormal();
2817 this->activateWindow();
2818 this->setFocus();
2819 return;
2820 } else {
2821 showMinimized();
2822 this->setHidden(true);
2823 return;
2824 }
2825 } else {
2826 if (isMinimized()) {
2827 setWindowState(Qt::WindowActive);
2828 this->showNormal();
2829 this->setFocus();
2830 return;
2831 } else {
2832 this->showMinimized();
2833 return;
2834 }
2835 }
2836}
2837
2838
2839

Callers 2

eventMethod · 0.95

Calls 1

showMethod · 0.80

Tested by

no test coverage detected