[Kst] extragear
David Jarvie
software at astrojar.org.uk
Tue Apr 10 21:03:20 CEST 2007
SVN commit 652351 by djarvie:
Add fancy date option to KLocale::formatDate(), KLocale::formatDateTime()
M +2 -2 graphics/digikam/digikam/albumfiletip.cpp
M +1 -1 graphics/digikam/digikam/albumiconitem.cpp
M +2 -2 graphics/digikam/digikam/kdateedit.cpp
M +2 -2 graphics/digikam/libs/imageproperties/cameraitempropertiestab.cpp
M +1 -1 graphics/digikam/libs/imageproperties/imagepropertiestab.cpp
M +1 -1 graphics/digikam/libs/thumbbar/thumbbar.cpp
M +1 -1 graphics/digikam/utilities/slideshow/slideshow.cpp
M +1 -1 graphics/kgraphviewer/src/printing/simpleprintingengine.cpp
M +3 -3 graphics/kphotoalbum/DateBar/ViewHandler.cpp
M +1 -1 graphics/kst/src/extdate/kstextdatepicker.cpp
M +1 -1 graphics/showimg/showimg/batchrenamer.cpp
M +1 -1 graphics/showimg/showimg/mainwindow.cpp
M +1 -1 libs/kipi-plugins/rawconverter/actionthread.cpp
M +2 -2 multimedia/amarok/src/tagdialog.cpp
M +1 -1 multimedia/kaffeine/src/input/dvb/kevents.cpp
M +1 -1 network/kchat/kchatmainwindow.cpp
M +1 -1 network/knemo/knemod/interfacestatisticsdialog.cpp
M +2 -2 office/datakiosk/datakiosk/src/dateedit.cpp
M +2 -2 office/datakiosk/src/dateedit.cpp
M +1 -1 office/kile/kile/quickdocumentdialog.cpp
M +1 -1 utils/kedit/kedit.cpp
M +2 -2 utils/krecipes/src/widgets/kdateedit.cpp
--- trunk/extragear/graphics/digikam/digikam/albumfiletip.cpp #652350:652351
@@ -350,7 +350,7 @@
if (settings->getToolTipsShowFileDate())
{
QDateTime modifiedDate = fileInfo.lastModified();
- str = KGlobal::locale()->formatDateTime(modifiedDate, true, true);
+ str = KGlobal::locale()->formatDateTime(modifiedDate, KLocale::ShortDate, true);
tip += cellBeg + i18n("Modified:") + cellMid + str + cellEnd;
}
@@ -432,7 +432,7 @@
{
if (photoInfo.dateTime.isValid())
{
- str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, true, true);
+ str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, KLocale::ShortDate, true);
if (str.length() > MAXSTRINGLEN) str = str.left(MAXSTRINGLEN-3) + "...";
metaStr += cellBeg + i18n("Created:") + cellMid + QStyleSheet::escape( str ) + cellEnd;
}
--- trunk/extragear/graphics/digikam/digikam/albumiconitem.cpp #652350:652351
@@ -75,7 +75,7 @@
static void dateToString(const QDateTime& datetime, QString& str)
{
- str = KGlobal::locale()->formatDateTime(datetime, true, false);
+ str = KGlobal::locale()->formatDateTime(datetime, KLocale::ShortDate, false);
}
AlbumIconItem::AlbumIconItem(IconGroupItem* parent, ImageInfo* info)
--- trunk/extragear/graphics/digikam/digikam/kdateedit.cpp #652350:652351
@@ -82,7 +82,7 @@
setMaxCount( 1 );
mDate = QDate::currentDate();
- QString today = KGlobal::locale()->formatDate( mDate, true );
+ QString today = KGlobal::locale()->formatDate( mDate, KLocale::ShortDate );
insertItem( today );
setCurrentItem( 0 );
@@ -364,7 +364,7 @@
{
QString dateString;
if ( mDate.isValid() )
- dateString = KGlobal::locale()->formatDate( mDate, true );
+ dateString = KGlobal::locale()->formatDate( mDate, KLocale::ShortDate );
// We do not want to generate a signal here,
// since we explicitly setting the date
--- trunk/extragear/graphics/digikam/libs/imageproperties/cameraitempropertiestab.cpp #652350:652351
@@ -345,7 +345,7 @@
QDateTime date;
date.setTime_t(itemInfo->mtime);
- d->labelFileDate->setText(KGlobal::locale()->formatDateTime(date, true, true));
+ d->labelFileDate->setText(KGlobal::locale()->formatDateTime(date, KLocale::ShortDate, true));
str = i18n("%1 (%2)").arg(KIO::convertSize(itemInfo->size))
.arg(KGlobal::locale()->formatNumber(itemInfo->size, 0));
@@ -465,7 +465,7 @@
if (photoInfo.dateTime.isValid())
{
- str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, true, true);
+ str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, KLocale::ShortDate, true);
d->labelPhotoDateTime->setText(str);
}
else
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiestab.cpp #652350:652351
@@ -361,7 +361,7 @@
d->labelFolder->setText(url.directory());
QDateTime modifiedDate = fileInfo.lastModified();
- str = KGlobal::locale()->formatDateTime(modifiedDate, true, true);
+ str = KGlobal::locale()->formatDateTime(modifiedDate, KLocale::ShortDate, true);
d->labelFileModifiedDate->setText(str);
str = QString("%1 (%2)").arg(KIO::convertSize(fi.size()))
--- trunk/extragear/graphics/digikam/libs/thumbbar/thumbbar.cpp #652350:652351
@@ -784,7 +784,7 @@
QDateTime date;
date.setTime_t(fileItem.time(KIO::UDS_MODIFICATION_TIME));
tipText += cellBeg + i18n("Modification Date:") + cellMid +
- KGlobal::locale()->formatDateTime(date, true, true)
+ KGlobal::locale()->formatDateTime(date, KLocale::ShortDate, true)
+ cellEnd;
tipText += cellBeg + i18n("Size:") + cellMid;
--- trunk/extragear/graphics/digikam/utilities/slideshow/slideshow.cpp #652350:652351
@@ -403,7 +403,7 @@
{
if (photoInfo.dateTime.isValid())
{
- str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, true, true);
+ str = KGlobal::locale()->formatDateTime(photoInfo.dateTime, KLocale::ShortDate, true);
printInfoText(p, offset, str);
}
}
--- trunk/extragear/graphics/kgraphviewer/src/printing/simpleprintingengine.cpp #652350:652351
@@ -178,7 +178,7 @@
painter.setFont(m_mainFont);
m_dateTimeText = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(),
- true, false);
+ KLocale::ShortDate, false);
m_dateTimeWidth = painter.fontMetrics().width(m_dateTimeText+" ");
m_mainLineSpacing = painter.fontMetrics().lineSpacing();
m_footerHeight = m_mainLineSpacing * 2; //2 lines
--- trunk/extragear/graphics/kphotoalbum/DateBar/ViewHandler.cpp #652350:652351
@@ -184,7 +184,7 @@
printedLast = true;
QString str;
if ( !printedLast )
- str=KGlobal::locale()->formatDate( date(unit).date(), true );
+ str=KGlobal::locale()->formatDate( date(unit).date(), KLocale::ShortDate );
printedLast = !printedLast;
lastunit = unit;
return str;
@@ -215,7 +215,7 @@
QString WeekViewHandler::text( int unit )
{
- return KGlobal::locale()->formatDate(date(unit).date(), true);
+ return KGlobal::locale()->formatDate(date(unit).date(), KLocale::ShortDate);
}
QDateTime WeekViewHandler::date(int unit, QDateTime reference )
@@ -256,7 +256,7 @@
QString DayViewHandler::text( int unit )
{
if ( date(unit).time().hour() == 0 )
- return KGlobal::locale()->formatDate(date(unit).date(), true);
+ return KGlobal::locale()->formatDate(date(unit).date(), KLocale::ShortDate);
else
return date(unit).toString( QString::fromLatin1( "h:00" ) );
}
--- trunk/extragear/graphics/kst/src/extdate/kstextdatepicker.cpp #652350:652351
@@ -243,7 +243,7 @@
//must remain commented unless ExtDate gets added to kdelibs
// const ExtCalendarSystem * calendar = KGlobal::locale()->calendar();
-// line->setText(KGlobal::locale()->formatDate(date, true));
+// line->setText(KGlobal::locale()->formatDate(date, KLocale::ShortDate));
line->setText( date.toString( KGlobal::locale()->dateFormatShort() ) );
selectMonth->setText(d->calendar->monthName(date, false));
fillWeeksCombo(date);
--- trunk/extragear/graphics/showimg/showimg/batchrenamer.cpp #652350:652351
@@ -587,7 +587,7 @@
if(date.isValid ())
{
m_klocale->setDateFormatShort(getDateFormat());
- ret = m_klocale->formatDate(date, true);
+ ret = m_klocale->formatDate(date, KLocale::ShortDate);
}
}
else
--- trunk/extragear/graphics/showimg/showimg/mainwindow.cpp #652350:652351
@@ -1212,7 +1212,7 @@
void
MainWindow::setDate (const QDateTime& a_date)
{
- setDate(KGlobal::locale()->formatDateTime(a_date, false));
+ setDate(KGlobal::locale()->formatDateTime(a_date, KLocale::LongDate));
}
void
MainWindow::setDate (const QString& a_date)
--- trunk/extragear/libs/kipi-plugins/rawconverter/actionthread.cpp #652350:652351
@@ -177,7 +177,7 @@
if (info.dateTime.isValid())
{
identify.append(i18n("Created: %1\n")
- .arg(KGlobal::locale()->formatDateTime(info.dateTime, true, true)));
+ .arg(KGlobal::locale()->formatDateTime(info.dateTime, KLocale::ShortDate, true)));
}
if (info.aperture != -1.0)
--- trunk/extragear/multimedia/amarok/src/tagdialog.cpp #652350:652351
@@ -691,9 +691,9 @@
summaryText += body2cols.arg( i18n("Playcount:"), QString::number( m_bundle.playCount() ) );
summaryText += body2cols.arg( i18n("First Played:"),
- m_bundle.playCount() ? KGlobal::locale()->formatDate( CollectionDB::instance()->getFirstPlay( m_bundle.url().path() ).date() , true ) : i18n("Never") );
+ m_bundle.playCount() ? KGlobal::locale()->formatDate( CollectionDB::instance()->getFirstPlay( m_bundle.url().path() ).date() , KLocale::ShortDate ) : i18n("Never") );
summaryText += body2cols.arg( i18nc("a single item (singular)", "Last Played:"),
- m_bundle.playCount() ? KGlobal::locale()->formatDate( CollectionDB::instance()->getLastPlay( m_bundle.url().path() ).date() , true ) : i18n("Never") );
+ m_bundle.playCount() ? KGlobal::locale()->formatDate( CollectionDB::instance()->getLastPlay( m_bundle.url().path() ).date() , KLocale::ShortDate ) : i18n("Never") );
summaryText += "</table></td></tr></table>";
summaryLabel->setText( summaryText );
--- trunk/extragear/multimedia/kaffeine/src/input/dvb/kevents.cpp #652350:652351
@@ -191,7 +191,7 @@
s = s+"</font></b><br>";
}
s = s+"<br><font color=\"darkred\">";
- s = s+KGlobal::locale()->formatDateTime( ei->event->startDateTime, false )+"<br>";
+ s = s+KGlobal::locale()->formatDateTime( ei->event->startDateTime, KLocale::LongDate )+"<br>";
s = s+ei->event->duration.toString("hh:mm");
s = s+"</font><br><br>";
for ( i=0; i<(int)ei->event->shortEvents.count(); i++ ) {
--- trunk/extragear/network/kchat/kchatmainwindow.cpp #652350:652351
@@ -261,7 +261,7 @@
void KChatMainWindow::saveToLocalFile(QFile* file){
QString text;
text = i18n("Chat-protocol of %1")
- .arg( KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false, true) );
+ .arg( KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), KLocale::LongDate, true) );
text += '\n';
text += view->getChat();
QTextStream stream (file);
--- trunk/extragear/network/knemo/knemod/interfacestatisticsdialog.cpp #652350:652351
@@ -61,7 +61,7 @@
while ( iterator )
{
QDate date( iterator->year, iterator->month, iterator->day );
- tableDaily->verticalHeader()->setLabel( row, KGlobal::locale()->formatDate( date, true ) );
+ tableDaily->verticalHeader()->setLabel( row, KGlobal::locale()->formatDate( date, KLocale::ShortDate ) );
tableDaily->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
tableDaily->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
--- trunk/extragear/office/datakiosk/datakiosk/src/dateedit.cpp #652350:652351
@@ -79,7 +79,7 @@
setMaxCount( 1 );
mDate = QDate::currentDate();
- QString today = KGlobal::locale() ->formatDate( mDate, true );
+ QString today = KGlobal::locale() ->formatDate( mDate, KLocale::ShortDate );
insertItem( today );
setCurrentItem( 0 );
@@ -364,7 +364,7 @@
{
QString dateString;
if ( mDate.isValid() )
- dateString = KGlobal::locale() ->formatDate( mDate, true );
+ dateString = KGlobal::locale() ->formatDate( mDate, KLocale::ShortDate );
bool blocked = signalsBlocked();
blockSignals( true );
--- trunk/extragear/office/datakiosk/src/dateedit.cpp #652350:652351
@@ -50,7 +50,7 @@
setMaxCount( 1 );
mDate = QDate::currentDate();
- QString today = KGlobal::locale() ->formatDate( mDate, true );
+ QString today = KGlobal::locale() ->formatDate( mDate, KLocale::ShortDate );
insertItem( today );
setCurrentItem( 0 );
@@ -338,7 +338,7 @@
{
QString dateString;
if ( mDate.isValid() )
- dateString = KGlobal::locale() ->formatDate( mDate, true );
+ dateString = KGlobal::locale() ->formatDate( mDate, KLocale::ShortDate );
bool blocked = signalsBlocked();
blockSignals( true );
--- trunk/extragear/office/kile/kile/quickdocumentdialog.cpp #652350:652351
@@ -356,7 +356,7 @@
label->setBuddy(m_leDate);
// set current date
- m_leDate->setText( KGlobal::locale()->formatDate(QDate::currentDate(), true) );
+ m_leDate->setText( KGlobal::locale()->formatDate(QDate::currentDate(), KLocale::ShortDate) );
return personalInfo;
}
--- trunk/extragear/utils/kedit/kedit.cpp #652350:652351
@@ -940,7 +940,7 @@
void TopLevel::print()
{
bool aborted = false;
- QString headerLeft = i18n("Date: %1", KGlobal::locale()->formatDate(QDate::currentDate(),true));
+ QString headerLeft = i18n("Date: %1", KGlobal::locale()->formatDate(QDate::currentDate(), KLocale::ShortDate));
QString headerMid = i18n("File: %1", m_caption);
QString headerRight;
--- trunk/extragear/utils/krecipes/src/widgets/kdateedit.cpp #652350:652351
@@ -91,7 +91,7 @@
setMaxCount( 1 );
mDate = QDate::currentDate();
- QString today = KGlobal::locale()->formatDate( mDate, true );
+ QString today = KGlobal::locale()->formatDate( mDate, KLocale::ShortDate );
insertItem( today );
setCurrentItem( 0 );
@@ -375,7 +375,7 @@
{
QString dateString;
if ( mDate.isValid() )
- dateString = KGlobal::locale()->formatDate( mDate, true );
+ dateString = KGlobal::locale()->formatDate( mDate, KLocale::ShortDate );
// We do not want to generate a signal here,
// since we explicitly setting the date
More information about the Kst
mailing list