this, SLOT(zoomIn()));
connect(controller, SIGNAL(zoomOut()),
this, SLOT(zoomOut()));
- connect(controller, SIGNAL(showHiddenFilesChanged(bool)),
- this, SLOT(slotShowHiddenFilesChanged(bool)));
+ connect(controller->dolphinView(), SIGNAL(showHiddenFilesChanged()),
+ this, SLOT(slotShowHiddenFilesChanged()));
connect(controller, SIGNAL(showPreviewChanged(bool)),
this, SLOT(slotShowPreviewChanged(bool)));
connect(controller, SIGNAL(activationChanged(bool)),
}
}
-void DolphinColumnView::slotShowHiddenFilesChanged(bool show)
+void DolphinColumnView::slotShowHiddenFilesChanged()
{
+ const bool show = m_controller->dolphinView()->showHiddenFiles();
foreach (DolphinColumnWidget* column, m_columns) {
column->setShowHiddenFiles(show);
}
*/
void updateColumnsBackground(bool active);
- void slotShowHiddenFilesChanged(bool show);
+ void slotShowHiddenFilesChanged();
void slotShowPreviewChanged(bool show);
private:
m_dirLister->setAutoUpdate(true);
m_dirLister->setMainWindow(this);
m_dirLister->setDelayedMimeTypes(true);
- m_dirLister->setShowingDotFiles(m_view->m_controller->showHiddenFiles());
+ const bool showHiddenFiles = m_view->m_controller->dolphinView()->showHiddenFiles();
+ m_dirLister->setShowingDotFiles(showHiddenFiles);
connect(m_dirLister, SIGNAL(newItems(const KFileItemList&)),
this, SLOT(generatePreviews(const KFileItemList&)));
DolphinController::DolphinController(DolphinView* dolphinView) :
QObject(dolphinView),
- m_showHiddenFiles(false),
m_showPreview(false),
m_zoomInPossible(false),
m_zoomOutPossible(false),
-//m_additionalInfoCount(0),
m_url(),
m_dolphinView(dolphinView)
{
emit additionalInfoChanged(info);
}
-void DolphinController::setShowHiddenFiles(bool show)
-{
- if (m_showHiddenFiles != show) {
- m_showHiddenFiles = show;
- emit showHiddenFilesChanged(show);
- }
-}
-
void DolphinController::setShowPreview(bool show)
{
if (m_showPreview != show) {
}
}
-/*void DolphinController::setAdditionalInfoCount(int count)
-{
- if (m_additionalInfoCount != count) {
- m_additionalInfoCount = count;
- emit additionalInfoCountChanged(count);
- }
-}*/
-
void DolphinController::indicateActivationChange(bool active)
{
emit activationChanged(active);
* - setUrl()
* - setShowHiddenFiles()
* - setShowPreview()
- * - setAdditionalInfoCount()
* - indicateActivationChange()
* - triggerZoomIn()
* - triggerZoomOut()
*/
void indicateAdditionalInfoChange(const KFileItemDelegate::InformationList& info);
- /**
- * Informs the view implementation about a change of the show hidden files
- * state and is invoked by the abstract Dolphin view.
- * The signal showHiddenFilesChanged() is emitted.
- */
- void setShowHiddenFiles(bool show);
- bool showHiddenFiles() const;
-
/**
* Informs the view implementation about a change of the show preview
* state and is invoked by the abstract Dolphin view.
void setShowPreview(bool show);
bool showPreview() const;
- /**
- * Informs the view implementation about a change of the number of
- * additional informations and is invoked by the abstract Dolphin view.
- * The signal additionalInfoCountChanged() is emitted.
- */
- //void setAdditionalInfoCount(int count);
- //bool additionalInfoCount() const;
-
/**
* Informs the view implementation about a change of the activation
* state and is invoked by the abstract Dolphin view. The signal
*/
void additionalInfoChanged(const KFileItemDelegate::InformationList& info);
- /**
- * Is emitted if the state for showing hidden files has been
- * changed to \a show by the abstract Dolphin view. The view
- * implementation might connect to this signal if custom
- * updates are required in this case.
- */
- void showHiddenFilesChanged(bool show);
-
/**
* Is emitted if the state for showing previews has been
* changed to \a show by the abstract Dolphin view.
*/
void showPreviewChanged(bool show);
- /**
- * Is emitted if the number of additional informations has been
- * changed to \a count by the abstract Dolphin view.
- * The view implementation might connect to this signal if custom
- * updates are required in this case.
- */
- //void additionalInfoCountChanged(int count);
-
/**
* Is emitted if the activation state has been changed to \a active
* by the abstract Dolphin view.
void zoomOut();
private:
- bool m_showHiddenFiles;
bool m_showPreview;
bool m_zoomInPossible;
bool m_zoomOutPossible;
- //int m_additionalInfoCount;
KUrl m_url;
DolphinView* m_dolphinView;
};
return m_url;
}
-inline bool DolphinController::showHiddenFiles() const
-{
- return m_showHiddenFiles;
-}
-
inline bool DolphinController::showPreview() const
{
return m_showPreview;
}
-/*inline bool DolphinController::additionalInfoCount() const
-{
- return m_additionalInfoCount;
-}*/
-
inline void DolphinController::setZoomInPossible(bool possible)
{
m_zoomInPossible = possible;
props.setShowHiddenFiles(show);
m_dirLister->setShowingDotFiles(show);
- m_controller->setShowHiddenFiles(show);
emit showHiddenFilesChanged();
loadDirectory(viewPropsUrl, true);
const bool showHiddenFiles = props.showHiddenFiles();
if (showHiddenFiles != m_dirLister->showingDotFiles()) {
m_dirLister->setShowingDotFiles(showHiddenFiles);
- m_controller->setShowHiddenFiles(showHiddenFiles);
emit showHiddenFilesChanged();
}