From kde-commits Sun May 04 14:38:25 2008 From: Jason Harris Date: Sun, 04 May 2008 14:38:25 +0000 To: kde-commits Subject: KDE/kdeedu/kstars/kstars/tools Message-Id: <1209911905.683640.29154.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120991191723860 SVN commit 803937 by harris: Conjunction tool improvements: Use QListWidget::clear() to clear the OutputView. Friendlier date/Time formatting CCMAIL: kstars-devel@kde.org M +8 -7 conjunctions.cpp --- trunk/KDE/kdeedu/kstars/kstars/tools/conjunctions.cpp #803936:803937 @@ -126,16 +126,17 @@ KStarsDateTime dt; QMap::Iterator it; - // TODO: Find a better way to clear the OutputView QListWidget - QList::Iterator qlit; - QList rowlist = OutputView -> findItems("", Qt::MatchContains); // Dirty way to get the whole list of items - for(qlit = rowlist.begin(); qlit != rowlist.end(); ++qlit) { - OutputView -> removeItemWidget(*qlit); - } + OutputView->clear(); +// // TODO: Find a better way to clear the OutputView QListWidget +// QList::Iterator qlit; +// QList rowlist = OutputView -> findItems("", Qt::MatchContains); // Dirty way to get the whole list of items +// for(qlit = rowlist.begin(); qlit != rowlist.end(); ++qlit) { +// OutputView -> removeItemWidget(*qlit); +// } for(it = conjunctionlist.begin(); it != conjunctionlist.end(); ++it) { dt.setDJD( it.key() ); - OutputView -> addItem(i18n("Conjunction on ") + dt.toString() + i18n(" : Separation is ") + it.data().toDMSString()); + OutputView -> addItem( i18n("Conjunction on %1 UT: Separation is %2", dt.toString("%a, %d %b %Y %H:%M"), it.data().toDMSString()) ); } }