From 8f219472016d0a93b4e59d5f958b61f1c62dd7df Mon Sep 17 00:00:00 2001 From: cramdal Date: Wed, 1 Jun 2005 13:29:58 +0000 Subject: [PATCH] Fix UI Add a date filter Change the date format in the listview git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork@420815 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/plugins/history/historydialog.cpp | 10 +- kopete/plugins/history/historyviewer.ui | 155 ++++++++++++++++--------------- 2 files changed, 89 insertions(+), 76 deletions(-) diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index dcd01a3a3..c57ebac5e 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -70,7 +70,7 @@ private: KListViewDateItem::KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc) - : KListViewItem(parent, date.toString(), mc->displayName()) + : KListViewItem(parent, date.toString(Qt::LocalDate), mc->displayName()) { mDate = date; mMetaContact = mc; @@ -122,6 +122,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, if (mMetaContact) mMainWidget->contactComboBox->setCurrentItem(mMetaContactList.find(mMetaContact)+1); + mMainWidget->dateSearchLine->setListView(mMainWidget->dateListView); + setMainWidget(mMainWidget); // Initializing HTML Part @@ -202,7 +204,8 @@ void HistoryDialog::slotLoadDays() if(mInit.dateMCList.isEmpty()) { if (!mMainWidget->searchLine->text().isEmpty()) - QTimer::singleShot(0, this, SLOT(slotSearch())); + QTimer::singleShot(0, this, SLOT(slotSearch())); + doneProgressBar(); return; } @@ -302,7 +305,7 @@ void HistoryDialog::dateSelected(QListViewItem* it) if (!item) return; - QDate chosenDate = QDate::fromString(item->text(0)); + QDate chosenDate = item->date(); mLogger= new HistoryLogger(item->metaContact(), this); QValueList msgs=mLogger->readMessages(chosenDate); @@ -381,6 +384,7 @@ void HistoryDialog::slotSearchTextChanged(const QString& searchText) if (searchText.isEmpty()) { mMainWidget->searchButton->setEnabled(false); + slotSearchErase(); } else { diff --git a/kopete/plugins/history/historyviewer.ui b/kopete/plugins/history/historyviewer.ui index 354b85691..e4d53eeba 100644 --- a/kopete/plugins/history/historyviewer.ui +++ b/kopete/plugins/history/historyviewer.ui @@ -33,7 +33,7 @@ unnamed - + layout3 @@ -62,7 +62,7 @@ - + layout6 @@ -101,7 +101,7 @@ - + layout8 @@ -169,85 +169,93 @@ - + - splitter3 + htmlFrame - - Horizontal + + + 7 + 5 + 0 + 0 + - - - - Date - - - true - - - true - - - - - Contact - - - true - - - true - - - - dateListView - - - - 5 - 7 - 0 - 0 - - - - - 0 - 0 - - - - false - - - false + + + 0 + 0 + + + + WinPanel + + + Sunken + + + + + + Date - - - - htmlFrame + + true - - - 7 - 5 - 0 - 0 - + + true - - - 0 - 0 - + + + + Contact - - WinPanel + + true - - Sunken + + true - + + + dateListView + + + + 5 + 7 + 0 + 0 + + + + + 0 + 0 + + + + false + + + false + + + + + dateSearchLine + + + true + + + + 1 + 0 + 0 + 0 + + @@ -259,5 +267,6 @@ kcombobox.h klineedit.h klistview.h + klistviewsearchline.h -- 2.11.4.GIT