#include "informationpanelcontent.h"
+#define HAVE_KDIRNOTIFY __has_include(<KDirNotify>)
+#if HAVE_KDIRNOTIFY
#include <KDirNotify>
-#include <KIO/Job>
+#endif
+#include <KIO/StatJob>
#include <KJobWidgets>
#include <KLocalizedString>
showHoveredAction->setCheckable(true);
showHoveredAction->setChecked(InformationPanelSettings::showHovered());
- QAction *configureAction = popup.addAction(i18nc("@action:inmenu", "Configure..."));
+ QAction *configureAction = popup.addAction(i18nc("@action:inmenu", "Configure…"));
configureAction->setIcon(QIcon::fromTheme(QStringLiteral("configure")));
if (m_inConfigurationMode) {
configureAction->setEnabled(false);
m_resetUrlTimer->start();
}
+void InformationPanel::readSettings()
+{
+ if (m_initialized) {
+ m_content->refreshPreview();
+ m_content->refreshMetaData();
+ }
+}
+
void InformationPanel::init()
{
m_infoTimer = new QTimer(this);
Q_ASSERT(m_urlChangedTimer->interval() < m_infoTimer->interval());
Q_ASSERT(m_urlChangedTimer->interval() < m_resetUrlTimer->interval());
+#if HAVE_KDIRNOTIFY
org::kde::KDirNotify *dirNotify = new org::kde::KDirNotify(QString(), QString(), QDBusConnection::sessionBus(), this);
connect(dirNotify, &OrgKdeKDirNotifyInterface::FileRenamed, this, &InformationPanel::slotFileRenamed);
connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesAdded, this, &InformationPanel::slotFilesAdded);
connect(dirNotify, &OrgKdeKDirNotifyInterface::FilesRemoved, this, &InformationPanel::slotFilesRemoved);
connect(dirNotify, &OrgKdeKDirNotifyInterface::enteredDirectory, this, &InformationPanel::slotEnteredDirectory);
connect(dirNotify, &OrgKdeKDirNotifyInterface::leftDirectory, this, &InformationPanel::slotLeftDirectory);
+#endif
m_content = new InformationPanelContent(this);
connect(m_content, &InformationPanelContent::urlActivated, this, &InformationPanel::urlActivated);
m_initialized = true;
}
+
+#include "moc_informationpanel.cpp"