comparison gui/src/FilesDockWidget.cpp @ 13577:e440b3f32f02

Fixed bug with closing subwindows.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 01 Aug 2011 18:51:36 +0200
parents 807e5e9b7591
children ee49f1a15c06
comparison
equal deleted inserted replaced
13576:11fcb7094945 13577:e440b3f32f02
95 connect (m_currentDirectory, SIGNAL (returnPressed ()), this, 95 connect (m_currentDirectory, SIGNAL (returnPressed ()), this,
96 SLOT (currentDirectoryEntered ())); 96 SLOT (currentDirectoryEntered ()));
97 QCompleter * 97 QCompleter *
98 completer = new QCompleter (m_fileSystemModel, this); 98 completer = new QCompleter (m_fileSystemModel, this);
99 m_currentDirectory->setCompleter (completer); 99 m_currentDirectory->setCompleter (completer);
100
101 connect (this, SIGNAL (visibilityChanged(bool)), this, SLOT(handleVisibilityChanged(bool)));
100 } 102 }
101 103
102 void 104 void
103 FilesDockWidget::itemDoubleClicked (const QModelIndex & index) 105 FilesDockWidget::itemDoubleClicked (const QModelIndex & index)
104 { 106 {
178 m_fileTreeView->setColumnHidden (3, !settings->value ("showLastModified").toBool ()); 180 m_fileTreeView->setColumnHidden (3, !settings->value ("showLastModified").toBool ());
179 m_fileTreeView->setAlternatingRowColors (settings->value ("useAlternatingRowColors").toBool ()); 181 m_fileTreeView->setAlternatingRowColors (settings->value ("useAlternatingRowColors").toBool ());
180 //if (settings.value ("showHiddenFiles").toBool ()) 182 //if (settings.value ("showHiddenFiles").toBool ())
181 // TODO: React on option for hidden files. 183 // TODO: React on option for hidden files.
182 } 184 }
185
186 void
187 FilesDockWidget::handleVisibilityChanged (bool visible)
188 {
189 if (visible)
190 emit activeChanged (true);
191 }
192
193 void
194 FilesDockWidget::closeEvent (QCloseEvent *event)
195 {
196 emit activeChanged (false);
197 QDockWidget::closeEvent (event);
198 }