diff options
| author | Peter Penz <[email protected]> | 2009-08-29 09:42:21 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-29 09:42:21 +0000 |
| commit | c05395ef9a6f449bd96b4323d308b53d70cede99 (patch) | |
| tree | ee8b6db0d0b07a7439b95395cbce0429c17ef635 /src/viewextensionsfactory.h | |
| parent | e1c74b05fdae664aa9211cba3afb7993b51ec23b (diff) | |
Move code for initializing and handling view extensions to the new class ViewExtensionsFactory. Beside making DolphinView less complex this will allow the column view to share the view extension code instead of (partly) duplicating it as it has been done before.
Currently only the tooltips- and filepreview-handling have been moved into ViewExtensionsFactory, a further cleanup will be done later.
svn path=/trunk/KDE/kdebase/apps/; revision=1016893
Diffstat (limited to 'src/viewextensionsfactory.h')
| -rw-r--r-- | src/viewextensionsfactory.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/viewextensionsfactory.h b/src/viewextensionsfactory.h new file mode 100644 index 000000000..dd819249b --- /dev/null +++ b/src/viewextensionsfactory.h @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2009 by Peter Penz <[email protected]> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef VIEWEXTENSIONSFACTORY_H +#define VIEWEXTENSIONSFACTORY_H + +#include <QObject> + +class DolphinController; +class KFilePreviewGenerator; +class ToolTipManager; +class QAbstractItemView; + +class ViewExtensionsFactory : public QObject +{ + Q_OBJECT + + public: + explicit ViewExtensionsFactory(QAbstractItemView* view, + DolphinController* controller); + virtual ~ViewExtensionsFactory(); + + private slots: + /** + * Tells the preview generator to update all icons. + */ + void updateIcons(); + + /** + * Tells the preview generator to cancel all pending previews. + */ + void cancelPreviews(); + + void slotShowPreviewChanged(); + + private: + DolphinController* m_controller; + ToolTipManager* m_toolTipManager; + KFilePreviewGenerator* m_previewGenerator; +}; + +#endif + |
