Toggle the window visibility. Used when closing to the tray.
| 2808 | //* the tray. |
| 2809 | //************************************************************ |
| 2810 | void 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 |
no test coverage detected