/***************************************************************************
- * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at>
+ * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
* *
* 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 *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
-#ifndef _INFOSIDEBARPAGE_H_
-#define _INFOSIDEBARPAGE_H_
+#ifndef INFOSIDEBARPAGE_H
+#define INFOSIDEBARPAGE_H
#include <sidebarpage.h>
-#include <q3valuevector.h>
#include <qpushbutton.h>
-//Added by qt3to4:
#include <QPixmap>
#include <QEvent>
#include <QLabel>
-#include <Q3PtrList>
+#include <QList>
#include <kurl.h>
#include <kmimetype.h>
-#include <kdedesktopmimetype.h>
+#include <kdesktopfileactions.h>
#include <kvbox.h>
-namespace KIO {
- class Job;
+namespace KIO
+{
+class Job;
}
class QPixmap;
class KFileItem;
class QLabel;
class KVBox;
-class Q3Grid;
class PixmapViewer;
+class MetaDataWidget;
/**
* @brief Prototype for a information sidebar.
*/
class InfoSidebarPage : public SidebarPage
{
- Q_OBJECT
+ Q_OBJECT
public:
- InfoSidebarPage(DolphinMainWindow* mainWindow, QWidget* parent=0);
+ explicit InfoSidebarPage(QWidget* parent = 0);
virtual ~InfoSidebarPage();
-protected:
- /** @see SidebarPage::activeViewChanged() */
- virtual void activeViewChanged();
+public slots:
+ void setUrl(const KUrl& url);
+ void setSelection(const KFileItemList& selection);
private slots:
/**
*/
void requestDelayedItemInfo(const KUrl& url);
- /**
- * Does a request of information for the item of the given Url and
- * provides default actions.
- *
- * @see InfoSidebarPage::showItemInfo()
- */
- void requestItemInfo(const KUrl& url);
-
/**
* Shows the information for the item of the Url which has been provided by
* InfoSidebarPage::requestItemInfo() and provides default actions.
private:
/**
- * Connects to signals from the currently active Dolphin view to get
- * informed about highlighting changes.
- */
- void connectToActiveView();
-
- /**
- * Checks whether the current Url is repesented by a bookmark. If yes,
+ * Checks whether the an Url is repesented by a bookmark. If yes,
* then the bookmark icon and name are shown instead of a preview.
* @return True, if the Url represents exactly a bookmark.
+ * @param url The url to check.
*/
- bool applyBookmark();
+ bool applyBookmark(const KUrl& url);
/** Assures that any pending item information request is cancelled. */
void cancelRequest();
QTimer* m_timer;
KUrl m_shownUrl;
KUrl m_urlCandidate;
+ KFileItemList m_currentSelection;
PixmapViewer* m_preview;
QLabel* m_name;
- int m_currInfoLineIdx;
- Q3Grid* m_infoGrid;
- Q3PtrList<QLabel> m_infoWidgets; // TODO: use children() from QObject instead
+ QString m_infoLines;
+ QLabel* m_infos;
KVBox* m_actionBox;
- Q3PtrList<QWidget> m_actionWidgets; // TODO: use children() from QObject instead
- Q3ValueVector<KDEDesktopMimeType::Service> m_actionsVector;
+ QVector<KDesktopFileActions::Service> m_actionsVector;
+
+ MetaDataWidget* m_metadataWidget;
};
// TODO #1: move to SidebarPage?
int m_index;
};
-#endif // _INFOSIDEBARPAGE_H_
+#endif // INFOSIDEBARPAGE_H