[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kalarm
From: David Jarvie <software () astrojar ! org ! uk>
Date: 2008-05-05 22:19:10
Message-ID: 1210025950.131690.12962.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 804422 by djarvie:
Don't hide Find dialogue after OK is clicked
M +25 -1 find.cpp
M +3 -2 find.h
--- trunk/KDE/kdepim/kalarm/find.cpp #804421:804422
@@ -40,6 +40,7 @@
#include "preferences.h"
#include "find.moc"
+#warning Search for text, then '29', then '2', reverts to text
// KAlarm-specific options for Find dialog
enum {
FIND_LIVE = KFind::MinimumUserOption,
@@ -52,6 +53,22 @@
static long FIND_KALARM_OPTIONS = FIND_LIVE | FIND_ARCHIVED | FIND_MESSAGE | \
FIND_FILE | FIND_COMMAND | FIND_EMAIL;
+class FindDlg : public KFindDialog
+{
+ public:
+ FindDlg(QWidget* parent, long options = 0, const QStringList& findStrings = \
QStringList(), bool hasSelection = false) + : KFindDialog(parent, options, \
findStrings, hasSelection) {} + protected slots:
+ void slotButtonClicked(int button)
+ {
+ if (button == Ok)
+ emit okClicked();
+ else
+ KFindDialog::slotButtonClicked(button);
+ }
+};
+
+
Find::Find(EventListView* parent)
: QObject(parent),
mListView(parent),
@@ -59,6 +76,7 @@
mFind(0),
mOptions(0)
{
+ connect(mListView->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const \
QModelIndex&)), SLOT(slotSelectionChanged())); }
Find::~Find()
@@ -68,6 +86,12 @@
mFind = 0;
}
+void Find::slotSelectionChanged()
+{
+ if (mDialog)
+ mDialog->setHasCursor(mListView->selectionModel()->currentIndex().isValid());
+}
+
/******************************************************************************
* Display the Find dialog.
*/
@@ -90,7 +114,7 @@
}
else
{
- mDialog = new KFindDialog(mListView, mOptions, mHistory, \
(mListView->selectionModel()->selectedRows().count() > 1)); + mDialog = new \
FindDlg(mListView, mOptions, mHistory, \
(mListView->selectionModel()->selectedRows().count() > 1)); \
mDialog->setModal(false); mDialog->setObjectName("FindDlg");
mDialog->setHasSelection(false);
--- trunk/KDE/kdepim/kalarm/find.h #804421:804422
@@ -27,7 +27,7 @@
#include <QModelIndex>
class QCheckBox;
-class KFindDialog;
+class FindDlg;
class KFind;
class KSeparator;
class EventListView;
@@ -48,13 +48,14 @@
private slots:
void slotFind();
void slotKFindDestroyed() { emit active(false); }
+ void slotSelectionChanged();
private:
void findNext(bool forward, bool checkEnd, bool fromCurrent);
QModelIndex nextItem(const QModelIndex&, bool forward) const;
EventListView* mListView; // parent list view
- QPointer<KFindDialog> mDialog;
+ QPointer<FindDlg> mDialog;
QCheckBox* mArchived;
QCheckBox* mLive;
KSeparator* mActiveArchivedSep;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic