~canonical-dx-team/sni-qt/trunk

« back to all changes in this revision

Viewing changes to tests/manual/window.cpp

  • Committer: Aurelien Gateau
  • Date: 2011-09-22 09:12:49 UTC
  • Revision ID: aurelien.gateau@canonical.com-20110922091249-mkq3mjb11sumc41b
Quit when window is closed

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
}
92
92
//! [1]
93
93
 
94
 
//! [2]
95
 
void Window::closeEvent(QCloseEvent *event)
96
 
{
97
 
    if (trayIcon->isVisible()) {
98
 
        QMessageBox::information(this, tr("Systray"),
99
 
                                 tr("The program will keep running in the "
100
 
                                    "system tray. To terminate the program, "
101
 
                                    "choose <b>Quit</b> in the context menu "
102
 
                                    "of the system tray entry."));
103
 
        hide();
104
 
        event->ignore();
105
 
    }
106
 
}
107
 
//! [2]
108
 
 
109
94
//! [3]
110
95
void Window::setIconFromComboBox(int index)
111
96
{