[kde-doc-english] [kde-runtime] nepomuk/kcm: Nepomuk KCM: Add a button to check for new files and changes
Gabriel Poesia
gabriel.poesia at gmail.com
Sat Dec 29 17:46:14 UTC 2012
Git commit 36ca51b1c895a0b0cdba56fed9d1d0b005252678 by Gabriel Poesia.
Committed on 29/12/2012 at 18:28.
Pushed by poesia into branch 'master'.
Nepomuk KCM: Add a button to check for new files and changes
Add a new button in the Nepomuk KCM's Advanced Settings tab. When
clicked, the button forces the indexer to check for new files in the
folders marked for indexing. This adds a greater sense of control to the
user. A new QGroupBox was added as well, with the title "Actions". In
the future, there will be more commands like this available there.
BUG: 303658
REVIEW: 107553
GUI: New button and button group in the Nepomuk KCM
M +54 -0 nepomuk/kcm/nepomukconfigwidget.ui
M +6 -0 nepomuk/kcm/nepomukserverkcm.cpp
M +1 -0 nepomuk/kcm/nepomukserverkcm.h
http://commits.kde.org/kde-runtime/36ca51b1c895a0b0cdba56fed9d1d0b005252678
diff --git a/nepomuk/kcm/nepomukconfigwidget.ui b/nepomuk/kcm/nepomukconfigwidget.ui
index 3534213..88a7f56 100644
--- a/nepomuk/kcm/nepomukconfigwidget.ui
+++ b/nepomuk/kcm/nepomukconfigwidget.ui
@@ -3,6 +3,14 @@
<author>Sebastian Trueg</author>
<class>NepomukConfigWidget</class>
<widget class="QWidget" name="NepomukConfigWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>427</width>
+ <height>359</height>
+ </rect>
+ </property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<property name="margin">
<number>0</number>
@@ -569,6 +577,52 @@
</item>
</layout>
</item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_5">
+ <property name="title">
+ <string>Actions</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <spacer name="horizontalSpacer_6">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="m_buttonCheckForNewFiles">
+ <property name="text">
+ <string>Check for New Files</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/nepomuk/kcm/nepomukserverkcm.cpp b/nepomuk/kcm/nepomukserverkcm.cpp
index e27a6a2..0b27a65 100644
--- a/nepomuk/kcm/nepomukserverkcm.cpp
+++ b/nepomuk/kcm/nepomukserverkcm.cpp
@@ -144,6 +144,8 @@ Nepomuk2::ServerConfigModule::ServerConfigModule( QWidget* parent, const QVarian
this, SLOT( slotAdvancedFileIndexing() ) );
connect( m_buttonDetails, SIGNAL( leftClickedUrl() ),
this, SLOT( slotStatusDetailsClicked() ) );
+ connect( m_buttonCheckForNewFiles, SIGNAL( clicked() ),
+ this, SLOT( slotUpdateAllFolders() ) );
connect( m_checkboxAudio, SIGNAL(toggled(bool)),
this, SLOT(slotCheckBoxesChanged()) );
@@ -583,5 +585,9 @@ void Nepomuk2::ServerConfigModule::slotCheckBoxesChanged()
changed( true );
}
+void Nepomuk2::ServerConfigModule::slotUpdateAllFolders()
+{
+ m_fileIndexerInterface->updateAllFolders( true );
+}
#include "nepomukserverkcm.moc"
diff --git a/nepomuk/kcm/nepomukserverkcm.h b/nepomuk/kcm/nepomukserverkcm.h
index c8f9a6b..7bfee3c 100644
--- a/nepomuk/kcm/nepomukserverkcm.h
+++ b/nepomuk/kcm/nepomukserverkcm.h
@@ -59,6 +59,7 @@ namespace Nepomuk2 {
void slotBackupFrequencyChanged();
void slotManualBackup();
void slotRestoreBackup();
+ void slotUpdateAllFolders();
/**
* This slot is called when any of the "index documents", "index whatever" checkboxes
More information about the kde-doc-english
mailing list