[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars/tools
From:       Jason Harris <kstars () 30doradus ! org>
Date:       2008-05-04 14:38:25
Message-ID: 1209911905.683640.29154.nullmailer () svn ! kde ! org
[Download RAW message or body]

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<long double, dms>::Iterator it;
 
-  // TODO: Find a better way to clear the OutputView QListWidget
-  QList<QListWidgetItem *>::Iterator qlit;
-  QList<QListWidgetItem *> 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<QListWidgetItem *>::Iterator qlit;
+//   QList<QListWidgetItem *> 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()) );  }
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic