author | zecke <zecke> | 2002-09-10 12:09:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 12:09:49 (UTC) |
commit | 6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4 (patch) (side-by-side diff) | |
tree | 6ebc93c6432f4ed9d00ef1448b6a047ef522a79a | |
parent | d10cddb3c9ce75bc90b14add14bc133737fe35aa (diff) | |
download | opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.zip opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.gz opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.bz2 |
Qtopia1-6 merge
still to test
bic changes to be resolved
more changes to be made?
102 files changed, 10199 insertions, 7175 deletions
diff --git a/library/alarmserver.cpp b/library/alarmserver.cpp index a1a7142..1ee05c6 100644 --- a/library/alarmserver.cpp +++ b/library/alarmserver.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -189,16 +189,18 @@ void TimerReceiverObject::deleteTimer() } void TimerReceiverObject::resetTimer() { const int maxsecs = 2147000; int total_written; QDateTime nearest = TimeConversion::fromUTC(nearestTimerEvent->UTCtime); QDateTime now = QDateTime::currentDateTime(); + if ( nearest < now ) + nearest = now; int secs = TimeConversion::secsTo( now, nearest ); if ( secs > maxsecs ) { // too far for millisecond timing secs = maxsecs; } // System timer (needed so that we wake from deep sleep), // from the Epoch in seconds. @@ -240,43 +242,60 @@ void TimerReceiverObject::resetTimer() void TimerReceiverObject::timerEvent( QTimerEvent * ) { bool needSave = FALSE; killTimers(); if (nearestTimerEvent) { if ( nearestTimerEvent->UTCtime <= TimeConversion::toUTC(QDateTime::currentDateTime()) ) { +#ifndef QT_NO_COP QCopEnvelope e( nearestTimerEvent->channel, nearestTimerEvent->message ); e << TimeConversion::fromUTC( nearestTimerEvent->UTCtime ) << nearestTimerEvent->data; +#endif timerEventList.remove( nearestTimerEvent ); needSave = TRUE; } setNearestTimerEvent(); } else { resetTimer(); } if ( needSave ) saveState(); } /*! \class AlarmServer alarmserver.h - \brief The AlarmServer class provides alarms to be scheduled. + \brief The AlarmServer class allows alarms to be scheduled and unscheduled. + + Applications can schedule alarms with addAlarm() and can + unschedule alarms with deleteAlarm(). When the time for an alarm + to go off is reached the specified \link qcop.html QCop\endlink + message is sent on the specified channel (optionally with + additional data). + + Scheduling an alarm using this class is important (rather just using + a QTimer) since the machine may be asleep and needs to get woken up using + the Linux kernel which implements this at the kernel level to minimize + battery usage while asleep. - Applications which wish to be informed when a certain time instant - passes use the functions of AlarmServer to request so. + \ingroup qtopiaemb + \sa QCopEnvelope */ /*! - Schedules an alarm for \a when. Soon after this time, - \a message will be sent to \a channel, with \a data as - a parameter. \a message must be of the form "someMessage(int)". + Schedules an alarm to go off at (or soon after) time \a when. When + the alarm goes off, the \link qcop.html QCop\endlink \a message will + be sent to \a channel, with \a data as a parameter. + + If this function is called with exactly the same data as a previous + call the subsequent call is ignored, so there is only ever one alarm + with a given set of parameters. \sa deleteAlarm() */ void AlarmServer::addAlarm ( QDateTime when, const QCString& channel, const QCString& message, int data) { if ( qApp->type() == QApplication::GuiServer ) { bool needSave = FALSE; @@ -307,29 +326,35 @@ void AlarmServer::addAlarm ( QDateTime when, const QCString& channel, } } else { nearestTimerEvent = newTimerEventItem; timerEventReceiver->resetTimer(); } if ( needSave ) saveState(); } else { +#ifndef QT_NO_COP QCopEnvelope e( "QPE/System", "addAlarm(QDateTime,QCString,QCString,int)" ); e << when << channel << message << data; +#endif } } /*! - Deletes previously scheduled alarms which match \a when, \a channel, \a message, - and \a data. + Deletes previously scheduled alarms which match \a when, \a channel, + \a message, and \a data. - Passing null values for \a when, \a channel, or \a message indicates "any". - Passing -1 for \a data indicates "any". + Passing null values for \a when, \a channel, or for the \link + qcop.html QCop\endlink \a message, acts as a wildcard meaning "any". + Similarly, passing -1 for \a data indicates "any". + + If there is no matching alarm, nothing happens. + + \sa addAlarm() - \sa deleteAlarm() */ void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QCString& message, int data) { if ( qApp->type() == QApplication::GuiServer) { bool needSave = FALSE; if ( timerEventReceiver != NULL ) { timerEventReceiver->killTimers(); @@ -354,18 +379,20 @@ void AlarmServer::deleteAlarm (QDateTime when, const QCString& channel, const QC } } if ( nearestTimerEvent ) timerEventReceiver->resetTimer(); } if ( needSave ) saveState(); } else { +#ifndef QT_NO_COP QCopEnvelope e( "QPE/System", "deleteAlarm(QDateTime,QCString,QCString,int)" ); e << when << channel << message << data; +#endif } } /*! Writes the system clock to the hardware clock. */ void Global::writeHWClock() { diff --git a/library/applnk.cpp b/library/applnk.cpp index 9498f84..298581a 100644 --- a/library/applnk.cpp +++ b/library/applnk.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -14,23 +14,27 @@ ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_MIMEEXT +#define QTOPIA_INTERNAL_PRELOADACCESS +#define QTOPIA_INTERNAL_APPLNKASSIGN #include "applnk.h" #include <qpe/qpeapplication.h> #include <qpe/categories.h> #include <qpe/categoryselect.h> +#ifdef QWS #include <qpe/qcopenvelope_qws.h> +#endif #include <qpe/global.h> #include <qpe/mimetype.h> #include <qpe/config.h> #include <qpe/storage.h> #include <qpe/resource.h> #include <qdict.h> #include <qdir.h> @@ -45,17 +49,17 @@ int AppLnk::lastId = 5000; static int smallSize = 14; static int bigSize = 32; static QString safeFileName(const QString& n) { QString safename=n; - safename.replace(QRegExp("[^0-9A-Za-z.]"),"_"); // Njaard says this is broken + safename.replace(QRegExp("[^0-9A-Za-z.]"),"_"); safename.replace(QRegExp("^[^A-Za-z]*"),""); if ( safename.isEmpty() ) safename = "_"; return safename; } static bool prepareDirectories(const QString& lf) { @@ -66,128 +70,286 @@ static bool prepareDirectories(const QString& lf) return FALSE; } return TRUE; } class AppLnkPrivate { public: - QArray<int> mCat; + /* the size of the Pixmap */ + enum Size {Normal = 0, Big }; + AppLnkPrivate() { + /* we want one normal and one big item */ + mPixmaps = QArray<QPixmap>(2); + } + + QStringList mCatList; // always correct + QArray<int> mCat; // cached value; correct if not empty + QArray<QPixmap> mPixmaps; + + void updateCatListFromArray() + { + Categories cat( 0 ); + cat.load( categoryFileName() ); + mCatList = cat.labels("Document View",mCat); + } + + void setCatArrayDirty() + { + mCat.resize(0); + } + + void ensureCatArray() + { + if ( mCat.count() > 0 || mCatList.count()==0 ) + return; + + Categories cat( 0 ); + cat.load( categoryFileName() ); + mCat.resize( mCatList.count() ); + int i; + QStringList::ConstIterator it; + for ( i = 0, it = mCatList.begin(); it != mCatList.end(); + ++it, i++ ) { + + bool number; + int id = (*it).toInt( &number ); + if ( !number ) { + id = cat.id( "Document View", *it ); + if ( id == 0 ) + id = cat.addCategory( "Document View", *it ); + } + mCat[i] = id; + } + } }; /*! \class AppLnk applnk.h \brief The AppLnk class represents an application available on the system. - Information about applications are stored in Qtopia as ".desktop" files. - When read, these files are stored as AppLnk objects. + Every Qtopia application \e app has a corresponding \e app.desktop + file. When one of these files is read its data is stored as an + AppLnk object. + + The AppLnk class introduces some Qtopia-specific concepts, and + provides a variety of functions, as described in the following + sections. + \tableofcontents + + \target Types + \section1 Types + + Every AppLnk object has a \e type. For applications, games and + settings the type is \c Application; for documents the + type is the document's MIME type. + + \target files-and-links + \section1 Files and Links + + When you create an AppLnk (or more likely, a \link doclnk.html + DocLnk\endlink), you don't deal directly with filenames in the + filesystem. Instead you do this: + \code + DocLnk d; + d.setType("text/plain"); + d.setName("My Nicely Named Document / Whatever"); // Yes, "/" is legal. + \endcode + At this point, the file() and linkFile() are unknown. Normally + this is uninteresting, and the names become automatically known, + and more importantly, becomes reserved, when you ask what they are: + + \code + QString fn = d.file(); + \endcode + This invents a filename, and creates the file on disk (an empty + reservation file) to prevent the name being used by another + application. + + In some circumstances, you don't want to create the file if it + doesn't already exist (e.g. in the Document tab, some of the \link + doclnk.html DocLnk\endlink objects represented by icons are + DocLnk's created just for that view - they don't have + corresponding \c .desktop files. To avoid littering empty + reservation files around, we check in a few places to see whether + the file really needs to exist). + + \section1 Functionality + + AppLnk objects are created by calling the constructor with the + name of a \e .desktop file. The object can be checked for validity + using isValid(). + + The following functions are used to set or retrieve information + about the application: + \table + \header \i Get Function \i Set Function \i Short Description + \row \i \l name() \i \l setName() \i application's name + \row \i \l pixmap() \i \e none \i application's icon + \row \i \l bigPixmap() \i \e none \i application's large icon + \row \i \e none \i setIcon() \i sets the icon's filename + \row \i \l type() \i \l setType() \i see \link #Types Types\endlink above + \row \i \l rotation() \i \e none \i 0, 90, 180 or 270 degrees + \row \i \l comment() \i \l setComment() \i text for the Details dialog + \row \i \l exec() \i \l setExec() \i executable's filename + \row \i \l file() \i \e none \i document's filename + \row \i \l linkFile() \i \l setLinkFile() \i \e .desktop filename + \row \i \l mimeTypes() \i \e none \i the mime types the application can view or edit + \row \i \l categories() \i \l setCategories() \i \e{see the function descriptions} + \row \i \l fileKnown() \i \e none \i see \link +#files-and-links Files and Links\endlink above + \row \i \l linkFileKnown() \i \e none \i see \link +#files-and-links Files and Links\endlink above + \row \i \l property() \i \l setProperty() \i any AppLnk property + can be retrieved or set (if writeable) using these + \endtable + + To save an AppLnk to disk use writeLink(). To execute the + application that the AppLnk object refers to, use execute(). + + AppLnk's can be deleted from disk using removeLinkFile(). To + remove both the link and the application's executable use + removeFiles(). + + Icon sizes can be globally changed (but only for AppLnk objects + created after the calls) with setSmallIconSize() and + setBigIconSize(). + + \ingroup qtopiaemb */ /*! Sets the size used for small icons to \a small pixels. Only affects AppLnk objects created after the call. + + \sa smallIconSize() setIcon() */ void AppLnk::setSmallIconSize(int small) { smallSize = small; } /*! Returns the size used for small icons. + + \sa setSmallIconSize() setIcon() */ int AppLnk::smallIconSize() { return smallSize; } /*! Sets the size used for large icons to \a big pixels. Only affects AppLnk objects created after the call. + + \sa bigIconSize() setIcon() */ void AppLnk::setBigIconSize(int big) { bigSize = big; } /*! Returns the size used for large icons. + + \sa setBigIconSize() setIcon() */ int AppLnk::bigIconSize() { return bigSize; } /*! \fn QString AppLnk::name() const - Returns the Name property. + Returns the Name property. This is the user-visible name for the + document or application, not the filename. + + See \link #files-and-links Files and Links\endlink. + + \sa setName() */ /*! \fn QString AppLnk::exec() const - Returns the Exec property. This is the executable program associated - with the AppLnk. + Returns the Exec property. This is the name of the executable + program associated with the AppLnk. + + \sa setExec() */ /*! \fn QString AppLnk::rotation() const - Returns the Rotation property. + Returns the Rotation property. The value is 0, 90, 180 or 270 + degrees. */ /*! \fn QString AppLnk::comment() const Returns the Comment property. + + \sa setComment() */ /*! \fn QStringList AppLnk::mimeTypes() const Returns the MimeTypes property. This is the list of MIME types that the application can view or edit. */ /*! \fn const QArray<int>& AppLnk::categories() const Returns the Categories property. + + See the CategoryWidget for more details. + + \sa setCategories() */ const QArray<int>& AppLnk::categories() const { + d->ensureCatArray(); return d->mCat; } /*! \fn int AppLnk::id() const Returns the id of the AppLnk. If the AppLnk is not in an AppLnkSet, this value is 0, otherwise it is a value that is unique for the duration of the current process. + + \sa AppLnkSet::find() */ /*! \fn bool AppLnk::isValid() const - Returns whether this AppLnk is valid. + Returns TRUE if this AppLnk is valid; otherwise returns FALSE. */ /*! Creates an invalid AppLnk. \sa isValid() */ AppLnk::AppLnk() { mId = 0; d = new AppLnkPrivate(); } /*! - Loads \a file as an AppLnk. + Loads \a file (e.g. \e app.desktop) as an AppLnk. + + \sa writeLink() */ AppLnk::AppLnk( const QString &file ) { QStringList sl; d = new AppLnkPrivate(); if ( !file.isNull() ) { Config config( file, Config::File ); @@ -195,179 +357,248 @@ AppLnk::AppLnk( const QString &file ) config.setGroup( "Desktop Entry" ); mName = config.readEntry( "Name", file ); mExec = config.readEntry( "Exec" ); mType = config.readEntry( "Type", QString::null ); mIconFile = config.readEntry( "Icon", QString::null ); mRotation = config.readEntry( "Rotation", "" ); mComment = config.readEntry( "Comment", QString::null ); + // MIME types are case-insensitive. mMimeTypes = config.readListEntry( "MimeType", ';' ); + for (QStringList::Iterator it=mMimeTypes.begin(); it!=mMimeTypes.end(); ++it) + *it = (*it).lower(); mMimeTypeIcons = config.readListEntry( "MimeTypeIcons", ';' ); mLinkFile = file; mFile = config.readEntry("File", QString::null); - sl = config.readListEntry("Categories", ';'); - } - } - // let's try our darndest to create categories... - Categories cat( 0 ); - cat.load( categoryFileName() ); - d->mCat.resize( sl.count() ); - int i; - QStringList::Iterator it; - for ( i = 0, it = sl.begin(); it != sl.end(); - ++it, i++ ) { - - bool number; - int id = (*it).toInt( &number ); - if ( !number ) { - // convert from old school... - id = cat.id( "Document Viewer", *it ); - if ( id == 0 ) - id = cat.addCategory( "Document Viewer", *it ); + if ( mFile[0] != '/' ) { + int slash = file.findRev('/'); + if ( slash >= 0 ) { + mFile = file.left(slash) + '/' + mFile; + } + } + d->mCatList = config.readListEntry("Categories", ';'); + if ( d->mCatList[0].toInt() < -1 ) { + // numeric cats in file! convert to text + Categories cat( 0 ); + cat.load( categoryFileName() ); + d->mCat.resize( d->mCatList.count() ); + int i; + QStringList::ConstIterator it; + for ( i = 0, it = d->mCatList.begin(); it != d->mCatList.end(); + ++it, i++ ) { + bool number; + int id = (*it).toInt( &number ); + if ( !number ) { + // convert from text + id = cat.id( "Document View", *it ); + if ( id == 0 ) + id = cat.addCategory( "Document View", *it ); + } + d->mCat[i] = id; + } + d->updateCatListFromArray(); + } } - d->mCat[i] = id; } mId = 0; } +AppLnk& AppLnk::operator=(const AppLnk ©) +{ + if ( mId ) + qWarning("Deleting AppLnk that is in an AppLnkSet"); + if ( d ) + delete d; + + + mName = copy.mName; + + /* remove for Qtopia 3.0 -zecke */ + mPixmap = copy.mPixmap; + mBigPixmap = copy.mBigPixmap; + + mExec = copy.mExec; + mType = copy.mType; + mRotation = copy.mRotation; + mComment = copy.mComment; + mFile = copy.mFile; + mLinkFile = copy.mLinkFile; + mIconFile = copy.mIconFile; + mMimeTypes = copy.mMimeTypes; + mMimeTypeIcons = copy.mMimeTypeIcons; + mId = 0; + d = new AppLnkPrivate(); + d->mCat = copy.d->mCat; + d->mCatList = copy.d->mCatList; + d->mPixmaps = copy.d->mPixmaps; + + return *this; +} /*! - Returns a small pixmap associated with the application. + protected internally to share code + should I document that at all? + I don't know the TT style for that */ -const QPixmap& AppLnk::pixmap() const -{ - if ( mPixmap.isNull() ) { +const QPixmap& AppLnk::pixmap( int pos, int size ) const { + if ( d->mPixmaps[pos].isNull() ) { AppLnk* that = (AppLnk*)this; if ( mIconFile.isEmpty() ) { MimeType mt(type()); - that->mPixmap = mt.pixmap(); - if ( that->mPixmap.isNull() ) - that->mPixmap = Resource::loadPixmap("UnknownDocument-14"); - return that->mPixmap; + that->d->mPixmaps[pos] = mt.pixmap(); + if ( that->d->mPixmaps[pos].isNull() ) + that->d->mPixmaps[pos].convertFromImage( + Resource::loadImage("UnknownDocument") + .smoothScale( size, size ) ); + return that->d->mPixmaps[pos]; } QImage unscaledIcon = Resource::loadImage( that->mIconFile ); - that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); - that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); - return that->mPixmap; + if ( unscaledIcon.isNull() ) { + qDebug( "Cannot find icon: %s", that->mIconFile.latin1() ); + that->d->mPixmaps[pos].convertFromImage( + Resource::loadImage("UnknownDocument") + .smoothScale( size, size ) ); + } else { + that->d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); + that->d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); + } + return that->d->mPixmaps[0]; } return mPixmap; } /*! + Returns a small pixmap associated with the application. + + \sa bigPixmap() setIcon() +*/ +const QPixmap& AppLnk::pixmap() const +{ + if ( d->mPixmaps[0].isNull() ) { + return pixmap(AppLnkPrivate::Normal, smallSize ); + } + return d->mPixmaps[0]; +} + +/*! Returns a large pixmap associated with the application. + + \sa pixmap() setIcon() */ const QPixmap& AppLnk::bigPixmap() const { - if ( mBigPixmap.isNull() ) { - AppLnk* that = (AppLnk*)this; - if ( mIconFile.isEmpty() ) { - MimeType mt(type()); - that->mBigPixmap = mt.bigPixmap(); - if ( that->mBigPixmap.isNull() ) - that->mBigPixmap = Resource::loadPixmap("UnknownDocument"); - return that->mBigPixmap; - } - QImage unscaledIcon = Resource::loadImage( that->mIconFile ); - that->mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); - that->mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); - return that->mBigPixmap; + if ( d->mPixmaps[1].isNull() ) { + return pixmap( AppLnkPrivate::Big, bigSize ); } return mBigPixmap; } /*! - Returns the type of the application. + Returns the type of the AppLnk. For applications, games and + settings the type is \c Application; for documents the type is the + document's MIME type. */ QString AppLnk::type() const { if ( mType.isNull() ) { AppLnk* that = (AppLnk*)this; - MimeType mt(file()); - that->mType = mt.id(); - return that->mType; + QString f = file(); + if ( !f.isNull() ) { + MimeType mt(f); + that->mType = mt.id(); + return that->mType; + } } return mType; } /*! Returns the file associated with the AppLnk. - \sa exec() + \sa exec() name() */ QString AppLnk::file() const { if ( mFile.isNull() ) { - AppLnk* that = (AppLnk*)this; // copy? + AppLnk* that = (AppLnk*)this; QString ext = MimeType(mType).extension(); if ( !ext.isEmpty() ) ext = "." + ext; if ( !mLinkFile.isEmpty() ) { that->mFile = mLinkFile.right(8)==".desktop" // 8 = strlen(".desktop") ? mLinkFile.left(mLinkFile.length()-8) : mLinkFile; } else if ( mType.contains('/') ) { that->mFile = QString(getenv("HOME"))+"/Documents/"+mType+"/"+safeFileName(that->mName); - if ( QFile::exists(that->mFile+ext) || QFile::exists(that->mFile+".desktop") ) { // a .desktop with the same name exists + /* + * A file with the same name or a .desktop file already exists + */ + if ( QFile::exists(that->mFile+ext) || QFile::exists(that->mFile+".desktop") ) { int n=1; - qWarning("AppLnk::file() n=1 %s", that->mFile.latin1() ); QString nn; while (QFile::exists((nn=(that->mFile+"_"+QString::number(n)))+ext) || QFile::exists(nn+".desktop")) n++; that->mFile = nn; - qWarning("AppLnl::file() now mFile is %s", that->mFile.latin1() ); } that->mLinkFile = that->mFile+".desktop"; that->mFile += ext; } prepareDirectories(that->mFile); - QFile f(that->mFile); - if ( !f.open(IO_WriteOnly) ) - that->mFile = QString::null; - return that->mFile; + if ( !that->mFile.isEmpty() ) { + QFile f(that->mFile); + if ( !f.open(IO_WriteOnly) ) + that->mFile = QString::null; + return that->mFile; + } } return mFile; } /*! - Returns the desktop file coresponding to this AppLnk. + Returns the desktop file corresponding to this AppLnk. - \sa file(), exec() + \sa file() exec() name() */ QString AppLnk::linkFile() const { if ( mLinkFile.isNull() ) { AppLnk* that = (AppLnk*)this; if ( type().contains('/') ) { StorageInfo storage; const FileSystem *fs = storage.fileSystemOf( that->mFile ); - if ( fs && ( fs->isRemovable() || fs->disk() == "/dev/mtdblock6" || fs->disk() == "tmpfs" ) ) { + /* tmpfs + and ramfs are available too but not removable + * either we fix storage or add this + */ + if ( fs && ( fs->isRemovable() || fs->disk() == "/dev/mtdblock6" || fs->disk() == "tmpfs") ) { that->mLinkFile = fs->path(); } else that->mLinkFile = getenv( "HOME" ); that->mLinkFile += "/Documents/"+type()+"/"+safeFileName(that->mName); - if ( QFile::exists(that->mLinkFile+".desktop") ) { // ok the file exists lets check if we point to the same file - int n=1; - QString nn; - AppLnk lnk( that->mLinkFile+".desktop" ); - if(that->file() != lnk.file() ){ - qWarning("AppLnk::linkFile exists %s", that->mLinkFile.latin1() ); - while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")){ - n++; - AppLnk lnk(nn ); // just to be sure - if(lnk.file() ==that->file() ){ - break; - } - } - that->mLinkFile = nn; - } + + /* the desktop file exists make sure we don't point to the same file */ + if ( QFile::exists(that->mLinkFile+".desktop") ) { + AppLnk lnk( that->mLinkFile + ".desktop" ); + + /* the linked is different */ + if(that->file() != lnk.file() ) { + int n = 1; + QString nn; + while (QFile::exists((nn=that->mLinkFile+"_"+QString::number(n))+".desktop")) { + n++; + /* just to be sure */ + AppLnk lnk(nn ); + if (lnk.file() == that->file() ) + break; + } + that->mLinkFile = nn; + } } that->mLinkFile += ".desktop"; - qWarning("AppLnk::linkFile is %s", that->mLinkFile.latin1() ); storeLink(); } return that->mLinkFile; } return mLinkFile; } /*! @@ -385,43 +616,50 @@ AppLnk::AppLnk( const AppLnk © ) mFile = copy.mFile; mLinkFile = copy.mLinkFile; mIconFile = copy.mIconFile; mMimeTypes = copy.mMimeTypes; mMimeTypeIcons = copy.mMimeTypeIcons; mId = 0; d = new AppLnkPrivate(); d->mCat = copy.d->mCat; + d->mCatList = copy.d->mCatList; + d->mPixmaps = copy.d->mPixmaps; } /*! - Destroys the AppLnk. Note that if the AppLnk is current a member of - an AppLnkSet, this will produce a run-time warning. + Destroys the AppLnk. Note that if the AppLnk is currently a member + of an AppLnkSet, this will produce a run-time warning. - \sa AppLnkSet::add(), AppLnkSet::remove() + \sa AppLnkSet::add() AppLnkSet::remove() */ AppLnk::~AppLnk() { if ( mId ) qWarning("Deleting AppLnk that is in an AppLnkSet"); if ( d ) delete d; } /*! + \overload Executes the application associated with this AppLnk. + + \sa exec() */ void AppLnk::execute() const { execute(QStringList()); } /*! Executes the application associated with this AppLnk, with \a args as arguments. + + \sa exec() */ void AppLnk::execute(const QStringList& args) const { #ifdef Q_WS_QWS if ( !mRotation.isEmpty() ) { // ######## this will only work in the server int rot = QPEApplication::defaultRotation(); rot = (rot+mRotation.toInt())%360; @@ -432,29 +670,29 @@ void AppLnk::execute(const QStringList& args) const } else #endif invoke(args); } /*! Invokes the application associated with this AppLnk, with \a args as arguments. Rotation is not taken into account by - this function, you should not call it directly. + this function, so you should not call it directly. \sa execute() */ void AppLnk::invoke(const QStringList& args) const { Global::execute( exec(), args[0] ); } /*! Sets the Exec property to \a exec. - \sa exec() + \sa exec() name() */ void AppLnk::setExec( const QString& exec ) { mExec = exec; } /*! Sets the Name property to \a docname. @@ -464,17 +702,17 @@ void AppLnk::setExec( const QString& exec ) void AppLnk::setName( const QString& docname ) { mName = docname; } /*! Sets the File property to \a filename. - \sa file() + \sa file() name() */ void AppLnk::setFile( const QString& filename ) { mFile = filename; } /*! Sets the LinkFile property to \a filename. @@ -484,133 +722,168 @@ void AppLnk::setFile( const QString& filename ) void AppLnk::setLinkFile( const QString& filename ) { mLinkFile = filename; } /*! Sets the Comment property to \a comment. + This text is displayed in the 'Details Dialog', for example if the + user uses the 'press-and-hold' gesture. + \sa comment() */ void AppLnk::setComment( const QString& comment ) { mComment = comment; } /*! Sets the Type property to \a type. + For applications, games and settings the type should be \c + Application; for documents the type should be the document's MIME + type. + \sa type() */ void AppLnk::setType( const QString& type ) { mType = type; } /*! - Sets the Icon property to \a iconname. + \fn QString AppLnk::icon() const + + Returns the Icon property. + + \sa setIcon() +*/ + +/*! + Sets the Icon property to \a iconname. This is the filename from + which the pixmap() and bigPixmap() are obtained. - \sa pixmap(), bigPixmap() + \sa icon() setSmallIconSize() setBigIconSize() */ void AppLnk::setIcon( const QString& iconname ) { mIconFile = iconname; QImage unscaledIcon = Resource::loadImage( mIconFile ); - mPixmap.convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); - mBigPixmap.convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); + d->mPixmaps[0].convertFromImage( unscaledIcon.smoothScale( smallSize, smallSize ) ); + d->mPixmaps[1].convertFromImage( unscaledIcon.smoothScale( bigSize, bigSize ) ); } /*! Sets the Categories property to \a c. + See the CategoryWidget for more details. + \sa categories() */ void AppLnk::setCategories( const QArray<int>& c ) { d->mCat = c; + d->updateCatListFromArray(); } /*! \fn QStringList AppLnk::mimeTypeIcons() const Returns the MimeTypeIcons property of the AppLnk. */ /*! - Attempts to ensure that the link file for this AppLnk exists, including - creating any required directories. Returns TRUE if successful. + Attempts to ensure that the link file for this AppLnk exists, + including creating any required directories. Returns TRUE if + successful; otherwise returns FALSE. + + You should not need to use this function. */ bool AppLnk::ensureLinkExists() const { QString lf = linkFile(); return prepareDirectories(lf); } /*! - Commits the AppLnk to disk. Returns whether the operation succeeded. + Commits the AppLnk to disk. Returns TRUE if the operation succeeded; + otherwise returns FALSE. - The "linkChanged(QString)" message is sent to the - "QPE/System" QCop channel as a result. + In addition, the "linkChanged(QString)" message is sent to the + "QPE/System" \link qcop.html QCop\endlink channel. */ bool AppLnk::writeLink() const { // Only re-writes settable parts QString lf = linkFile(); if ( !ensureLinkExists() ) return FALSE; storeLink(); return TRUE; } +/*! + \internal +*/ void AppLnk::storeLink() const { Config config( mLinkFile, Config::File ); config.setGroup("Desktop Entry"); config.writeEntry("Name",mName); if ( !mIconFile.isNull() ) config.writeEntry("Icon",mIconFile); config.writeEntry("Type",type()); if ( !mComment.isNull() ) config.writeEntry("Comment",mComment); - config.writeEntry("File",file()); - // write out the id... - int i; - QStringList sl; - for ( i = 0; i < int(d->mCat.count()); i++ ) { - sl.append( QString::number( d->mCat[i] ) ); - } - config.writeEntry( "Categories", sl, ';' ); - + QString f = file(); + int i = 0; + while ( i < (int)f.length() && i < (int)mLinkFile.length() && f[i] == mLinkFile[i] ) + i++; + while ( i && f[i] != '/' ) + i--; + // simple case where in the same directory + if ( mLinkFile.find( '/', i + 1 ) < 0 ) + f = f.mid(i+1); + // ### could do relative ie ../../otherDocs/file.doc + config.writeEntry("File",f); + config.writeEntry( "Categories", d->mCatList, ';' ); + +#ifndef QT_NO_COP QCopEnvelope e("QPE/System", "linkChanged(QString)"); e << mLinkFile; +#endif } /*! Sets the property named \a key to \a value. + + \sa property() */ void AppLnk::setProperty(const QString& key, const QString& value) { if ( ensureLinkExists() ) { Config cfg(linkFile(), Config::File); cfg.writeEntry(key,value); } } /*! Returns the property named \a key. + + \sa setProperty() */ QString AppLnk::property(const QString& key) const { QString lf = linkFile(); if ( !QFile::exists(lf) ) return QString::null; Config cfg(lf, Config::File); return cfg.readEntry(key); } - bool AppLnk::isPreloaded() const { // Preload information is stored in the Launcher config in v1.5. Config cfg("Launcher"); cfg.setGroup("Preload"); QStringList apps = cfg.readListEntry("Apps",','); if (apps.contains(exec())) return true; return false; @@ -625,43 +898,51 @@ void AppLnk::setPreloaded(bool yesNo) { apps.remove(exec()); else if (yesNo && !apps.contains(exec())) apps.append(exec()); cfg.writeEntry("Apps", apps, ','); } /*! - Deletes both the linkFile() and file() associated with this AppLnk. + Deletes both the linkFile() and the file() associated with this AppLnk. + + \sa removeLinkFile() */ void AppLnk::removeFiles() { bool valid = isValid(); if ( !valid || !linkFileKnown() || QFile::remove(linkFile()) ) { if ( QFile::remove(file()) ) { +#ifndef QT_NO_COP QCopEnvelope e("QPE/System", "linkChanged(QString)"); if ( linkFileKnown() ) e << linkFile(); else e << file(); +#endif } else if ( valid ) { // restore link writeLink(); } } } /*! - Delete the linkFile(), leaving any file() untouched. + Deletes the linkFile(), leaving any file() untouched. + + \sa removeFiles() */ void AppLnk::removeLinkFile() { if ( isValid() && linkFileKnown() && QFile::remove(linkFile()) ) { +#ifndef QT_NO_COP QCopEnvelope e("QPE/System", "linkChanged(QString)"); e << linkFile(); +#endif } } class AppLnkSetPrivate { public: AppLnkSetPrivate() { typPix.setAutoDelete(TRUE); @@ -677,17 +958,20 @@ public: /*! \class AppLnkSet applnk.h \brief The AppLnkSet class is a set of AppLnk objects. */ /*! \fn QStringList AppLnkSet::types() const - Returns the list of types in the set. + Returns the list of \link applnk.html#Types types\endlink in the set. + + For applications, games and settings the type is \c Application; + for documents the type is the document's MIME type. \sa AppLnk::type(), typeName(), typePixmap(), typeBigPixmap() */ /*! \fn const QList<AppLnk>& AppLnkSet::children() const Returns the members of the set. @@ -698,47 +982,50 @@ public: */ AppLnkSet::AppLnkSet() : d(new AppLnkSetPrivate) { } /*! Constructs an AppLnkSet that contains AppLnk objects representing - all the files in a \a directory (recursively). + all the files in the given \a directory (and any subdirectories + recursively). - The directories may contain ".directory" files which overrides - any AppLnk::type() value of AppLnk objects found in the directory. + \omit + The directories may contain ".directory" files which override + any AppLnk::type() values for AppLnk objects found in the directory. This allows simple localization of application types. + \endomit */ AppLnkSet::AppLnkSet( const QString &directory ) : d(new AppLnkSetPrivate) { QDir dir( directory ); mFile = directory; findChildren(directory,QString::null,QString::null); } /*! - Detaches all AppLnk objects from the set. The set become empty - and the call becomes responsible for deleting the AppLnk objects. + Detaches all AppLnk objects from the set. The set become empty and + the caller becomes responsible for deleting the AppLnk objects. */ void AppLnkSet::detachChildren() { QListIterator<AppLnk> it( mApps ); for ( ; it.current(); ) { AppLnk* a = *it; ++it; a->mId = 0; } mApps.clear(); } /*! - Destroys the set, deleting all AppLnk objects it contains. + Destroys the set, deleting all the AppLnk objects it contains. \sa detachChildren() */ AppLnkSet::~AppLnkSet() { QListIterator<AppLnk> it( mApps ); for ( ; it.current(); ) { AppLnk* a = *it; @@ -806,66 +1093,78 @@ void AppLnkSet::findChildren(const QString &dr, const QString& typ, const QStrin } } } } } } /*! - Adds \a f to the set. The set takes over responsibility for deleting \a f. + Adds AppLnk \a f to the set. The set takes responsibility for + deleting \a f. \sa remove() */ void AppLnkSet::add( AppLnk *f ) { if ( f->mId == 0 ) { AppLnk::lastId++; f->mId = AppLnk::lastId; mApps.append( f ); } else { qWarning("Attempt to add an AppLnk twice"); } } /*! - Removes \a f to the set, returning whether \a f was in the set. - The caller becomes responsible for deleting \a f. + Removes AppLnk \a f to the set. The caller becomes responsible for + deleting \a f. Returns TRUE if \a f was in the set; otherwise + returns FALSE. \sa add() */ bool AppLnkSet::remove( AppLnk *f ) { if ( mApps.remove( f ) ) { f->mId = 0; return TRUE; } return FALSE; } + /*! Returns the localized name for type \a t. + + For applications, games and settings the type is \c Application; + for documents the type is the document's MIME type. */ QString AppLnkSet::typeName( const QString& t ) const { QString *st = d->typName.find(t); return st ? *st : QString::null; } /*! Returns the small pixmap associated with type \a t. + + For applications, games and settings the type is \c Application; + for documents the type is the document's MIME type. */ QPixmap AppLnkSet::typePixmap( const QString& t ) const { QPixmap *pm = d->typPix.find(t); return pm ? *pm : QPixmap(); } /*! Returns the large pixmap associated with type \a t. + + For applications, games and settings the type is \c Application; + for documents the type is the document's MIME type. */ QPixmap AppLnkSet::typeBigPixmap( const QString& t ) const { QPixmap *pm = d->typPixBig.find(t); return pm ? *pm : QPixmap(); } /*! @@ -916,23 +1215,26 @@ const AppLnk *AppLnkSet::findExec( const QString& exec ) const \sa appendFrom() */ DocLnkSet::DocLnkSet() { } /*! - Constructs an DocLnkSet that contains DocLnk objects representing - all the files in a \a directory (recursively). + Constructs a DocLnkSet that contains DocLnk objects representing all + the files in the \a directory (and any subdirectories, recursively). If \a mimefilter is not null, only documents with a MIME type matching \a mimefilter are selected. The value may contain multiple wild-card patterns separated by ";", - such as "*o/mpeg;audio/x-wav". + such as \c{*o/mpeg;audio/x-wav}. + + See also \link applnk.html#files-and-links Files and Links\endlink. + */ DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) : AppLnkSet() { QDir dir( directory ); mFile = dir.dirName(); QDict<void> reference; @@ -991,24 +1293,32 @@ void DocLnkSet::appendFrom( DocLnkSet& other ) void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeFilters, QDict<void> &reference, int depth) { depth++; if ( depth > 10 ) return; QDir dir( dr ); + /* Opie got a different approach + * I guess it's geek vs. consumer + * in this case to be discussed + */ + if ( dir.exists( ".Qtopia-ignore" ) ) + return; + const QFileInfoList *list = dir.entryInfoList(); if ( list ) { QFileInfo* fi; for ( QFileInfoListIterator it(*list); (fi=*it); ++it ) { QString bn = fi->fileName(); - if ( bn[0] != '.' && bn != "CVS" ) { - if ( fi->isDir() ) { - findChildren(fi->filePath(), mimeFilters, reference, depth); + if ( bn[0] != '.' ) { + if ( fi->isDir() ) { + if ( bn != "CVS" && bn != "Qtopia" && bn != "QtPalmtop" ) + findChildren(fi->filePath(), mimeFilters, reference, depth); } else { if ( fi->extension(FALSE) == "desktop" ) { DocLnk* dl = new DocLnk( fi->filePath() ); QFileInfo fi2(dl->file()); bool match = FALSE; if ( !fi2.exists() ) { dir.remove( dl->file() ); } @@ -1053,18 +1363,19 @@ void DocLnkSet::findChildren(const QString &dr, const QValueList<QRegExp> &mimeF DocLnk::DocLnk( const QString &file ) : AppLnk(file) { init(file); } /*! Constructs a DocLnk from a valid .desktop \a file or a new .desktop - \a file for other files. If \a may_be_desktopfile is TRUE, then \a file - is first attempted to be read as a .desktop file. + \a file for other files. If \a may_be_desktopfile is TRUE, then an + attempt is made to read \a file as a .desktop file; if that fails it + is read as a normal file. */ DocLnk::DocLnk( const QString &file, bool may_be_desktopfile ) : AppLnk(may_be_desktopfile ? file : QString::null) { init(file); } void DocLnk::init(const QString &file) @@ -1083,35 +1394,35 @@ void DocLnk::init(const QString &file) if ( s2 > 0 ) { mType = file.mid(s2+1,s0-s2-1); } } } } } else if ( QFile::exists(file) ) { QString n = file; - n.replace(QRegExp("\\..*"),""); n.replace(QRegExp(".*/"),""); + n.replace(QRegExp("\\..*"),""); setName( n ); setFile( file ); } MimeType mt(mType); if( mt.application() ) mExec = mt.application()->exec(); } /*! Constructs an invalid DocLnk. */ DocLnk::DocLnk() { } /*! - Destroys the DocLnk. As with AppLnk objects, a run-time error + Destroys the DocLnk. Just like AppLnk objects, a run-time error occurs if the DocLnk is a member of a DocLnkSet (or AppLnkSet). */ DocLnk::~DocLnk() { } /*! \reimp @@ -1138,8 +1449,9 @@ void DocLnk::invoke(const QStringList& args) const if ( linkFileKnown() && QFile::exists( linkFile() ) ) a.append(linkFile()); else a.append(file()); app->execute(a); } } + diff --git a/library/applnk.h b/library/applnk.h index 9b5523e..71b62ef 100644 --- a/library/applnk.h +++ b/library/applnk.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -42,27 +42,29 @@ public: static void setSmallIconSize(int); static void setBigIconSize(int); static int smallIconSize(); static int bigIconSize(); QString name() const { return mName; } const QPixmap& pixmap() const; const QPixmap& bigPixmap() const; + QString icon() const { return mIconFile; } virtual QString exec() const { return mExec; } QString type() const; QString rotation() const { return mRotation; } QString comment() const { return mComment; } QString file() const; QString linkFile() const; QStringList mimeTypes() const { return mMimeTypes; } QStringList mimeTypeIcons() const { return mMimeTypeIcons; } const QArray<int> &categories() const; int id() const { return mId; } + bool fileKnown() const { return !mFile.isNull(); } bool linkFileKnown() const { return !mLinkFile.isNull(); } void execute() const; void execute(const QStringList& args) const; void removeFiles(); void removeLinkFile(); void setName( const QString& docname ); @@ -73,25 +75,34 @@ public: void setType( const QString& mimetype ); void setIcon( const QString& iconname ); void setCategories( const QArray<int> &v ); bool writeLink() const; void setProperty(const QString& key, const QString& value); QString property(const QString& key) const; -//#ifdef QTOPIA_INTERNAL_PRELOADACCESS +#ifdef QTOPIA_INTERNAL_PRELOADACCESS bool isPreloaded() const; void setPreloaded(bool yesNo); -//#endif +#endif + +#ifdef QTOPIA_INTERNAL_APPLNKASSIGN + AppLnk &operator=(const AppLnk &other); +#endif protected: QString mName; + + /* remove for Qtopia 3.0 -zecke */ QPixmap mPixmap; + + /* remove for Qtopia 3.0 -zecke */ QPixmap mBigPixmap; + QString mExec; QString mType; QString mRotation; QString mComment; QString mFile; QString mLinkFile; QString mIconFile; QStringList mMimeTypes; @@ -99,27 +110,35 @@ protected: int mId; static int lastId; AppLnkPrivate *d; friend class AppLnkSet; virtual void invoke(const QStringList& args) const; bool ensureLinkExists() const; void storeLink() const; + +private: + const QPixmap& pixmap(int pos, int size) const; }; class DocLnk : public AppLnk { public: DocLnk(); DocLnk( const DocLnk &o ) : AppLnk(o) { } DocLnk( const QString &file ); DocLnk( const QString &file, bool may_be_desktopfile ); virtual ~DocLnk(); + +#ifdef QTOPIA_INTERNAL_APPLNKASSIGN + DocLnk &operator=(const DocLnk &other) { AppLnk::operator=(other); return *this; } +#endif + QString exec() const; protected: void invoke(const QStringList& args) const; private: void init(const QString &file); }; @@ -136,16 +155,27 @@ public: QStringList types() const { return typs; } QString typeName( const QString& ) const; QPixmap typePixmap( const QString& ) const; QPixmap typeBigPixmap( const QString& ) const; void add(AppLnk*); bool remove(AppLnk*); + void clear() { + QListIterator<AppLnk> it( mApps ); + for ( ; it.current(); ) { + AppLnk* a = *it; + ++it; + a->mId = 0; + delete a; + } + mApps.clear(); + typs.clear(); + } const QList<AppLnk> &children() const { return mApps; } void detachChildren(); protected: friend class AppLnk; QList<AppLnk> mApps; QString mFile; diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp index 6e011c4..e37b3b9 100644 --- a/library/backend/categories.cpp +++ b/library/backend/categories.cpp @@ -1,48 +1,65 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included -** in the packaging of this file. +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. ** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING -** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A -** PARTICULAR PURPOSE. +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include "categories.h" +#include <qtopia/categories.h> +#include <qtopia/stringutil.h> #include <qfile.h> #include <qcstring.h> #include <qtextstream.h> -#include "stringutil.h" using namespace Qtopia; /*********************************************************** * * CategoryGroup * **********************************************************/ #ifdef PALMTOPCENTER UidGen CategoryGroup::sUidGen( UidGen::PalmtopCenter ); #else UidGen CategoryGroup::sUidGen( UidGen::Qtopia ); #endif +/*! \class CategoryGroup categories.h + \brief Helper class that is used by Categories + + CategoryGroup is a group of categories that is associated with an + application or global set. Mainly it defines a map of ids to + category labels and category labels to ids. Lookups can be done with + labels or unique idenifiers. + + \ingroup qtopiaemb + \ingroup qtopiadesktop + \warning Categories API will likely change between Qtopia 1.5 and Qtopia 3 + \sa Categories::appGroupMap(), Categories::globalGroup() + */ + +/*! Add \a label and return the UID. If failure, then 0 is returned. Note + that All and Unfiled are reserved labels. + \internal +*/ int CategoryGroup::add( const QString &label ) { if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") ) return 0; QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label ); if ( findIt != mLabelIdMap.end() ) return 0; @@ -53,117 +70,133 @@ int CategoryGroup::add( const QString &label ) void CategoryGroup::insert( int uid, const QString &label ) { uidGen().store( uid ); mIdLabelMap[uid] = label; mLabelIdMap[label] = uid; } +/*! \internal + */ bool CategoryGroup::add( int uid, const QString &label ) { if ( label == QObject::tr("All") || label == QObject::tr("Unfiled") ) return FALSE; QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label ); if ( labelIt != mLabelIdMap.end() ) return FALSE; QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid ); if ( idIt != mIdLabelMap.end() ) return FALSE; insert( uid, label ); return TRUE; } +/*! Returns TRUE if \a label was removed from the group, FALSE if not. + \internal + */ bool CategoryGroup::remove( const QString &label ) { QMap<QString,int>::Iterator findIt = mLabelIdMap.find( label ); if ( findIt == mLabelIdMap.end() ) return FALSE; mIdLabelMap.remove( *findIt ); mLabelIdMap.remove( findIt ); return TRUE; } +/*! Returns TRUE if \a uid was removed from the group, FALSE if not. + \internal + */ bool CategoryGroup::remove( int uid ) { QMap<int,QString>::Iterator idIt = mIdLabelMap.find( uid ); if ( idIt == mIdLabelMap.end() ) return FALSE; mLabelIdMap.remove( *idIt ); mIdLabelMap.remove( idIt ); return TRUE; } +/*! \internal + */ bool CategoryGroup::rename( int uid, const QString &newLabel ) { if ( newLabel == QObject::tr("All") || newLabel == QObject::tr("Unfiled") ) return FALSE; QMap<int, QString>::Iterator idIt = mIdLabelMap.find( uid ); if ( idIt == mIdLabelMap.end() ) return FALSE; mLabelIdMap.remove( *idIt ); mLabelIdMap[newLabel] = uid; *idIt = newLabel; return TRUE; } +/*! \internal + */ bool CategoryGroup::rename( const QString &oldLabel, const QString &newLabel ) { return rename( id(oldLabel), newLabel ); } +/*! Returns TRUE if \a uid is stored in this group, FALSE if not. */ bool CategoryGroup::contains(int uid) const { return ( mIdLabelMap.find( uid ) != mIdLabelMap.end() ); } +/*! Returns TRUE if \a label is stored in this group, FALSE if not. */ bool CategoryGroup::contains(const QString &label) const { return ( mLabelIdMap.find( label ) != mLabelIdMap.end() ); } -/** Returns label associated with the uid or QString::null if - * not found +/*! Returns label associated with the \a uid or QString::null if + not found */ const QString &CategoryGroup::label(int uid) const { QMap<int,QString>::ConstIterator idIt = mIdLabelMap.find( uid ); if ( idIt == mIdLabelMap.end() ) return QString::null; return *idIt; } -/** Returns the uid associated with label or 0 if not found */ +/*! Returns the uid associated with \a label or 0 if not found */ int CategoryGroup::id(const QString &label) const { QMap<QString,int>::ConstIterator labelIt = mLabelIdMap.find( label ); if ( labelIt == mLabelIdMap.end() ) return 0; return *labelIt; } +/*! Returns a list of all labels stored in this group. */ QStringList CategoryGroup::labels() const { QStringList labels; for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin(); it != mIdLabelMap.end(); ++it ) labels += *it; // ### I don't think this is the place for this... // labels.sort(); return labels; } +/*! Returns a list of all labels associated with the \a catids */ QStringList CategoryGroup::labels(const QArray<int> &catids ) const { QStringList labels; if ( catids.count() == 0 ) return labels; for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin(); it != mIdLabelMap.end(); ++it ) if ( catids.find( it.key() ) != -1 ) @@ -172,19 +205,59 @@ QStringList CategoryGroup::labels(const QArray<int> &catids ) const } /*********************************************************** * * Categories * **********************************************************/ -/** Add the category name as long as it doesn't already exist locally - * or globally. Return TRUE if added, FALSE if conflicts. - */ +/*! + \class Categories categories.h + \brief The Categories class is a database that groups categories and maps ids to names. + + The Categories class is the low level Categories accessor class. To + add a category menu and filter for your application, see CategoryMenu. + + The Categories class allows the developer to add, remove, and rename + categories. Categories can be created for an individual application + such as Todo List or to be used for all applications. Categories + that can be used by all applications are called global + categories. Each PalmtopRecord subclass stores categories as an + QArray<int> using PalmtopRecord::setCategories() and + PalmtopRecord::categories(). This allows each record to be assigned + to multiple categories. This also allows the user to rename a + category and for it to update automatically in all records. + + This class provides several methods to convert between a category id + and it's associated string such as id(), ids(), label() and labels(). A + helper class called CategoryGroup is used to access categories of a + single application group, such as Todo List. Global categories can + also be accessed via CategoryGroup objects. See appGroupMap() and + globalGroup() for the appropriate accessor methods. + + Categories are stored in an xml file in the Settings directory + (Categories.xml). A global function called categoryFileName() will + return to appropriate QString file location to be passed to load() + and save() for the master categories database. + + \ingroup qtopiaemb + \ingroup qtopiadesktop + \warning Categories API will likely change between Qtopia 1.5 and Qtopia 3 + \sa CategoryGroup, CategoryMenu +*/ + + +/*! + Add the category name as long as it doesn't already exist locally or + globally. The \a uid is assigned to the category if successfully + added. Return \a uid if added, 0 if conflicts (error). + + \internal +*/ int Categories::addCategory( const QString &appname, const QString &catname, int uid ) { if ( mGlobalCats.contains(catname) ) return 0; QMap< QString, CategoryGroup >::Iterator @@ -199,16 +272,21 @@ int Categories::addCategory( const QString &appname, } CategoryGroup &cats = *appIt; cats.add( uid, catname ); emit categoryAdded( *this, appname, uid ); return uid; } +/*! + Add the category name as long as it doesn't already exist locally or + globally. Return UID if added, 0 if conflicts (error). +*/ + int Categories::addCategory( const QString &appname, const QString &catname ) { if ( mGlobalCats.contains(catname) ) return 0; QMap< QString, CategoryGroup >::Iterator appIt = mAppCats.find( appname ); @@ -224,36 +302,47 @@ int Categories::addCategory( const QString &appname, CategoryGroup &cats = *appIt; int uid = cats.add( catname ); if ( !uid ) return 0; emit categoryAdded( *this, appname, uid ); return uid; } +/*! + \internal +*/ int Categories::addGlobalCategory( const QString &catname, int uid ) { mGlobalCats.add( uid, catname ); emit categoryAdded( *this, QString::null, uid ); return uid; } +/*! + Add the global category \a catname while checking that it doesn't + already exist globally. Return UID if added, 0 if conflicts. + + \sa addCategory() + */ int Categories::addGlobalCategory( const QString &catname ) { int uid = mGlobalCats.add( catname ); if ( !uid ) return 0; emit categoryAdded( *this, QString::null, uid ); return uid; } -/** Removes the category from the application; if it is not found - * in the application, then it attempts to remove it from - * the global list - */ +/*! + + Removes the \a catname from the application group. If it is not + found in the application group and \a checkGlobal is TRUE, then it + attempts to remove it from the global list +*/ bool Categories::removeCategory( const QString &appname, const QString &catname, bool checkGlobal ) { QMap< QString, CategoryGroup >::Iterator appIt = mAppCats.find( appname ); if ( appIt != mAppCats.end() ) { CategoryGroup &cats = *appIt; @@ -263,65 +352,78 @@ bool Categories::removeCategory( const QString &appname, return TRUE; } } if ( !checkGlobal ) return FALSE; return removeGlobalCategory( catname ); } + +/*! + Removes the \a uid from the application group \a appname. Returns TRUE + if success, FALSE if not found. +*/ bool Categories::removeCategory( const QString &appname, int uid ) { QMap< QString, CategoryGroup >::Iterator appIt = mAppCats.find( appname ); if ( appIt != mAppCats.end() ) { CategoryGroup &cats = *appIt; if ( cats.remove( uid ) ) { emit categoryRemoved( *this, appname, uid ); return TRUE; } } return FALSE; } +/*! + Removes the global category \a catname. Returns TRUE + if success, FALSE if not found. +*/ bool Categories::removeGlobalCategory( const QString &catname ) { int uid = mGlobalCats.id( catname ); if ( mGlobalCats.remove( uid ) ) { emit categoryRemoved( *this, QString::null, uid ); return TRUE; } return FALSE; } - +/*! + Removes the global category \a uid. Returns TRUE + if success, FALSE if not found. +*/ bool Categories::removeGlobalCategory( int uid ) { if ( mGlobalCats.remove( uid ) ) { emit categoryRemoved( *this, QString::null, uid ); return TRUE; } return FALSE; } -/** Returns the sorted list of all categories that are associated with - * the app. If includeGlobal parameter is TRUE then the returned - * categories will include the global category items. +/*! + Returns the sorted list of all categories that are associated with + the \a app. If \a includeGlobal is TRUE then the returned + categories will include the global category items. */ QStringList Categories::labels( const QString &app, bool includeGlobal, ExtraLabels extra ) const { QMap< QString, CategoryGroup >::ConstIterator appIt = mAppCats.find( app ); QStringList cats; if ( appIt != mAppCats.end() ) cats += (*appIt).labels(); - else qDebug("Categories::labels didn't find app %s", app.latin1() ); + //else qDebug("Categories::labels didn't find app %s", app.latin1() ); if ( includeGlobal ) cats += mGlobalCats.labels(); cats.sort(); switch ( extra ) { case NoExtra: break; case AllUnfiled: cats.append( tr("All") ); @@ -333,32 +435,41 @@ QStringList Categories::labels( const QString &app, case UnfiledLabel: cats.append( tr("Unfiled") ); break; } return cats; } +/*! + Returns the label associated with the id +*/ QString Categories::label( const QString &app, int id ) const { if ( mGlobalCats.contains( id ) ) return mGlobalCats.label( id ); QMap< QString, CategoryGroup >::ConstIterator appIt = mAppCats.find( app ); if ( appIt == mAppCats.end() ) return QString::null; return (*appIt).label( id ); } -/** Returns a single string associated with the cat ids for display in - * a combobox or any area that requires one string. If catids are empty - * then "Unfiled" will be returned. If multiple categories are assigned - * the first cat id is shown with " (multi)" appended to the string. - */ +/*! + Returns a single string associated with \a catids for display in a + combobox or any area that requires one string. If \a catids are empty + then "Unfiled" will be returned. If multiple categories are + assigned then the behavior depends on the DisplaySingle type. + + If \a display is set to ShowMulti then " (multi)" appended to the + first string. If \a display is set to ShowAll, then a space + seperated string is returned with all categories. If ShowFirst is + set, the just the first string is returned. +*/ QString Categories::displaySingle( const QString &app, const QArray<int> &catids, DisplaySingle display ) const { QStringList strs = labels( app, catids ); if ( !strs.count() ) return tr("Unfiled"); strs.sort(); @@ -375,46 +486,61 @@ QString Categories::displaySingle( const QString &app, r = strs.join(" "); break; } } else r = strs.first(); return r; } +/*! + + Returns all ids associated with the application CategoryGroup \a app + and the passed in \a labels in that group. +*/ QArray<int> Categories::ids( const QString &app, const QStringList &labels) const { QArray<int> results; QStringList::ConstIterator it; int i; - + for ( i=0, it=labels.begin(); it!=labels.end(); i++, ++it ) { int value = id( app, *it ); if ( value != 0 ) { int tmp = results.size(); results.resize( tmp + 1 ); results[ tmp ] = value; } } return results; } +/*! + Returns the id associated with the app. If the id is not found in the + application CategoryGroup, then it searches the global CategoryGroup. + If it is not found it either, 0 is returned. +*/ int Categories::id( const QString &app, const QString &cat ) const { if ( cat == tr("Unfiled") || cat.contains( tr(" (multi.)") ) ) return 0; int uid = mGlobalCats.id( cat ); if ( uid != 0 ) return uid; return mAppCats[app].id( cat ); } -/** Return TRUE if renaming succeeded; FALSE if app name not found, - * or if there was a name conflict +/*! + Return TRUE if renaming succeeded; FALSE if \a appname or \a oldName + is not found, or if \a newName conflicts with an existing category + in the CategoryGroup. + + It will first search the CategoryGroup associated with \a appname + and if not found it will try to replace in global CategoryGroup. */ bool Categories::renameCategory( const QString &appname, const QString &oldName, const QString &newName ) { QMap< QString, CategoryGroup >::Iterator appIt = mAppCats.find( appname ); @@ -424,27 +550,37 @@ bool Categories::renameCategory( const QString &appname, if ( id != 0 && cats.rename( id, newName ) ) { emit categoryRenamed( *this, appname, id ); return TRUE; } } return renameGlobalCategory( oldName, newName ); } +/*! + Return TRUE if renaming succeeded; FALSE if \a appname or \a oldName + is not found, or if \a newName conflicts with an existing category + in the CategoryGroup. This function will only rename categories found + in the global CategoryGroup. + */ bool Categories::renameGlobalCategory( const QString &oldName, const QString &newName ) { int uid = mGlobalCats.id( oldName ); if ( uid != 0 && mGlobalCats.rename( uid, newName ) ) { emit categoryRenamed( *this, QString::null, uid ); return TRUE; } return FALSE; } +/*! + Changes the grouping of a category. If a category was global and \a global + is set to TRUE, then the \a catname will be moved to the \a appname group. +*/ void Categories::setGlobal( const QString &appname, const QString &catname, bool global ) { // if in global and should be in app; then move it if ( mGlobalCats.contains( catname ) && !global ) { mGlobalCats.remove( catname ); addCategory( appname, catname ); @@ -453,49 +589,63 @@ void Categories::setGlobal( const QString &appname, // if in app and should be in global, then move it if ( !global ) return; if ( removeCategory( appname, catname, FALSE ) ) addGlobalCategory( catname ); } +/*! + Returns TRUE if the \a catname is in the global CategoryGroup, FALSE if not. +*/ bool Categories::isGlobal( const QString &catname ) const { return mGlobalCats.contains( catname ); } -/** Returns true if the catname is associated with any application +/*! + Returns true if the \a catname is associated with any CategoryGroup, + including global. */ bool Categories::exists( const QString &catname ) const { if ( isGlobal(catname) ) return TRUE; for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) if ( exists( appsIt.key(), catname ) ) return TRUE; return FALSE; } +/*! + Returns TRUE if the \a catname is associated with the \a appname + CategoryGroup, FALSE if not found. + */ bool Categories::exists( const QString &appname, const QString &catname) const { QMap< QString, CategoryGroup >::ConstIterator appIt = mAppCats.find( appname ); if ( appIt == mAppCats.end() ) return FALSE; return (*appIt).contains( catname ); } +/*! + Saves the Categories database to the \a fname. See categoryFileName() + for the default file name string used for the shared category database. + Returns FALSE if there is error writing the file or TRUE on success. + */ bool Categories::save( const QString &fname ) const { QString strNewFile = fname + ".new"; QFile f( strNewFile ); QString out; int total_written; if ( !f.open( IO_WriteOnly|IO_Raw ) ) { @@ -529,26 +679,35 @@ bool Categories::save( const QString &fname ) const total_written = f.writeBlock( cstr.data(), cstr.length() ); if ( total_written != int(cstr.length()) ) { f.close(); QFile::remove( strNewFile ); return FALSE; } f.close(); +#ifdef Q_OS_WIN32 + QFile::remove( fname ); +#endif if ( ::rename( strNewFile.latin1(), fname.latin1() ) < 0 ) { qWarning( "problem renaming file %s to %s", strNewFile.latin1(), fname.latin1()); // remove the tmp file... QFile::remove( strNewFile ); } return TRUE; } +/*! + Loads the Categories database using \a fname. See categoryFileName() + for the default file name string used for the shared category database. + + Returns FALSE if there is error reading the file or TRUE on success. + */ bool Categories::load( const QString &fname ) { QFile file( fname ); if ( !file.open( IO_ReadOnly ) ) { qWarning("Unable to open %s", fname.latin1()); addGlobalCategory(tr("Business")); addGlobalCategory(tr("Personal")); @@ -614,22 +773,29 @@ bool Categories::load( const QString &fname ) mGlobalCats.add( id.toInt(), name ); else mAppCats[ app ].add( id.toInt(), name ); } return TRUE; } +/*! + Clear the categories in memory. Equivelent to creating an empty Categories + object. +*/ void Categories::clear() { mGlobalCats.clear(); mAppCats.clear(); } +/*! + Dump the contents to standard out. Used for debugging only. +*/ void Categories::dump() const { qDebug("\tglobal categories = %s", mGlobalCats.labels().join(", ").latin1() ); for ( QMap<QString, CategoryGroup>::ConstIterator appsIt = mAppCats.begin(); appsIt != mAppCats.end(); ++appsIt ) { const QString &app = appsIt.key(); QStringList appcats = (*appsIt).labels(); qDebug("\tapp = %s\tcategories = %s", app.latin1(), appcats.join(", ").latin1() ); @@ -670,8 +836,101 @@ void CheckedListView::setChecked( const QStringList &checked ) if ( !showingChecked ) { ensureItemVisible( i ); showingChecked = TRUE; } } else i->setOn( FALSE ); } + +/*! \fn Categories &Categories::operator= ( const Categories &c ) + + Performs deep copy. + */ + + +/*! \fn QStringList Categories::labels( const QString & app, const QArray<int> &catids ) const + + Returns list of labels associated with the application and catids +*/ + +/*! \fn QStringList Categories::globalCategories() const + + Returns list of all global category labels +*/ + +/*! \fn const QMap<QString, CategoryGroup> &Categories::appGroupMap() const + + Returns a map of application names to CategoryGroup. The CategoryGroup + class defines a map of ids to category labels and category labels to ids. +*/ + +/*! \fn const CategoryGroup &Categories::globalGroup() const + + Returns the global CategoryGroup. The CategoryGroup + class defines a map of ids to category labels and category labels to ids. +*/ + +/*! \fn void Categories::categoryAdded( const Categories &cats, const QString &appname, int uid) + + Emitted if a category is added. + + \a cats is a const reference to this object + \a appname is the CategoryGroup application name that the category was added to or QString::null if it was global + \a uid is the unique identifier associated with the added category +*/ + +/*! \fn void Categories::categoryRemoved( const Categories &cats, const QString &appname, + int uid) + + Emitted if removed category is removed. + + \a cats is a const reference to this object + \a appname is the CategoryGroup application name that the category was removed from or QString::null if it was the global CategoryGroup + \a uid is the unique identifier associated with the removed category +*/ + + +/*! \fn void Categories::categoryRenamed( const Categories &cats, const QString &appname, + int uid) + + Emitted if \a uid in the \a appname CategoryGroup is renamed in \a cats + object. + + \a cats is a const reference to this object + \a appname is the CategoryGroup application name that the category was renamed in or QString::null if it was the global CategoryGroup + \a uid is the unique identifier associated with the renamed category +*/ + +/*! \fn Categories::Categories( QObject *parent=0, const char *name = 0 ) + + Constructor for an empty Categories object. +*/ + +/*! \fn Categories::Categories( const Categories ©From ) + + Deep copy constructor +*/ + +/*! \fn Categories::~Categories() + + Empty destructor. Call save() before destruction if there are changes + that need to be saved. +*/ + +/*! \fn CategoryGroup::clear() + \internal +*/ + +/*! \fn const QMap<int, QString> &CategoryGroup::idMap() const + + Returns a const reference to the id to label QMap +*/ + +/*! \fn CategoryGroup::CategoryGroup() + \internal +*/ + +/*! \fn CategoryGroup::CategoryGroup(const CategoryGroup &c) + \internal +*/ + diff --git a/library/backend/contact.cpp b/library/backend/contact.cpp index b10b19a..3f4934a 100644 --- a/library/backend/contact.cpp +++ b/library/backend/contact.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -29,49 +29,427 @@ #include <qobject.h> #include <qregexp.h> #include <qstylesheet.h> #include <qfileinfo.h> #include <stdio.h> +/*! + \class Contact contact.h + \brief The Contact class holds the data of an address book entry. + + This data includes information the name of the person, contact + information, and business information such as deparment and job title. + + \ingroup qtopiaemb + \ingroup qtopiadesktop +*/ + Qtopia::UidGen Contact::sUidGen( Qtopia::UidGen::Qtopia ); +/*! + Creates a new, empty contact. +*/ Contact::Contact() : Record(), mMap(), d( 0 ) { } +/*! + \internal + Creates a new contact. The properties of the contact are + set from \a fromMap. +*/ Contact::Contact( const QMap<int, QString> &fromMap ) : Record(), mMap( fromMap ), d( 0 ) { QString cats = mMap[ Qtopia::AddressCategory ]; if ( !cats.isEmpty() ) setCategories( idsFromString( cats ) ); QString uidStr = find( Qtopia::AddressUid ); + if ( uidStr.isEmpty() ) setUid( uidGen().generate() ); else setUid( uidStr.toInt() ); + + if ( !uidStr.isEmpty() ) + setUid( uidStr.toInt() ); } +/*! + Destroys a contact. +*/ Contact::~Contact() { } +/*! \fn void Contact::setTitle( const QString &str ) + Sets the title of the contact to \a str. +*/ + +/*! \fn void Contact::setFirstName( const QString &str ) + Sets the first name of the contact to \a str. +*/ + +/*! \fn void Contact::setMiddleName( const QString &str ) + Sets the middle name of the contact to \a str. +*/ + +/*! \fn void Contact::setLastName( const QString &str ) + Sets the last name of the contact to \a str. +*/ + +/*! \fn void Contact::setSuffix( const QString &str ) + Sets the suffix of the contact to \a str. +*/ + +/*! \fn void Contact::setFileAs( const QString &str ) + Sets the contact to filed as \a str. +*/ + +/*! \fn void Contact::setDefaultEmail( const QString &str ) + Sets the default email of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeStreet( const QString &str ) + Sets the home street address of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeCity( const QString &str ) + Sets the home city of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeState( const QString &str ) + Sets the home state of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeZip( const QString &str ) + Sets the home zip code of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeCountry( const QString &str ) + Sets the home country of the contact to \a str. +*/ + +/*! \fn void Contact::setHomePhone( const QString &str ) + Sets the home phone number of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeFax( const QString &str ) + Sets the home fax number of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeMobile( const QString &str ) + Sets the home mobile phone number of the contact to \a str. +*/ + +/*! \fn void Contact::setHomeWebpage( const QString &str ) + Sets the home webpage of the contact to \a str. +*/ + +/*! \fn void Contact::setCompany( const QString &str ) + Sets the company for contact to \a str. +*/ + +/*! \fn void Contact::setJobTitle( const QString &str ) + Sets the job title of the contact to \a str. +*/ + +/*! \fn void Contact::setDepartment( const QString &str ) + Sets the department for contact to \a str. +*/ + +/*! \fn void Contact::setOffice( const QString &str ) + Sets the office for contact to \a str. +*/ + +/*! \fn void Contact::setBusinessStreet( const QString &str ) + Sets the business street address of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessCity( const QString &str ) + Sets the business city of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessState( const QString &str ) + Sets the business state of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessZip( const QString &str ) + Sets the business zip code of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessCountry( const QString &str ) + Sets the business country of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessPhone( const QString &str ) + Sets the business phone number of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessFax( const QString &str ) + Sets the business fax number of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessMobile( const QString &str ) + Sets the business mobile phone number of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessPager( const QString &str ) + Sets the business pager number of the contact to \a str. +*/ + +/*! \fn void Contact::setBusinessWebpage( const QString &str ) + Sets the business webpage of the contact to \a str. +*/ + +/*! \fn void Contact::setProfession( const QString &str ) + Sets the profession of the contact to \a str. +*/ + +/*! \fn void Contact::setAssistant( const QString &str ) + Sets the assistant of the contact to \a str. +*/ + +/*! \fn void Contact::setManager( const QString &str ) + Sets the manager of the contact to \a str. +*/ + +/*! \fn void Contact::setSpouse( const QString &str ) + Sets the spouse of the contact to \a str. +*/ + +/*! \fn void Contact::setGender( const QString &str ) + Sets the gender of the contact to \a str. +*/ + +/*! \fn void Contact::setBirthday( const QString &str ) + Sets the birthday for the contact to \a str. +*/ + +/*! \fn void Contact::setAnniversary( const QString &str ) + Sets the anniversary of the contact to \a str. +*/ + +/*! \fn void Contact::setNickname( const QString &str ) + Sets the nickname of the contact to \a str. +*/ + +/*! \fn void Contact::setNotes( const QString &str ) + Sets the notes about the contact to \a str. +*/ + +/*! \fn QString Contact::title() const + Returns the title of the contact. +*/ + +/*! \fn QString Contact::firstName() const + Returns the first name of the contact. +*/ + +/*! \fn QString Contact::middleName() const + Returns the middle name of the contact. +*/ + +/*! \fn QString Contact::lastName() const + Returns the last name of the contact. +*/ + +/*! \fn QString Contact::suffix() const + Returns the suffix of the contact. +*/ + +/*! \fn QString Contact::fileAs() const + Returns the string the contact is filed as. +*/ + +/*! \fn QString Contact::defaultEmail() const + Returns the default email address of the contact. +*/ + +/*! \fn QString Contact::emails() const + Returns the list of email address for a contact separated by ';'s in a single + string. +*/ + +/*! \fn QString Contact::homeStreet() const + Returns the home street address of the contact. +*/ + +/*! \fn QString Contact::homeCity() const + Returns the home city of the contact. +*/ + +/*! \fn QString Contact::homeState() const + Returns the home state of the contact. +*/ + +/*! \fn QString Contact::homeZip() const + Returns the home zip of the contact. +*/ + +/*! \fn QString Contact::homeCountry() const + Returns the home country of the contact. +*/ + +/*! \fn QString Contact::homePhone() const + Returns the home phone number of the contact. +*/ + +/*! \fn QString Contact::homeFax() const + Returns the home fax number of the contact. +*/ + +/*! \fn QString Contact::homeMobile() const + Returns the home mobile number of the contact. +*/ + +/*! \fn QString Contact::homeWebpage() const + Returns the home webpage of the contact. +*/ + +/*! \fn QString Contact::company() const + Returns the company for the contact. +*/ + +/*! \fn QString Contact::department() const + Returns the department for the contact. +*/ + +/*! \fn QString Contact::office() const + Returns the office for the contact. +*/ + +/*! \fn QString Contact::jobTitle() const + Returns the job title of the contact. +*/ + +/*! \fn QString Contact::profession() const + Returns the profession of the contact. +*/ + +/*! \fn QString Contact::assistant() const + Returns the assistant of the contact. +*/ + +/*! \fn QString Contact::manager() const + Returns the manager of the contact. +*/ + +/*! \fn QString Contact::businessStreet() const + Returns the business street address of the contact. +*/ + +/*! \fn QString Contact::businessCity() const + Returns the business city of the contact. +*/ + +/*! \fn QString Contact::businessState() const + Returns the business state of the contact. +*/ + +/*! \fn QString Contact::businessZip() const + Returns the business zip of the contact. +*/ + +/*! \fn QString Contact::businessCountry() const + Returns the business country of the contact. +*/ + +/*! \fn QString Contact::businessPhone() const + Returns the business phone number of the contact. +*/ + +/*! \fn QString Contact::businessFax() const + Returns the business fax number of the contact. +*/ + +/*! \fn QString Contact::businessMobile() const + Returns the business mobile number of the contact. +*/ + +/*! \fn QString Contact::businessPager() const + Returns the business pager number of the contact. +*/ + +/*! \fn QString Contact::businessWebpage() const + Returns the business webpage of the contact. +*/ + +/*! \fn QString Contact::spouse() const + Returns the spouse of the contact. +*/ + +/*! \fn QString Contact::gender() const + Returns the gender of the contact. +*/ + +/*! \fn QString Contact::birthday() const + Returns the birthday of the contact. +*/ + +/*! \fn QString Contact::anniversary() const + Returns the anniversary of the contact. +*/ + +/*! \fn QString Contact::nickname() const + Returns the nickname of the contact. +*/ + +/*! \fn QString Contact::children() const + Returns the children of the contact. +*/ + +/*! \fn QString Contact::notes() const + Returns the notes relating to the the contact. +*/ + +/*! \fn QString Contact::groups() const + \internal + Returns the groups for the contact. +*/ + +/*! \fn QStringList Contact::groupList() const + \internal +*/ + +/*! \fn QString Contact::field(int) const + \internal +*/ + +/*! \fn void Contact::saveJournal( journal_action, const QString & = QString::null ) + \internal +*/ + +/*! \fn void Contact::setUid( int id ) + \internal + Sets the uid for this record to \a id. +*/ + +/*! \enum Contact::journal_action + \internal +*/ + +/*! + \internal +*/ QMap<int, QString> Contact::toMap() const { QMap<int, QString> map = mMap; - map.insert( Qtopia::AddressCategory, idsToString( categories() )); + QString cats = idsToString( categories() ); + if ( !cats.isEmpty() ) + map.insert( Qtopia::AddressCategory, cats ); return map; } /*! - Returns a rich text formatted QString of the Contact. + Returns a rich text formatted QString representing the contents the contact. */ QString Contact::toRichText() const { QString text; QString value, comp, state; // name, jobtitle and company if ( !(value = fullName()).isEmpty() ) @@ -226,39 +604,51 @@ QString Contact::toRichText() const //QString tmp = Qtopia::escapeString(value); QString tmp = QStyleSheet::convertFromPlainText(value); //tmp.replace( reg, "<br>" ); text += "<br>" + tmp + "<br>"; } return text; } +/*! + \internal +*/ void Contact::insert( int key, const QString &v ) { QString value = v.stripWhiteSpace(); if ( value.isEmpty() ) mMap.remove( key ); else mMap.insert( key, value ); } +/*! + \internal +*/ void Contact::replace( int key, const QString & v ) { QString value = v.stripWhiteSpace(); if ( value.isEmpty() ) mMap.remove( key ); else mMap.replace( key, value ); } +/*! + \internal +*/ QString Contact::find( int key ) const { return mMap[key]; } +/*! + \internal +*/ QString Contact::displayAddress( const QString &street, const QString &city, const QString &state, const QString &zip, const QString &country ) const { QString s = street; if ( !street.isEmpty() ) @@ -271,30 +661,39 @@ QString Contact::displayAddress( const QString &street, s += " "; s += zip; if ( !country.isEmpty() && !s.isEmpty() ) s += "\n"; s += country; return s; } +/*! + \internal +*/ QString Contact::displayBusinessAddress() const { return displayAddress( businessStreet(), businessCity(), businessState(), businessZip(), businessCountry() ); } +/*! + \internal +*/ QString Contact::displayHomeAddress() const { return displayAddress( homeStreet(), homeCity(), homeState(), homeZip(), homeCountry() ); } +/*! + Returns the full name of the contact +*/ QString Contact::fullName() const { QString title = find( Qtopia::Title ); QString firstName = find( Qtopia::FirstName ); QString middleName = find( Qtopia::MiddleName ); QString lastName = find( Qtopia::LastName ); QString suffix = find( Qtopia::Suffix ); @@ -317,26 +716,72 @@ QString Contact::fullName() const if ( !suffix.isEmpty() ) { if ( !name.isEmpty() ) name += " "; name += suffix; } return name.simplifyWhiteSpace(); } +/*! + Returns a list of the names of the children of the contact. +*/ QStringList Contact::childrenList() const { return QStringList::split( " ", find( Qtopia::Children ) ); } +/*! \fn void Contact::insertEmail( const QString &email ) + + Insert \a email into the email list. Ensures \a email can only be added + once. If there is no default email address set, it sets it to the \a email. +*/ + +/*! \fn void Contact::removeEmail( const QString &email ) + + Removes the \a email from the email list. If the default email was \a email, + then the default email address is assigned to the first email in the + email list +*/ + +/*! \fn void Contact::clearEmails() + + Clears the email list. + */ + +/*! \fn void Contact::insertEmails( const QStringList &emailList ) + + Appends the \a emailList to the exiting email list + */ + +/*! + Returns a list of email addresses belonging to the contact, including + the default email address. +*/ QStringList Contact::emailList() const { - return QStringList::split( ";", find( Qtopia::Emails ) ); + QString emailStr = emails(); + + QStringList r; + if ( !emailStr.isEmpty() ) { + qDebug(" emailstr "); + QStringList l = QStringList::split( emailSeparator(), emailStr ); + for ( QStringList::ConstIterator it = l.begin();it != l.end();++it ) + r += (*it).simplifyWhiteSpace(); + } + + return r; } +/*! + \overload + + Generates the string for the contact to be filed as from the first, + middle and last name of the contact. +*/ void Contact::setFileAs() { QString lastName, firstName, middleName, fileas; lastName = find( Qtopia::LastName ); firstName = find( Qtopia::FirstName ); middleName = find( Qtopia::MiddleName ); if ( !lastName.isEmpty() && !firstName.isEmpty() @@ -348,16 +793,20 @@ void Contact::setFileAs() !middleName.isEmpty() ) fileas = firstName + ( firstName.isEmpty() ? "" : " " ) + middleName + ( middleName.isEmpty() ? "" : " " ) + lastName; replace( Qtopia::FileAs, fileas ); } +/*! + \internal + Appends the contact information to \a buf. +*/ void Contact::save( QString &buf ) const { static const QStringList SLFIELDS = fields(); // I'm expecting "<Contact " in front of this... for ( QMap<int, QString>::ConstIterator it = mMap.begin(); it != mMap.end(); ++it ) { const QString &value = it.data(); int key = it.key(); @@ -372,16 +821,20 @@ void Contact::save( QString &buf ) const } buf += customToXml(); if ( categories().count() > 0 ) buf += "Categories=\"" + idsToString( categories() ) + "\" "; buf += "Uid=\"" + QString::number( uid() ) + "\" "; // You need to close this yourself } +/*! + \internal + Returns the list of fields belonging to a contact +*/ QStringList Contact::fields() { QStringList list; list.append( "Title" ); // Not Used! list.append( "FirstName" ); list.append( "MiddleName" ); list.append( "LastName" ); @@ -430,16 +883,20 @@ QStringList Contact::fields() list.append( "Children" ); list.append( "Notes" ); list.append( "Groups" ); return list; } +/*! + \internal + Returns a translated list of field names for a contact. +*/ QStringList Contact::trfields() { QStringList list; list.append( QObject::tr( "Name Title") ); list.append( QObject::tr( "First Name" ) ); list.append( QObject::tr( "Middle Name" ) ); list.append( QObject::tr( "Last Name" ) ); @@ -488,45 +945,61 @@ QStringList Contact::trfields() list.append( QObject::tr( "Children" ) ); list.append( QObject::tr( "Notes" ) ); list.append( QObject::tr( "Groups" ) ); return list; } -void Contact::setEmails( const QString &v ) +/*! + Sets the list of email address for contact to those contained in \a str. + Email address should be separated by ';'s. +*/ +void Contact::setEmails( const QString &str ) { - replace( Qtopia::Emails, v ); - if ( v.isEmpty() ) + replace( Qtopia::Emails, str ); + if ( str.isEmpty() ) setDefaultEmail( QString::null ); } -void Contact::setChildren( const QString &v ) +/*! + Sets the list of children for the contact to those contained in \a str. +*/ +void Contact::setChildren( const QString &str ) { - replace( Qtopia::Children, v ); + replace( Qtopia::Children, str ); } // vcard conversion code +/*! + \internal +*/ static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) { VObject *ret = 0; if ( o && !value.isEmpty() ) ret = addPropValue( o, prop, value.latin1() ); return ret; } +/*! + \internal +*/ static inline VObject *safeAddProp( VObject *o, const char *prop) { VObject *ret = 0; if ( o ) ret = addProp( o, prop ); return ret; } +/*! + \internal +*/ static VObject *createVObject( const Contact &c ) { VObject *vcard = newVObject( VCCardProp ); safeAddPropValue( vcard, VCVersionProp, "2.1" ); safeAddPropValue( vcard, VCLastRevisedProp, TimeConversion::toISO8601( QDateTime::currentDateTime() ) ); safeAddPropValue( vcard, VCUniqueStringProp, QString::number(c.uid()) ); // full name @@ -617,22 +1090,23 @@ static VObject *createVObject( const Contact &c ) safeAddPropValue( vcard, "X-Qtopia-Anniversary", c.anniversary() ); safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() ); safeAddPropValue( vcard, "X-Qtopia-Children", c.children() ); return vcard; } +/*! + \internal +*/ static Contact parseVObject( VObject *obj ) { Contact c; - bool haveDefaultEmail = FALSE; - VObjectIterator it; initPropIterator( &it, obj ); while( moreIteration( &it ) ) { VObject *o = nextVObject( &it ); QCString name = vObjectName( o ); QCString value = vObjectStringZValue( o ); if ( name == VCNameProp ) { VObjectIterator nit; @@ -762,24 +1236,17 @@ static Contact parseVObject( VObject *obj ) QCString name = vObjectTypeInfo( o ); if ( name != VCInternetProp && name != VCHomeProp && name != VCWorkProp && name != VCPreferredProp ) // ### preffered should map to default email valid = FALSE; } if ( valid ) { - if ( haveDefaultEmail ) { - QString str = c.emails(); - if ( !str.isEmpty() ) - str += ","+email; - c.setEmails( str ); - } else { - c.setDefaultEmail( email ); - } + c.insertEmail( email ); } } else if ( name == VCURLProp ) { VObjectIterator nit; initPropIterator( &nit, o ); while( moreIteration( &nit ) ) { VObject *o = nextVObject( &nit ); QCString name = vObjectTypeInfo( o ); @@ -846,16 +1313,19 @@ static Contact parseVObject( VObject *obj ) } } #endif } c.setFileAs(); return c; } +/*! + Writes the list of \a contacts as a set of VCards to the file \a filename. +*/ void Contact::writeVCard( const QString &filename, const QValueList<Contact> &contacts) { QFileDirect f( filename.utf8().data() ); if ( !f.open( IO_WriteOnly ) ) { qWarning("Unable to open vcard write"); return; } @@ -863,32 +1333,37 @@ void Contact::writeVCard( const QString &filename, const QValueList<Contact> &co for( it = contacts.begin(); it != contacts.end(); ++it ) { VObject *obj = createVObject( *it ); writeVObject(f.directHandle() , obj ); cleanVObject( obj ); } cleanStrTbl(); } +/*! + writes \a contact as a VCard to the file \a filename. +*/ void Contact::writeVCard( const QString &filename, const Contact &contact) { QFileDirect f( filename.utf8().data() ); if ( !f.open( IO_WriteOnly ) ) { qWarning("Unable to open vcard write"); return; } VObject *obj = createVObject( contact ); writeVObject( f.directHandle() , obj ); cleanVObject( obj ); cleanStrTbl(); } - +/*! + Returns the set of contacts read as VCards from the file \a filename. +*/ QValueList<Contact> Contact::readVCard( const QString &filename ) { qDebug("trying to open %s, exists=%d", filename.utf8().data(), QFileInfo( filename.utf8().data() ).size() ); VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() ); qDebug("vobject = %p", obj ); QValueList<Contact> contacts; @@ -899,21 +1374,30 @@ QValueList<Contact> Contact::readVCard( const QString &filename ) VObject *t = obj; obj = nextVObjectInList(obj); cleanVObject( t ); } return contacts; } +/*! + Returns TRUE if the contact matches the regular expression \a regexp. + Otherwise returns FALSE. +*/ bool Contact::match( const QString ®exp ) const { return match(QRegExp(regexp)); } +/*! + \overload + Returns TRUE if the contact matches the regular expression \a regexp. + Otherwise returns FALSE. +*/ bool Contact::match( const QRegExp &r ) const { bool match; match = false; QMap<int, QString>::ConstIterator it; for ( it = mMap.begin(); it != mMap.end(); ++it ) { if ( (*it).find( r ) > -1 ) { match = true; diff --git a/library/backend/contact.h b/library/backend/contact.h index a74cbbe..4999430 100644 --- a/library/backend/contact.h +++ b/library/backend/contact.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -16,24 +16,24 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef __CONTACT_H__ #define __CONTACT_H__ -#include <qpe/palmtoprecord.h> -#include <qpe/recordfields.h> +#include <qtopia/private/palmtoprecord.h> +#include <qtopia/private/recordfields.h> #include <qstringlist.h> #if defined(QPC_TEMPLATEDLL) // MOC_SKIP_BEGIN -template class QPC_EXPORT QMap<int, QString>; +QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; // MOC_SKIP_END #endif class ContactPrivate; class QPC_EXPORT Contact : public Qtopia::Record { friend class DataSet; public: @@ -51,19 +51,22 @@ public: void setFirstName( const QString &v ) { replace( Qtopia::FirstName, v ); } void setMiddleName( const QString &v ) { replace( Qtopia::MiddleName, v ); } void setLastName( const QString &v ) { replace( Qtopia::LastName, v ); } void setSuffix( const QString &v ) { replace( Qtopia::Suffix, v ); } void setFileAs( const QString &v ) { replace( Qtopia::FileAs, v ); } void setFileAs(); // default email address - void setDefaultEmail( const QString &v ) { replace( Qtopia::DefaultEmail, v ); } - // the emails should be seperated by a semicolon - void setEmails( const QString &v ); + void setDefaultEmail( const QString &v ); + // inserts email to list and ensure's doesn't already exist + void insertEmail( const QString &v ); + void removeEmail( const QString &v ); + void clearEmails(); + void insertEmails( const QStringList &v ); // home void setHomeStreet( const QString &v ) { replace( Qtopia::HomeStreet, v ); } void setHomeCity( const QString &v ) { replace( Qtopia::HomeCity, v ); } void setHomeState( const QString &v ) { replace( Qtopia::HomeState, v ); } void setHomeZip( const QString &v ) { replace( Qtopia::HomeZip, v ); } void setHomeCountry( const QString &v ) { replace( Qtopia::HomeCountry, v ); } void setHomePhone( const QString &v ) { replace( Qtopia::HomePhone, v ); } @@ -118,17 +121,16 @@ public: QString firstName() const { return find( Qtopia::FirstName ); } QString middleName() const { return find( Qtopia::MiddleName ); } QString lastName() const { return find( Qtopia::LastName ); } QString suffix() const { return find( Qtopia::Suffix ); } QString fileAs() const { return find( Qtopia::FileAs ); } // email QString defaultEmail() const { return find( Qtopia::DefaultEmail ); } - QString emails() const { return find( Qtopia::Emails ); } QStringList emailList() const; // home QString homeStreet() const { return find( Qtopia::HomeStreet ); } QString homeCity() const { return find( Qtopia::HomeCity ); } QString homeState() const { return find( Qtopia::HomeState ); } QString homeZip() const { return find( Qtopia::HomeZip ); } QString homeCountry() const { return find( Qtopia::HomeCountry ); } @@ -197,26 +199,108 @@ public: // journaling... void saveJournal( journal_action action, const QString &key = QString::null ); void save( QString &buf ) const; void setUid( int i ) { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } private: + friend class AbEditor; friend class AbTable; + friend class AddressBookAccessPrivate; + friend class XMLIO; + + QString emailSeparator() const { return " "; } + // the emails should be seperated by a comma + void setEmails( const QString &v ); + QString emails() const { return find( Qtopia::Emails ); } + void insert( int key, const QString &value ); void replace( int key, const QString &value ); QString find( int key ) const; QString displayAddress( const QString &street, const QString &city, const QString &state, const QString &zip, const QString &country ) const; Qtopia::UidGen &uidGen() { return sUidGen; } static Qtopia::UidGen sUidGen; QMap<int, QString> mMap; ContactPrivate *d; }; +// these methods are inlined to keep binary compatability with Qtopia 1.5 +inline void Contact::insertEmail( const QString &v ) +{ + //qDebug("insertEmail %s", v.latin1()); + QString e = v.simplifyWhiteSpace(); + QString def = defaultEmail(); + + // if no default, set it as the default email and don't insert + if ( def.isEmpty() ) { + setDefaultEmail( e ); // will insert into the list for us + return; + } + + // otherwise, insert assuming doesn't already exist + QString emailsStr = find( Qtopia::Emails ); + if ( emailsStr.contains( e )) + return; + if ( !emailsStr.isEmpty() ) + emailsStr += emailSeparator(); + emailsStr += e; + replace( Qtopia::Emails, emailsStr ); +} + +inline void Contact::removeEmail( const QString &v ) +{ + QString e = v.simplifyWhiteSpace(); + QString def = defaultEmail(); + QString emailsStr = find( Qtopia::Emails ); + QStringList emails = emailList(); + + // otherwise, must first contain it + if ( !emailsStr.contains( e ) ) + return; + + // remove it + //qDebug(" removing email from list %s", e.latin1()); + emails.remove( e ); + // reset the string + emailsStr = emails.join(emailSeparator()); // Sharp's brain dead separator + replace( Qtopia::Emails, emailsStr ); + + // if default, then replace the default email with the first one + if ( def == e ) { + //qDebug("removeEmail is default; setting new default"); + if ( !emails.count() ) + clearEmails(); + else // setDefaultEmail will remove e from the list + setDefaultEmail( emails.first() ); + } +} +inline void Contact::clearEmails() +{ + mMap.remove( Qtopia::DefaultEmail ); + mMap.remove( Qtopia::Emails ); +} +inline void Contact::setDefaultEmail( const QString &v ) +{ + QString e = v.simplifyWhiteSpace(); + + //qDebug("Contact::setDefaultEmail %s", e.latin1()); + replace( Qtopia::DefaultEmail, e ); + + if ( !e.isEmpty() ) + insertEmail( e ); + +} + +inline void Contact::insertEmails( const QStringList &v ) +{ + for ( QStringList::ConstIterator it = v.begin(); it != v.end(); ++it ) + insertEmail( *it ); +} + #endif diff --git a/library/backend/event.cpp b/library/backend/event.cpp index 50a663d..7110717 100644 --- a/library/backend/event.cpp +++ b/library/backend/event.cpp @@ -1,33 +1,33 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include "event.h"
+#include "event.h" #include "qfiledirect_p.h" -#include <qpe/timeconversion.h> -#include <qpe/stringutil.h> -#include <qpe/recordfields.h> +#include <qtopia/timeconversion.h> +#include <qtopia/stringutil.h> +#include <qtopia/private/recordfields.h> #include <qbuffer.h> #include <time.h> #include "vobject_p.h" #include <stdio.h> using namespace Qtopia; @@ -66,28 +66,280 @@ static void write( QString& buf, const Event::RepeatPattern &r ) buf += " enddt=\"" + QString::number( r.endDateUTC ? r.endDateUTC : time( 0 ) ) + "\""; buf += " created=\"" + QString::number( r.createTime ) + "\""; } Qtopia::UidGen Event::sUidGen( Qtopia::UidGen::Qtopia ); +/*! + \class Event event.h + \brief The Event class holds the data of a calendar event. + + This data includes descriptive data of the event and schedualing information. + + \ingroup qtopiaemb + \ingroup qtopiadesktop +*/ + +/*! + \class Event::RepeatPattern + \class The Event::RepeatPattern class is internal. + \internal +*/ + +/*! + \enum Event::Days + \internal +*/ + +/*! + \enum Event::Type + \internal +*/ + +/*! + \enum Event::SoundTypeChoice + + This enum type defines what kind of sound is made when an alarm occurs + for an event. The currently defined types are: + + <ul> + <li>\c Silent - No sound is produced. + <li>\c Loud - A loud sound is produced. + </ul> +*/ + +/*! + \fn bool Event::operator<( const Event & ) const + \internal +*/ + +/*! + \fn bool Event::operator<=( const Event & ) const + \internal +*/ + +/*! + \fn bool Event::operator!=( const Event & ) const + \internal +*/ + +/*! + \fn bool Event::operator>( const Event & ) const + \internal +*/ + +/*! + \fn bool Event::operator>=( const Event & ) const + \internal +*/ + +/*! + \enum Event::RepeatType + + This enum defines how a event will repeat, if at all. + + <ul> + <li>\c NoRepeat - Event does not repeat. + <li>\c Daily - Event occurs every n days. + <li>\c Weekly - Event occurs every n weeks. + <li>\c MonthlyDay - Event occurs every n months. Event will always occur in + the same week and same day of week as the first event. + <li>\c MonthlyDate - Event occurs every n months. Event will always occur + on the same day of the month as the first event. + <li>\c Yearly - Event occurs every n years. + </ul> +*/ + +/*! + \fn bool Event::isAllDay() const + + Returns TRUE if the event is an all day event. Otherwise returns FALSE. +*/ + +/*! + \fn void Event::setAllDay(bool allday) + + If \a allday is TRUE, will set the event to be an all day event. + Otherwise sets the event to not be an all day event. + + \warning This function may affect the start and end times of the event. +*/ + +/*! + \fn QDateTime Event::start() const + + Returns the start date and time of the first occurance of the event. +*/ + +/*! + \fn QDateTime Event::end() const + + Returns the end date and time of the first occurance of the event. +*/ + +/*! + \fn time_t Event::startTime() const + \internal +*/ + +/*! + \fn time_t Event::endTime() const + \internal +*/ + +/*! + \fn void Event::setAlarm(int delay, SoundTypeChoice s) + + Sets the alarm delay of the event to \a delay and the sound type of the + alarm to \a s. +*/ + +/*! + \fn void Event::clearAlarm() + + Clears the alarm for the event. +*/ + +/*! + \fn int Event::alarmDelay() const + + Returns the delay in minutes between the alarm for an event and the + start of the event. +*/ + +/*! + \fn Event::RepeatType Event::repeatType() const + + Returns the repeat pattern type for the event. + + \sa frequency() +*/ + +/*! + \fn int Event::weekOffset() const + + Returns the number of weeks from the start of the month that this event + occurs. +*/ + +/*! + \fn QDate Event::repeatTill() const + + Returns the date that the event will continue to repeat until. If the event + repeats forever the value returned is undefined. + + \sa repeatForever() +*/ + +/*! + \fn bool Event::repeatForever() const + + Returns FALSE if there is a date set for the event to continue until. + Otherwise returns TRUE. +*/ + +/*! + \fn bool Event::doRepeat() const + \internal +*/ + +/*! + \fn bool Event::repeatOnWeekDay(int day) const + + Returns TRUE if the event has a RepeatType of Weekly and is set to occur on + \a day each week. Otherwise returns FALSE. + + \sa QDate::dayName() +*/ + +/*! + \fn void Event::setRepeatOnWeekDay(int day, bool enable) + + If \a enable is TRUE then sets the event to occur on \a day each week. + Otherwise sets the event not to occur on \a day. + + \warning this function is only relavent for a event with RepeatType of + Weekly. + + \sa QDate::dayName() +*/ + +/*! + \fn int Event::frequency() const + + Returns how often the event repeats. + + \sa repeatType() +*/ + +/*! + \fn void Event::setRepeatType(RepeatType t) + + Sets the repeat pattern type of the event to \a t. + + \sa setFrequency() +*/ + +/*! + \fn void Event::setFrequency(int n) + + Sets how often the event occurs with in its repeat pattern. + + \sa setRepeatType() +*/ + +/*! + \fn void Event::setRepeatTill(const QDate &d) + + Sets the event to repeat until \a d. +*/ + +/*! + \fn void Event::setRepeatForever(bool enable) + + If \a enable is TRUE, sets the event to repeat forever. Otherwise + sets the event to stop repeating at some date. + + \warning This function may affect the specific date the event will repeat + till. +*/ + +/*! + \fn bool Event::match(const QRegExp &r) const + + Returns TRUE if the event matches the regular expression \a r. + Otherwise returns FALSE. +*/ + +/*! + \fn char Event::day(int) + \internal +*/ + +/*! + Creates a new, empty event. +*/ Event::Event() : Record() { startUTC = endUTC = time( 0 ); typ = Normal; hAlarm = FALSE; hRepeat = FALSE; aMinutes = 0; aSound = Silent; pattern.type = NoRepeat; pattern.frequency = -1; } +/*! + \internal +*/ Event::Event( const QMap<int, QString> &map ) { setDescription( map[DatebookDescription] ); setLocation( map[Location] ); setCategories( idsFromString( map[DatebookCategory] ) ); setTimeZone( map[TimeZone] ); setNotes( map[Note] ); setStart( TimeConversion::fromUTC( map[StartDateTime].toUInt() ) ); @@ -101,66 +353,91 @@ Event::Event( const QMap<int, QString> &map ) p.days = map[ RepeatPatternDays ].toInt(); p.hasEndDate = map[ RepeatPatternHasEndDate ].toInt(); p.endDateUTC = map[ RepeatPatternEndDate ].toUInt(); setRepeat( p ); setUid( map[ DatebookUid ].toInt() ); } +/*! + Destroys an event. +*/ Event::~Event() { } +/*! + \internal +*/ int Event::week( const QDate& date ) { // Calculates the week this date is in within that // month. Equals the "row" is is in in the month view int week = 1; QDate tmp( date.year(), date.month(), 1 ); if ( date.dayOfWeek() < tmp.dayOfWeek() ) ++week; week += ( date.day() - 1 ) / 7; return week; } +/*! + \internal +*/ int Event::occurrence( const QDate& date ) { // calculates the number of occurrances of this day of the // week till the given date (e.g 3rd Wednesday of the month) return ( date.day() - 1 ) / 7 + 1; } +/*! + \internal +*/ int Event::dayOfWeek( char day ) { int dayOfWeek = 1; char i = Event::MON; while ( !( i & day ) && i <= Event::SUN ) { i <<= 1; ++dayOfWeek; } return dayOfWeek; } +/*! + \internal +*/ int Event::monthDiff( const QDate& first, const QDate& second ) { return ( second.year() - first.year() ) * 12 + second.month() - first.month(); } +/*! + \internal +*/ QMap<int, QString> Event::toMap() const { QMap<int, QString> m; - m.insert( DatebookDescription, description() ); - m.insert ( Location, location() ); - m.insert ( DatebookCategory, idsToString( categories() ) ); - m.insert ( TimeZone, timeZone() ); - m.insert ( Note, notes() ); + + if ( !description().isEmpty() ) + m.insert( DatebookDescription, description() ); + if ( !location().isEmpty() ) + m.insert ( Location, location() ); + if ( categories().count() ) + m.insert ( DatebookCategory, idsToString( categories() ) ); + if ( !timeZone().isEmpty() ) + m.insert ( TimeZone, timeZone() ); + if ( !notes().isEmpty() ) + m.insert ( Note, notes() ); + m.insert ( StartDateTime, QString::number( TimeConversion::toUTC( start() ) ) ); m.insert ( EndDateTime, QString::number( TimeConversion::toUTC( end() ) ) ); m.insert ( DatebookType, QString::number( (int)type() ) ); m.insert ( HasAlarm, ( hasAlarm() ? "1" : "0" ) ); m.insert ( SoundType, QString::number( (int)alarmSound() ) ); m.insert ( AlarmTime, QString::number( alarmTime() ) ); m.insert ( RepeatPatternType, QString::number( static_cast<int>( repeatPattern().type ) ) ); m.insert ( RepeatPatternFrequency, QString::number( repeatPattern().frequency ) ); @@ -169,185 +446,271 @@ QMap<int, QString> Event::toMap() const m.insert ( RepeatPatternHasEndDate, QString::number( static_cast<int>( repeatPattern().hasEndDate ) ) ); m.insert ( RepeatPatternEndDate, QString::number( repeatPattern().endDateUTC ) ); m.insert( DatebookUid, QString::number( uid()) ); return m; } +/*! + \internal +*/ void Event::setRepeat( const RepeatPattern &p ) { setRepeat( p.type != NoRepeat, p ); } +/*! + Sets the description of the event to \a s. +*/ void Event::setDescription( const QString &s ) { descript = s; } +/*! + Sets the location of the event to \a s. +*/ void Event::setLocation( const QString &s ) { locat = s; } // void Event::setCategory( const QString &s ) // { // categ = s; // } +/*! + \internal +*/ void Event::setType( Type t ) { typ = t; } +/*! + Sets the start date and time of the first or only occurance of this event + to the date and time \a d. \a d should be in local time. +*/ void Event::setStart( const QDateTime &d ) { startUTC = TimeConversion::toUTC( d ); } +/*! + \internal +*/ void Event::setStart( time_t time ) { startUTC = time; } +/*! + Sets the end date and time of the first or only occurance of this event + to the date and time \a d. \a d should be in local time. +*/ void Event::setEnd( const QDateTime &d ) { endUTC = TimeConversion::toUTC( d ); } +/*! + \internal +*/ void Event::setEnd( time_t time ) { endUTC = time; } +/*! + \internal +*/ void Event::setTimeZone( const QString &z ) { tz = z; } +/*! + \internal +*/ void Event::setAlarm( bool b, int minutes, SoundTypeChoice s ) { hAlarm = b; aMinutes = minutes; aSound = s; } +/*! + \internal +*/ void Event::setRepeat( bool b, const RepeatPattern &p ) { hRepeat = b; pattern = p; } +/*! + Sets the notes for the event to \a n. +*/ void Event::setNotes( const QString &n ) { note = n; } +/*! + Returns the description of the event. +*/ const QString &Event::description() const { return descript; } +/*! + Returns the location of the event. +*/ const QString &Event::location() const { return locat; } // QString Event::category() const // { // return categ; // } +/*! + \internal +*/ Event::Type Event::type() const { return typ; } +/*! + \internal +*/ QDateTime Event::start( bool actual ) const { QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime(); if ( actual && typ == AllDay ) { QTime t = dt.time(); t.setHMS( 0, 0, 0 ); dt.setTime( t ); } return dt; } +/*! + \internal +*/ QDateTime Event::end( bool actual ) const { QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime(); if ( actual && typ == AllDay ) { QTime t = dt.time(); t.setHMS( 23, 59, 59 ); dt.setTime( t ); } return dt; } +/*! + \internal +*/ const QString &Event::timeZone() const { return tz; } +/*! + \internal +*/ bool Event::hasAlarm() const { return hAlarm; } +/*! + \internal +*/ int Event::alarmTime() const { return aMinutes; } +/*! + Returns the sound type for the alarm of this event. +*/ Event::SoundTypeChoice Event::alarmSound() const { return aSound; } +/*! + \internal +*/ bool Event::hasRepeat() const { return doRepeat(); } +/*! + \internal +*/ const Event::RepeatPattern &Event::repeatPattern() const { return pattern; } +/*! + \internal +*/ Event::RepeatPattern &Event::repeatPattern() { return pattern; } +/*! + Returns the notes for the event. +*/ const QString &Event::notes() const { return note; } +/*! + \internal +*/ bool Event::operator==( const Event &e ) const { + if ( uid() && e.uid() == uid() ) + return TRUE; return ( e.descript == descript && e.locat == locat && e.categ == categ && e.typ == typ && e.startUTC == startUTC && e.endUTC == endUTC && e.tz == tz && e.hAlarm == hAlarm && e.aMinutes == aMinutes && e.aSound == aSound && e.hRepeat == hRepeat && e.pattern == pattern && e.note == note ); } +/*! + \internal + Appends the contact information to \a buf. +*/ void Event::save( QString& buf ) { buf += " description=\"" + Qtopia::escapeString(descript) + "\""; if ( !locat.isEmpty() ) buf += " location=\"" + Qtopia::escapeString(locat) + "\""; // save the categoies differently.... QString strCats = idsToString( categories() ); buf += " categories=\"" + Qtopia::escapeString(strCats) + "\""; @@ -373,67 +736,103 @@ void Event::save( QString& buf ) + QString::number( endUTC ) + "\""; if ( !note.isEmpty() ) buf += " note=\"" + Qtopia::escapeString( note ) + "\""; buf += customToXml(); } +/*! + \internal +*/ bool Event::RepeatPattern::operator==( const Event::RepeatPattern &right ) const { // *sigh* return ( type == right.type && frequency == right.frequency && position == right.position && days == right.days && hasEndDate == right.hasEndDate && endDateUTC == right.endDateUTC && createTime == right.createTime ); } +/*! + \class EffectiveEvent + \brief The EffectiveEvent class the data for a single occurance of an event. + + This class describes the event for a single occurance of it. For example if + an Event occurs every week, the effective event might represent the third + occurance of this Event. + + \ingroup qtopiaemb + \ingroup qtopiadesktop + \warning This class will be phased out in Qtopia 3.x +*/ + +/*! + \enum EffectiveEvent::Position + \internal +*/ + +/*! + \fn EffectiveEvent &EffectiveEvent::operator=(const EffectiveEvent &) + \internal +*/ class EffectiveEventPrivate { public: //currently the existence of the d pointer means multi-day repeating, //msut be changed if we use the d pointer for anything else. QDate startDate; QDate endDate; }; - +/*! + \internal +*/ EffectiveEvent::EffectiveEvent() { mDate = QDate::currentDate(); mStart = mEnd = QTime::currentTime(); d = 0; } +/*! + \internal +*/ EffectiveEvent::EffectiveEvent( const Event &e, const QDate &date, Position pos ) { mEvent = e; mDate = date; if ( pos & Start ) mStart = e.start( TRUE ).time(); else mStart = QTime( 0, 0, 0 ); if ( pos & End ) mEnd = e.end( TRUE ).time(); else mEnd = QTime( 23, 59, 59 ); d = 0; } +/*! + \internal +*/ EffectiveEvent::~EffectiveEvent() { delete d; } +/*! + \internal +*/ EffectiveEvent::EffectiveEvent( const EffectiveEvent &e ) { d = 0; *this = e; } EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e ) { @@ -456,148 +855,214 @@ EffectiveEvent& EffectiveEvent::operator=( const EffectiveEvent & e ) } // QString EffectiveEvent::category() const // { // return mEvent.category(); // } +/*! + Returns the description of the event for this effective event. +*/ const QString &EffectiveEvent::description( ) const { return mEvent.description(); } +/*! +\internal +*/ const QString &EffectiveEvent::location( ) const { return mEvent.location(); } +/*! +\internal +*/ const QString &EffectiveEvent::notes() const { return mEvent.notes(); } +/*! + Returns the event associated with this effective event. +*/ const Event &EffectiveEvent::event() const { return mEvent; } +/*! + \internal +*/ const QTime &EffectiveEvent::end() const { return mEnd; } +/*! + \internal +*/ const QTime &EffectiveEvent::start() const { return mStart; } +/*! + Returns the date the effective event occurs on. +*/ const QDate &EffectiveEvent::date() const { return mDate; } +/*! + \internal +*/ int EffectiveEvent::length() const { return (mEnd.hour() * 60 - mStart.hour() * 60) + QABS(mStart.minute() - mEnd.minute() ); } +/*! + \internal +*/ void EffectiveEvent::setDate( const QDate &dt ) { mDate = dt; } +/*! + \internal +*/ void EffectiveEvent::setStart( const QTime &start ) { mStart = start; } +/*! + \internal +*/ void EffectiveEvent::setEnd( const QTime &end ) { mEnd = end; } +/*! + \internal +*/ void EffectiveEvent::setEvent( Event e ) { mEvent = e; } +/*! + \internal +*/ bool EffectiveEvent::operator<( const EffectiveEvent &e ) const { if ( mDate < e.date() ) return TRUE; if ( mDate == e.date() ) return ( mStart < e.start() ); else return FALSE; } +/*! + \internal +*/ bool EffectiveEvent::operator<=( const EffectiveEvent &e ) const { return (mDate <= e.date() ); } +/*! + \internal +*/ bool EffectiveEvent::operator==( const EffectiveEvent &e ) const { return ( mDate == e.date() && mStart == e.start() && mEnd == e.end() && mEvent == e.event() ); } +/*! + \internal +*/ bool EffectiveEvent::operator!=( const EffectiveEvent &e ) const { return !(*this == e); } +/*! + \internal +*/ bool EffectiveEvent::operator>( const EffectiveEvent &e ) const { return !(*this <= e ); } +/*! + \internal +*/ bool EffectiveEvent::operator>=(const EffectiveEvent &e) const { return !(*this < e); } +/*! + \internal +*/ void EffectiveEvent::setEffectiveDates( const QDate &from, const QDate &to ) { if ( !from.isValid() ) { delete d; d = 0; return; } if ( !d ) d = new EffectiveEventPrivate; d->startDate = from; d->endDate = to; } +/*! + \internal +*/ QDate EffectiveEvent::startDate() const { if ( d ) return d->startDate; else if ( mEvent.hasRepeat() ) return mDate; // single day, since multi-day should have a d pointer else return mEvent.start().date(); } +/*! + \internal +*/ QDate EffectiveEvent::endDate() const { if ( d ) return d->endDate; else if ( mEvent.hasRepeat() ) return mDate; // single day, since multi-day should have a d pointer else return mEvent.end().date(); } +/*! + \internal +*/ int EffectiveEvent::size() const { return ( mEnd.hour() - mStart.hour() ) * 3600 + (mEnd.minute() - mStart.minute() * 60 + mEnd.second() - mStart.second() ); } @@ -735,51 +1200,71 @@ static Event parseVObject( VObject *obj ) if ( haveAlarm ) { int minutes = alarmTime.secsTo( e.start() ) / 60; e.setAlarm( TRUE, minutes, soundType ); } return e; } - +/*! + Writes the list of \a events as a set of VCards to the file \a filename. +*/ void Event::writeVCalendar( const QString &filename, const QValueList<Event> &events) -{
- QFileDirect f( filename.utf8().data() );
- if ( !f.open( IO_WriteOnly ) ) {
- qWarning("Unable to open vcard write");
- return;
- }
+{ + + QFileDirect f( filename.utf8().data() ); + + if ( !f.open( IO_WriteOnly ) ) { + + qWarning("Unable to open vcard write"); + + return; + + } + QValueList<Event>::ConstIterator it; for( it = events.begin(); it != events.end(); ++it ) { VObject *obj = createVObject( *it ); writeVObject( f.directHandle() , obj ); cleanVObject( obj ); - }
+ } + cleanStrTbl(); } +/*! + Writes \a event as a VCard to the file \a filename. +*/ void Event::writeVCalendar( const QString &filename, const Event &event) -{
- QFileDirect f( filename.utf8().data() );
- if ( !f.open( IO_WriteOnly ) ) {
- qWarning("Unable to open vcard write");
- return;
- }
+{ + + QFileDirect f( filename.utf8().data() ); + + if ( !f.open( IO_WriteOnly ) ) { + + qWarning("Unable to open vcard write"); + + return; + + } + VObject *obj = createVObject( event ); writeVObject( f.directHandle() , obj ); cleanVObject( obj ); cleanStrTbl(); } - +/*! + Returns the set of events read as VCards from the file \a filename. +*/ QValueList<Event> Event::readVCalendar( const QString &filename ) { VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() ); QValueList<Event> events; while ( obj ) { QCString name = vObjectName( obj ); diff --git a/library/backend/event.h b/library/backend/event.h index 277aadd..7fe41a5 100644 --- a/library/backend/event.h +++ b/library/backend/event.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -18,32 +18,41 @@ ** **********************************************************************/ #ifndef __EVENT_H__ #define __EVENT_H__ #include <qdatetime.h> #include <qvaluelist.h> +#include <qcolor.h> #ifdef PALMTOPCENTER #include <qpc/qsorter.h> #endif -#include <qpe/palmtoprecord.h> +#include <qtopia/private/palmtoprecord.h> #include <qpe/timeconversion.h> +static const QColor colorNormal = QColor(255, 0 , 0 ); +static const QColor colorRepeat = QColor(0 , 0 , 255); +static const QColor colorNormalLight = QColor(255, 220, 220); +static const QColor colorRepeatLight = QColor(200, 200, 255); + class EventPrivate; class QPC_EXPORT Event : public Qtopia::Record { public: enum RepeatType { NoRepeat = -1, Daily, Weekly, MonthlyDay, MonthlyDate, Yearly }; + + // Don't use this. enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, FRI = 0x10, SAT = 0x20, SUN = 0x40 }; + // Don't use this. struct QPC_EXPORT RepeatPattern { RepeatPattern() { type = NoRepeat; frequency = -1; days = 0; position = 0; createTime = -1; hasEndDate = FALSE; endDateUTC = 0; } bool operator ==( const RepeatPattern &right ) const; RepeatType type; @@ -65,70 +74,99 @@ public: static void writeVCalendar( const QString &filename, const QValueList<Event> &events); static void writeVCalendar( const QString &filename, const Event &event); static QValueList<Event> readVCalendar( const QString &filename ); enum Type { Normal, AllDay }; enum SoundTypeChoice { Silent, Loud }; + // Don't use these, there are essentially meaningless. bool operator<( const Event &e1) const { return start() < e1.start(); }; bool operator<=( const Event &e1 ) const { return start() <= e1.start(); }; bool operator!=( const Event &e1 ) const { return !( *this == e1 ); }; bool operator>( const Event &e1 ) const { return start() > e1.start(); }; bool operator>=(const Event &e1 ) const { return start() >= e1.start(); }; bool operator==( const Event &e ) const; void setDescription( const QString &s ); const QString &description() const; void setLocation( const QString &s ); const QString &location() const; - void setType( Type t ); - Type type() const; + void setNotes( const QString &n ); + const QString ¬es() const; + + void setType( Type t ); // Don't use me. + Type type() const; // Don't use me. + + void setAllDay(bool); + bool isAllDay() const; + void setStart( const QDateTime &d ); - void setStart( time_t time ); - QDateTime start( bool actual = FALSE ) const; - time_t startTime() const { return startUTC; } + void setStart( time_t time ); // don't use me. + QDateTime start( ) const; + QDateTime start( bool actual ) const; // don't use me. + time_t startTime() const { return startUTC; } // don't use me. void setEnd( const QDateTime &e ); - void setEnd( time_t time ); - QDateTime end( bool actual = FALSE ) const; - time_t endTime() const { return endUTC; } + void setEnd( time_t time ); // don't use me + QDateTime end( ) const; + QDateTime end( bool actual ) const; // don't use me. + time_t endTime() const { return endUTC; } // don't use me. void setTimeZone( const QString & ); const QString &timeZone() const; - void setAlarm( bool b, int minutes, SoundTypeChoice ); + void setAlarm( int minutes, SoundTypeChoice ); + void clearAlarm(); + void setAlarm( bool b, int minutes, SoundTypeChoice ); // Don't use me. bool hasAlarm() const; - int alarmTime() const; + int alarmDelay() const; + int alarmTime() const; // Don't use me. SoundTypeChoice alarmSound() const; + + RepeatType repeatType() const; + int frequency() const; + int weekOffset() const; + QDate repeatTill() const; + bool repeatForever() const; + bool repeatOnWeekDay(int day) const; + + void setRepeatType(RepeatType); + void setFrequency(int); + void setRepeatTill(const QDate &); + void setRepeatForever(bool); + void setRepeatOnWeekDay(int day, bool enable); + + // Don't use any of these. void setRepeat( bool b, const RepeatPattern &p ); void setRepeat( const RepeatPattern &p ); bool hasRepeat() const; const RepeatPattern &repeatPattern() const; RepeatPattern &repeatPattern(); - void setNotes( const QString &n ); - const QString ¬es() const; bool doRepeat() const { return pattern.type != NoRepeat; } void save( QString& buf ); //void load( Node *n ); + bool match( const QRegExp &r ) const; + + // Don't use these either. Functionality will be moved elsewhere. + // helper function to calculate the week of the given date static int week( const QDate& date ); // calculates the number of occurrences of the week day of // the given date from the start of the month static int occurrence( const QDate& date ); // returns a proper days-char for a given dayOfWeek() static char day( int dayOfWeek ) { return 1 << ( dayOfWeek - 1 ); } // returns the dayOfWeek for the *first* day it finds (ignores // any further days!). Returns 1 (Monday) if there isn't any day found static int dayOfWeek( char day ); // returns the difference of months from first to second. static int monthDiff( const QDate& first, const QDate& second ); - bool match( const QRegExp &r ) const; private: Qtopia::UidGen &uidGen() { return sUidGen; } static Qtopia::UidGen sUidGen; QString descript, locat, categ; Type typ : 4; bool startTimeDirty : 1; @@ -206,16 +244,119 @@ private: class EffectiveEventPrivate *d; Event mEvent; QDate mDate; QTime mStart, mEnd; }; +inline void Event::setAlarm( int minutes, SoundTypeChoice s ) +{ + setAlarm(TRUE, minutes, s); +} + +inline void Event::clearAlarm() +{ + setAlarm(FALSE, 0, Silent); +} + +inline int Event::alarmDelay() const +{ + return alarmTime(); +} + +inline void Event::setAllDay(bool enable) +{ + if (enable) + setType(AllDay); + else + setType(Normal); +}; + +inline bool Event::isAllDay() const +{ + return type() == AllDay; +} + +inline Event::RepeatType Event::repeatType() const +{ + return repeatPattern().type; +} + +inline int Event::frequency() const +{ + return repeatPattern().frequency; +} + +inline int Event::weekOffset() const +{ + if (start().date().day() == 1) + return 1; + return (start().date().day() - 1) / 7 + 1; +} + +inline QDate Event::repeatTill() const +{ + return repeatPattern().endDate(); +} + +inline bool Event::repeatForever() const +{ + return !repeatPattern().hasEndDate; +} + +inline void Event::setRepeatType(RepeatType t) +{ + pattern.type = t; +} + +inline void Event::setFrequency(int f) +{ + pattern.frequency = f; +} + +inline void Event::setRepeatTill(const QDate &d) +{ + pattern.setEndDate(d); + pattern.hasEndDate = TRUE; +} + +inline void Event::setRepeatForever(bool b) +{ + if (!b == pattern.hasEndDate) + return; + if (!b && !pattern.hasEndDate) + pattern.setEndDate(end().date()); + pattern.hasEndDate = !b; +} + +inline bool Event::repeatOnWeekDay(int day) const +{ + if (pattern.type != Weekly) + return FALSE; + return ( (1 << (day - 1)) & pattern.days ) != 0; +} + +inline void Event::setRepeatOnWeekDay(int day, bool enable) +{ + if ( repeatOnWeekDay( day ) != enable ) + pattern.days ^= 1 << (day - 1); +} + +inline QDateTime Event::start( ) const +{ + return start(FALSE); +} + +inline QDateTime Event::end( ) const +{ + return end(FALSE); +} + #ifdef PALMTOPCENTER class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> { public: int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const { return a.size() - b.size(); } diff --git a/library/backend/palmtoprecord.cpp b/library/backend/palmtoprecord.cpp index 0d57699..3cfa874 100644 --- a/library/backend/palmtoprecord.cpp +++ b/library/backend/palmtoprecord.cpp @@ -1,34 +1,45 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included -** in the packaging of this file. +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. ** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING -** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A -** PARTICULAR PURPOSE. +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include "palmtoprecord.h" -#include "stringutil.h" +#include <qtopia/private/palmtoprecord.h> +#include <qtopia/stringutil.h> #include <qstringlist.h> +/*! \class Qtopia::PalmtopRecord palmtoprecord.h + \brief The Qtopia::PalmtopRecord class is the base class for all PIM records. + + Provides unique id and category support for all PIM records. + + \ingroup qtopiaemb + \ingroup qtopiadesktop +*/ + + namespace Qtopia { + + Record &Record::operator=( const Record &c ) { mUid = c.mUid; mCats = c.mCats; customMap = c.customMap; return *this; } @@ -36,18 +47,21 @@ void Record::setCategories( int single ) { if ( single == 0 ) return; mCats.resize(1); mCats[0] = single; } // convenience methods provided for loading and saving to xml -QString Record::idsToString( const QArray<int> &cats ) +QString Record::idsToString( const QArray<int> &catsUnsorted ) { + QArray<int> cats = catsUnsorted; + cats.sort(); + QString str; for ( uint i = 0; i < cats.size(); i++ ) if ( i == 0 ) str = QString::number( cats[int(i)] ); else str += ";" + QString::number( cats[int(i)] ); return str; @@ -79,40 +93,40 @@ QString Record::customField( const QString &key) const return QString::null; } /*! Sets the string stored for the custom field \a key to \a value. */ void Record::setCustomField( const QString &key, const QString &value) { - qWarning("setting custom " + key + " to " + value); +// qWarning("setting custom " + key + " to " + value); if (customMap.contains(key)) customMap.replace(key, value); else customMap.insert(key, value); - qWarning(QString("custom size %1").arg(customMap.count())); +// qWarning(QString("custom size %1").arg(customMap.count())); } /*! Removes the custom field \a key. */ void Record::removeCustomField(const QString &key) { customMap.remove(key); } QString Record::customToXml() const { //qWarning(QString("writing custom %1").arg(customMap.count())); QString buf(" "); for ( QMap<QString, QString>::ConstIterator cit = customMap.begin(); cit != customMap.end(); ++cit) { - qWarning(".ITEM."); +// qWarning(".ITEM."); buf += cit.key(); buf += "=\""; buf += escapeString(cit.data()); buf += "\" "; } return buf; } diff --git a/library/backend/palmtoprecord.h b/library/backend/palmtoprecord.h index 0372011..72f7d1c 100644 --- a/library/backend/palmtoprecord.h +++ b/library/backend/palmtoprecord.h @@ -1,41 +1,38 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included -** in the packaging of this file. +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. ** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING -** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A -** PARTICULAR PURPOSE. +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ - #ifndef QTPALMTOP_RECORD_H #define QTPALMTOP_RECORD_H - #include <qglobal.h> #include "qpcglobal.h" #include "palmtopuidgen.h" #include <qarray.h> #include <qmap.h> #if defined(QPC_TEMPLATEDLL) // MOC_SKIP_BEGIN -template class QPC_EXPORT QMap<QString, QString>; +QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<QString, QString>; // MOC_SKIP_END #endif class QRegExp; namespace Qtopia { class RecordPrivate; class QPC_EXPORT Record @@ -44,20 +41,27 @@ public: Record() : mUid(0), mCats() { } Record( const Record &c ) : mUid( c.mUid ), mCats ( c.mCats ), customMap(c.customMap) { } virtual ~Record() { } Record &operator=( const Record &c ); virtual bool match( const QRegExp & ) const { return FALSE; } - void setCategories( const QArray<int> &v ) { mCats = v; } + void setCategories( const QArray<int> &v ) { mCats = v; mCats.sort(); } void setCategories( int single ); const QArray<int> &categories() const { return mCats; } + void reassignCategoryId( int oldId, int newId ) + { + int index = mCats.find( oldId ); + if ( index >= 0 ) + mCats[index] = newId; + } + int uid() const { return mUid; }; virtual void setUid( int i ) { mUid = i; uidGen().store( mUid ); } bool isValidUid() const { return mUid != 0; } void assignUid() { setUid( uidGen().generate() ); } virtual QString customField(const QString &) const; virtual void setCustomField(const QString &, const QString &); virtual void removeCustomField(const QString &); @@ -72,23 +76,20 @@ public: // convenience methods provided for loading and saving to xml static QArray<int> idsFromString( const QString &str ); // for debugging static void dump( const QMap<int, QString> &map ); protected: virtual UidGen &uidGen() = 0; - virtual QString customToXml() const; - private: int mUid; QArray<int> mCats; - QMap<QString, QString> customMap; - RecordPrivate *d; }; } #endif + diff --git a/library/backend/palmtopuidgen.h b/library/backend/palmtopuidgen.h index 1a16681..c3fbcb9 100644 --- a/library/backend/palmtopuidgen.h +++ b/library/backend/palmtopuidgen.h @@ -1,38 +1,38 @@ -#ifndef QTPALMTOP_UIDGEN_H -#define QTPALMTOP_UIDGEN_H /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** -** Licensees holding valid Qtopia Developer license may use this -** file in accordance with the Qtopia Developer License Agreement -** provided with the Software. +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. ** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING -** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR -** PURPOSE. +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** -** email sales@trolltech.com for information about Qtopia License -** Agreements. +** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ +#ifndef QTPALMTOP_UIDGEN_H +#define QTPALMTOP_UIDGEN_H + #include <time.h> #include <qmap.h> #include "qpcglobal.h" #if defined(QPC_TEMPLATEDLL) // MOC_SKIP_BEGIN -template class QPC_EXPORT QMap< int, bool >; +QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap< int, bool >; // MOC_SKIP_END #endif namespace Qtopia { class QPC_EXPORT UidGen { diff --git a/library/backend/qfiledirect_p.h b/library/backend/qfiledirect_p.h index 3ade622..976c69f 100644 --- a/library/backend/qfiledirect_p.h +++ b/library/backend/qfiledirect_p.h @@ -1,37 +1,35 @@ -/**********************************************************************
-** Copyright (C) 2001 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** Licensees holding valid Qtopia Developer license may use this
-** file in accordance with the Qtopia Developer License Agreement
-** provided with the Software.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
-** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-** PURPOSE.
-**
-** email sales@trolltech.com for information about Qtopia License
-** Agreements.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef QFILE_DIRECT_H
-#define QFILE_DIRECT_H
-#include <qfile.h>
-#include <qpe/qpcglobal.h>
-
-class QPC_EXPORT QFileDirect : public QFile
-{
-public:
- QFileDirect() : QFile() { }
- QFileDirect( const QString &name ) : QFile(name) { }
-
- FILE *directHandle() { return fh; }
-};
-
-#endif
-
+/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of the Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef QFILE_DIRECT_H +#define QFILE_DIRECT_H +#include <qfile.h> +#include <qtopia/private/qpcglobal.h> + +class QPC_EXPORT QFileDirect : public QFile +{ +public: + QFileDirect() : QFile() { } + QFileDirect( const QString &name ) : QFile(name) { } + + FILE *directHandle() { return fh; } +}; + +#endif diff --git a/library/backend/qpcglobal.h b/library/backend/qpcglobal.h index 0d60272..7b71f06 100644 --- a/library/backend/qpcglobal.h +++ b/library/backend/qpcglobal.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** Licensees holding valid Qtopia Developer license may use this ** file in accordance with the Qtopia Developer License Agreement ** provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING ** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR ** PURPOSE. @@ -17,30 +17,33 @@ ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef QPC_GLOBAL_H #define QPC_GLOBAL_H -#if ( defined(Q_OS_WIN32) || defined(Q_OS_WIN64) ) && defined(PALMTOPCENTER) #include <qglobal.h> + +#if ( defined(Q_OS_WIN32) || defined(Q_OS_WIN64) ) && defined(PALMTOPCENTER) // # if defined(QT_NODLL) //# undef QPC_MAKEDLL //# undef QPC_DLL # if defined(QPC_MAKEDLL) /* create a Qt DLL library */ # if defined(QPC_DLL) # undef QPC_DLL # endif # define QPC_EXPORT __declspec(dllexport) +# define QPC_TEMPLATEEXTERN # define QPC_TEMPLATEDLL # undef QPC_DISABLE_COPY /* avoid unresolved externals */ # elif defined(QPC_DLL) /* use a Qt DLL library */ # define QPC_EXPORT __declspec(dllimport) +# define QPC_TEMPLATEEXTERN extern # define QPC_TEMPLATEDLL # undef QPC_DISABLE_COPY /* avoid unresolved externals */ # endif #else # undef QPC_MAKEDLL /* ignore these for other platforms */ # undef QPC_DLL #endif #endif diff --git a/library/backend/recordfields.h b/library/backend/recordfields.h index 4196c8b..1167ed3 100644 --- a/library/backend/recordfields.h +++ b/library/backend/recordfields.h @@ -1,23 +1,22 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** -** Licensees holding valid Qtopia Developer license may use this -** file in accordance with the Qtopia Developer License Agreement -** provided with the Software. +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. ** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING -** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR -** PURPOSE. +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** -** email sales@trolltech.com for information about Qtopia License -** Agreements. +** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef QPC_RECORD_FIELDS_H #define QPC_RECORD_FIELDS_H #include "qpcglobal.h" @@ -83,19 +82,20 @@ namespace Qtopia Gender, Birthday, Anniversary, Nickname, Children, // other Notes, - Groups - ,rid, + // used for internal record keeping, not for end user. + Groups, + rid, rinfo }; // dataset = "todolist" enum TaskFields { TaskUid = UID_ID, TaskCategory = CATEGORY_ID, diff --git a/library/backend/stringutil.cpp b/library/backend/stringutil.cpp deleted file mode 100644 index df58f54..0000000 --- a/library/backend/stringutil.cpp +++ b/dev/null @@ -1,415 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included -** in the packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING -** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A -** PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "stringutil.h" -#include <qregexp.h> -#include <qstringlist.h> - -namespace Qtopia -{ - - - -/* - Very, very simple Latin-1 only collation guaranteed to displease anyone - who actually uses the non-ASCII characters. - */ - -static const char collationHack[] = { -0x00, //C-@ -0x01, //C-A -0x02, //C-B -0x03, //C-C -0x04, //C-D -0x05, //C-E -0x06, //C-F -0x07, //C-G -0x08, //C-H -0x09, //C-I -0x0a, //C-J -0x0b, //C-K -0x0c, //C-L -0x0d, //C-M -0x0e, //C-N -0x0f, //C-O -0x10, //C-P -0x11, //C-Q -0x12, //C-R -0x13, //C-S -0x14, //C-T -0x15, //C-U -0x16, //C-V -0x17, //C-W -0x18, //C-X -0x19, //C-Y -0x1a, //C-Z -0x1b, //C-[ -0x1c, //C-\ -0x1d, //C-] -0x1e, //C-^ -0x1f, //C-_ -' ', // -'!', //! -'"', //" -'#', //# -'$', //$ -'%', //% -'&', //& -'\'', //' -'(', //( -')', //) -'*', //* -'+', //+ -',', //, -'-', //- -'.', //. -'/', /// -0x80, //0 -0x81, //1 -0x82, //2 -0x83, //3 -0x84, //4 -0x85, //5 -0x86, //6 -0x87, //7 -0x88, //8 -0x89, //9 -':', //: -';', //; -'<', //< -'=', //= -'>', //> -'?', //? -'@', //@ -'A', //A -'B', //B -'C', //C -'D', //D -'E', //E -'F', //F -'G', //G -'H', //H -'I', //I -'J', //J -'K', //K -'L', //L -'M', //M -'N', //N -'O', //O -'P', //P -'Q', //Q -'R', //R -'S', //S -'T', //T -'U', //U -'V', //V -'W', //W -'X', //X -'Y', //Y -'Z', //Z -'[', //[ -'\\', //\ -']', //] -'^', //^ -'_', //_ -'`', //` -'A', //a -'B', //b -'C', //c -'D', //d -'E', //e -'F', //f -'G', //g -'H', //h -'I', //i -'J', //j -'K', //k -'L', //l -'M', //m -'N', //n -'O', //o -'P', //p -'Q', //q -'R', //r -'S', //s -'T', //t -'U', //u -'V', //v -'W', //w -'X', //x -'Y', //y -'Z', //z -'{', //{ -'|', //| -'}', //} -'~', //~ -'', // -0x80, //C-M-@ -0x81, //C-M-A -0x82, //C-M-B -0x83, //C-M-C -0x84, //C-M-D -0x85, //C-M-E -0x86, //C-M-F -0x87, //C-M-G -0x88, //C-M-H -0x89, //C-M-I -0x8a, //C-M-J -0x8b, //C-M-K -0x8c, //C-M-L -0x8d, //C-M-M -0x8e, //C-M-N -0x8f, //C-M-O -0x90, //C-M-P -0x91, //C-M-Q -0x92, //C-M-R -0x93, //C-M-S -0x94, //C-M-T -0x95, //C-M-U -0x96, //C-M-V -0x97, //C-M-W -0x98, //C-M-X -0x99, //C-M-Y -0x9a, //C-M-Z -0x9b, //C-M-[ -0x9c, //C-M-\ -0x9d, //C-M-] -0x9e, //C-M-^ -0x9f, //C-M-_ -' ', // -'¡', //¡ -'¢', //¢ -'£', //£ -'¤', //¤ -'¥', //¥ -'¦', //¦ -'§', //§ -'¨', //¨ -'©', //© -'A', //ª -'«', //« -'¬', //¬ -'', // -'®', //® -'¯', //¯ -'O', //° -'±', //± -'²', //² -'³', //³ -'´', //´ -'µ', //µ -'P', //¶ -'·', //· -'¸', //¸ -'¹', //¹ -'O', //º -'»', //» -'¼', //¼ -'½', //½ -'¾', //¾ -'¿', //¿ -'A', //À -'A', //Á -'A', //Â -'A', //Ã -'A', //Ä -'A', //Å -'A', //Æ -'C', //Ç -'E', //È -'E', //É -'E', //Ê -'E', //Ë -'I', //Ì -'I', //Í -'I', //Î -'I', //Ï -'D', //Ð -'N', //Ñ -'O', //Ò -'O', //Ó -'O', //Ô -'O', //Õ -'O', //Ö -'×', //× -'O', //Ø -'U', //Ù -'U', //Ú -'U', //Û -'U', //Ü -'Y', //Ý -'T', //Þ -'S', //ß -'A', //à -'A', //á -'A', //â -'A', //ã -'A', //ä -'A', //å -'A', //æ -'C', //ç -'E', //è -'E', //é -'E', //ê -'E', //ë -'I', //ì -'I', //í -'I', //î -'I', //ï -'D', //ð -'N', //ñ -'O', //ò -'O', //ó -'O', //ô -'O', //õ -'O', //ö -'÷', //÷ -'O', //ø -'U', //ù -'U', //ú -'U', //û -'U', //ü -'Y', //ý -'T', //þ -'Y', //ÿ -}; - - - - - -static void hackString ( QString &s ) -{ - int len = s.length(); - const QChar* uc = s.unicode(); - for ( int i = 0; i < len; i++ ) { - if ( !uc++->row() ) - s[i] = collationHack[s[i].cell()]; - } -} - -QString buildSortKey( const QString & s ) -{ - QString res = s; - hackString( res ); - return res; -} - -QString buildSortKey( const QString & s1, const QString & s2 ) -{ - QString res = s1 + QChar( '\0' ) + s2; - hackString( res ); - return res; -} - -QString buildSortKey( const QString & s1, const QString & s2, - const QString & s3 ) -{ - QString res = s1 + QChar( '\0' ) + s2 + QChar( '\0' ) + s3; - hackString( res ); - return res; -} - -static inline QChar coll( QChar u ) -{ - return u.row() ? u : QChar(collationHack[ u.cell() ]); -} - - -int compare( const QString & s1, const QString & s2 ) -{ - const QChar* u1 = s1.unicode(); - const QChar* u2 = s2.unicode(); - - if ( u1 == u2 ) - return 0; - if ( u1 == 0 ) - return 1; - if ( u2 == 0 ) - return -1; - int l=QMIN(s1.length(),s2.length()); - while ( l-- && coll(*u1) == coll(*u2) ) - u1++,u2++; - if ( l==-1 ) - return ( s1.length()-s2.length() ); - return u1->unicode() - u2->unicode(); -} - -QString simplifyMultiLineSpace( const QString &multiLine ) -{ - QString result; - QStringList lines = QStringList::split("\n", multiLine); - for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { - if ( it != lines.begin() ) - result += "\n"; - result += (*it).simplifyWhiteSpace(); - } - return result; -} - -QString escapeString( const QString& plain ) -{ - QString tmp(plain); - int pos = tmp.length(); - const QChar *uc = plain.unicode(); - while ( pos-- ) { - unsigned char ch = uc[pos].latin1(); - if ( ch == '&' ) - tmp.replace( pos, 1, "&" ); - else if ( ch == '<' ) - tmp.replace( pos, 1, "<" ); - else if ( ch == '>' ) - tmp.replace( pos, 1, ">" ); - else if ( ch == '\"' ) - tmp.replace( pos, 1, """ ); - } - return tmp; -} - -QString plainString( const char* escaped, unsigned int length ) -{ - return plainString( QString::fromUtf8( escaped, length ) ); -} - -QString plainString( const QCString& string ) -{ - // We first have to pass it through a ::fromUtf8() - return plainString( string.data(), string.length() ); -} - -QString plainString( const QString& string ) -{ - QString tmp( string ); - int pos = -1; - while ( (pos = tmp.find( "&", pos +1 ) ) != -1 ) { - if ( tmp.find( "&", pos ) == pos ) - tmp.replace( pos, 5, "&" ); - else if ( tmp.find( "<", pos ) == pos ) - tmp.replace( pos, 4, "<" ); - else if( tmp.find( ">", pos ) == pos ) - tmp.replace( pos, 4, ">" ); - else if ( tmp.find( """, pos ) == pos ) - tmp.replace( pos, 6, "\"" ); - } - return tmp; -} - -} // namespace QPC diff --git a/library/backend/task.cpp b/library/backend/task.cpp index f0a38f1..a00adb3 100644 --- a/library/backend/task.cpp +++ b/library/backend/task.cpp @@ -1,85 +1,200 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include <qpe/task.h> -#include <qregexp.h> -#include <qstring.h> -#include <qpe/recordfields.h> +#include "task.h" +#include "recordfields.h" #include "vobject_p.h" -#include "timeconversion.h" #include "qfiledirect_p.h" +#include <qtopia/timeconversion.h> + +#include <qregexp.h> +#include <qstring.h> + #include <stdio.h> using namespace Qtopia; UidGen Task::sUidGen( UidGen::Qtopia ); +/*! + \class Task + \brief The Task class holds the data of a todo entry. + + This data includes the priority of the task, a description, an optional due + date, and whether the task is completed or not. + + \ingroup qtopiaemb + \ingroup qtopiadesktop +*/ + +/*! + Creates a new, empty task. +*/ Task::Task() : Record(), mDue( FALSE ), mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc() { } +/*! + \fn void Task::setPriority( int priority ) + + Sets the priority of the task to \a priority. +*/ + +/*! + \fn int Task::priority() const + + Returns the priority of the task. +*/ + +/*! + \fn void Task::setDescription( const QString &description ) + + Sets the description of the task to \a description. + */ + +/*! + \fn const QString &Task::description() const + + Returns the description of the task. + */ + +/*! + \fn void Task::setDueDate( const QDate &date, bool hasDue ) + + \internal + If \a hasDue is TRUE sets the due date of the task to \a date. + Otherwise clears the due date of the task. +*/ + +/*! + \fn void Task::setDueDate( const QDate &date ) + + Sets the due date of the task to \a date. +*/ + +/*! + \fn void Task::clearDueDate( ) + + Clears the due date of the task. +*/ + +/*! + \fn void Task::setCompleted( bool b ) + + If \a b is TRUE marks the task as completed. Otherwise marks the task as + uncompleted. +*/ + +/*! + \fn bool Task::isCompleted() const + + Returns TRUE if the task is completed. Otherwise returns FALSE. +*/ + +/*! + \fn const QDate &Task::dueDate() const + + Returns the due date of the task. + */ + +/*! + \fn bool Task::hasDueDate() const + + Returns TRUE if there is a due date set for the task. Otherwise returns + FALSE. +*/ + +/*! + \fn void Task::setHasDueDate( bool b ) + + \internal + Just don't ask. I really can't justify the function. +*/ + + +/*! + \internal + Creates a new task. The properties of the task are set from \a m. +*/ + Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ), mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc() { //qDebug("Task::Task fromMap"); //dump( m ); for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it ) switch ( (TaskFields) it.key() ) { case HasDate: if ( *it == "1" ) mDue = TRUE; break; case Completed: setCompleted( *it == "1" ); break; case TaskCategory: setCategories( idsFromString( *it ) ); break; case TaskDescription: setDescription( *it ); break; case Priority: setPriority( (*it).toInt() ); break; case Date: mDueDate = TimeConversion::fromString( (*it) ); break; case TaskUid: setUid( (*it).toInt() ); break; - default: break; + case TaskRid: + case TaskRinfo: + break; } } +/*! + Destroys a task. +*/ Task::~Task() { } +/*! + \internal + Returns the task as a map of field ids to property values. +*/ QMap<int, QString> Task::toMap() const { QMap<int, QString> m; m.insert( HasDate, hasDueDate() ? "1" : "0" ); m.insert( Completed, isCompleted() ? "1" : "0" ); - m.insert( TaskCategory, idsToString( categories() ) ); - m.insert( TaskDescription, description() ); + if ( categories().count() ) + m.insert( TaskCategory, idsToString( categories() ) ); + if ( !description().isEmpty() ) + m.insert( TaskDescription, description() ); m.insert( Priority, QString::number( priority() ) ); - m.insert( Date, TimeConversion::toString( dueDate() ) ); + if ( hasDueDate() ) + m.insert( Date, TimeConversion::toString( dueDate() ) ); m.insert( TaskUid, QString::number(uid()) ); //qDebug("Task::toMap"); //dump( m ); return m; } +/*! + \internal + Appends the task information to \a buf. +*/ void Task::save( QString& buf ) const { buf += " Completed=\""; // qDebug( "writing %d", complete ); buf += QString::number( (int)mCompleted ); buf += "\""; buf += " HasDate=\""; // qDebug( "writing %d", ); @@ -112,64 +227,79 @@ void Task::save( QString& buf ) const buf += customToXml(); // qDebug ("writing uid %d", uid() ); buf += " Uid=\""; buf += QString::number( uid() ); // terminate it in the application... buf += "\""; } -bool Task::match ( const QRegExp &r ) const +/*! + Returns TRUE if the task matches the regular expressions \a regexp. + Otherwise returns FALSE. +*/ +bool Task::match ( const QRegExp ®exp ) const { // match on priority, description on due date... bool match; match = false; - if ( QString::number( mPriority ).find( r ) > -1 ) + if ( QString::number( mPriority ).find( regexp ) > -1 ) match = true; - else if ( mDue && mDueDate.toString().find( r ) > -1 ) + else if ( mDue && mDueDate.toString().find( regexp ) > -1 ) match = true; - else if ( mDesc.find( r ) > -1 ) + else if ( mDesc.find( regexp ) > -1 ) match = true; return match; } +/*! + \internal +*/ static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) { VObject *ret = 0; if ( o && !value.isEmpty() ) ret = addPropValue( o, prop, value.latin1() ); return ret; } +/*! + \internal +*/ static inline VObject *safeAddProp( VObject *o, const char *prop) { VObject *ret = 0; if ( o ) ret = addProp( o, prop ); return ret; } +/*! + \internal +*/ static VObject *createVObject( const Task &t ) { VObject *vcal = newVObject( VCCalProp ); safeAddPropValue( vcal, VCVersionProp, "1.0" ); VObject *task = safeAddProp( vcal, VCTodoProp ); if ( t.hasDueDate() ) safeAddPropValue( task, VCDueProp, TimeConversion::toISO8601( t.dueDate() ) ); safeAddPropValue( task, VCDescriptionProp, t.description() ); if ( t.isCompleted() ) safeAddPropValue( task, VCStatusProp, "COMPLETED" ); safeAddPropValue( task, VCPriorityProp, QString::number( t.priority() ) ); return vcal; } - +/*! + \internal +*/ static Task parseVObject( VObject *obj ) { Task t; VObjectIterator it; initPropIterator( &it, obj ); while( moreIteration( &it ) ) { VObject *o = nextVObject( &it ); @@ -202,17 +332,19 @@ static Task parseVObject( VObject *obj ) } #endif } return t; } - +/*! + Writes the list of \a tasks as a set of VCards to the file \a filename. +*/ void Task::writeVCalendar( const QString &filename, const QValueList<Task> &tasks) { QFileDirect f( filename.utf8().data() ); if ( !f.open( IO_WriteOnly ) ) { qWarning("Unable to open vcard write"); return; } @@ -221,32 +353,37 @@ void Task::writeVCalendar( const QString &filename, const QValueList<Task> &task VObject *obj = createVObject( *it ); writeVObject(f.directHandle() , obj ); cleanVObject( obj ); } cleanStrTbl(); } +/*! + Writes \a task as a VCard to the file \a filename. +*/ void Task::writeVCalendar( const QString &filename, const Task &task) { QFileDirect f( filename.utf8().data() ); if ( !f.open( IO_WriteOnly ) ) { qWarning("Unable to open vcard write"); return; } VObject *obj = createVObject( task ); writeVObject(f.directHandle() , obj ); cleanVObject( obj ); cleanStrTbl(); } - +/*! + Returns the set of tasks read as VCards from the file \a filename. +*/ QValueList<Task> Task::readVCalendar( const QString &filename ) { VObject *obj = Parse_MIME_FromFileName( (char *)filename.utf8().data() ); QValueList<Task> tasks; while ( obj ) { QCString name = vObjectName( obj ); diff --git a/library/backend/task.h b/library/backend/task.h index 6f383b8..091f2e9 100644 --- a/library/backend/task.h +++ b/library/backend/task.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -15,18 +15,18 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef __TASK_H__ #define __TASK_H__ -#include <qpe/palmtoprecord.h> -#include <qpe/stringutil.h> +#include <qtopia/private/palmtoprecord.h> +#include <qtopia/stringutil.h> #include <qvaluelist.h> #include <qdatetime.h> class TaskPrivate; class QPC_EXPORT Task : public Qtopia::Record { public: @@ -35,31 +35,39 @@ public: ~Task(); QMap<int, QString> toMap() const; static void writeVCalendar( const QString &filename, const QValueList<Task> &tasks); static void writeVCalendar( const QString &filename, const Task &task); static QValueList<Task> readVCalendar( const QString &filename ); + enum PriorityValue { VeryHigh=1, High, Normal, Low, VeryLow }; + void setPriority( int priority ) { mPriority = priority; } int priority() const { return mPriority; } // void setCategory( const QString& category ) // { mCategory = category.stripWhiteSpace(); } // const QString &category() const { return mCategory; } void setDescription( const QString& description ) { mDesc = Qtopia::simplifyMultiLineSpace(description); } const QString &description() const { return mDesc; } + // Use THESE functions + void setDueDate( const QDate &date); + void clearDueDate(); + + // Instead of these functions. void setDueDate( const QDate& date, bool hasDue ) { mDueDate = date; mDue = hasDue; } + void setHasDueDate( bool b ) { mDue = b; } + const QDate &dueDate() const { return mDueDate; } bool hasDueDate() const { return mDue; } - void setHasDueDate( bool b ) { mDue = b; } void setCompleted( bool b ) { mCompleted = b; } bool isCompleted() const { return mCompleted; } void save( QString& buf ) const; bool match( const QRegExp &r ) const; private: @@ -73,9 +81,12 @@ private: QString mDesc; TaskPrivate *d; // ADDITION int recordId; int recordInfo; // }; +// MUST be inline. (forwards compatability). +inline void Task::setDueDate( const QDate &date) { setDueDate(date, date.isValid()); } +inline void Task::clearDueDate() { setHasDueDate( FALSE ); } #endif diff --git a/library/backend/timeconversion.cpp b/library/backend/timeconversion.cpp deleted file mode 100644 index a4a2547..0000000 --- a/library/backend/timeconversion.cpp +++ b/dev/null @@ -1,237 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include <qglobal.h> -#include "timeconversion.h" -#include <qregexp.h> -#include <stdlib.h> - -QString TimeConversion::toString( const QDate &d ) -{ - QString r = QString::number( d.day() ) + "." + - QString::number( d.month() ) + "." + - QString::number( d.year() ); - //qDebug("TimeConversion::toString %s", r.latin1()); - return r; -} - -QDate TimeConversion::fromString( const QString &datestr ) -{ - int monthPos = datestr.find('.'); - int yearPos = datestr.find('.', monthPos+1 ); - if ( monthPos == -1 || yearPos == -1 ) { - qDebug("fromString didn't find . in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, yearPos ); - return QDate(); - } - int d = datestr.left( monthPos ).toInt(); - int m = datestr.mid( monthPos+1, yearPos - monthPos - 1 ).toInt(); - int y = datestr.mid( yearPos+1 ).toInt(); - QDate date ( y,m,d ); - //qDebug("TimeConversion::fromString ymd = %s => %d %d %d; mpos = %d ypos = %d", datestr.latin1(), y, m, d, monthPos, yearPos); - return date; -} - -time_t TimeConversion::toUTC( const QDateTime& dt ) -{ - time_t tmp; - struct tm *lt; - -#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64) - _tzset(); -#else - tzset(); -#endif - - // get a tm structure from the system to get the correct tz_name - tmp = time( 0 ); - lt = localtime( &tmp ); - - lt->tm_sec = dt.time().second(); - lt->tm_min = dt.time().minute(); - lt->tm_hour = dt.time().hour(); - lt->tm_mday = dt.date().day(); - lt->tm_mon = dt.date().month() - 1; // 0-11 instead of 1-12 - lt->tm_year = dt.date().year() - 1900; // year - 1900 - //lt->tm_wday = dt.date().dayOfWeek(); ignored anyway - //lt->tm_yday = dt.date().dayOfYear(); ignored anyway - lt->tm_wday = -1; - lt->tm_yday = -1; - // tm_isdst negative -> mktime will find out about DST - lt->tm_isdst = -1; - // keep tm_zone and tm_gmtoff - tmp = mktime( lt ); - return tmp; -} - -QDateTime TimeConversion::fromUTC( time_t time ) -{ - struct tm *lt; - -#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64) - _tzset(); -#else - tzset(); -#endif - lt = localtime( &time ); - QDateTime dt; - dt.setDate( QDate( lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday ) ); - dt.setTime( QTime( lt->tm_hour, lt->tm_min, lt->tm_sec ) ); - return dt; -} - - -int TimeConversion::secsTo( const QDateTime &from, const QDateTime &to ) -{ - return toUTC( to ) - toUTC( from ); -} - -QCString TimeConversion::toISO8601( const QDate &d ) -{ - time_t tmp = toUTC( d ); - struct tm *utc = gmtime( &tmp ); - - QCString str; - str.sprintf("%04d%02d%02d", (utc->tm_year + 1900), utc->tm_mon+1, utc->tm_mday ); - return str; -} - -QCString TimeConversion::toISO8601( const QDateTime &dt ) -{ - time_t tmp = toUTC( dt ); - struct tm *utc = gmtime( &tmp ); - - QCString str; - str.sprintf("%04d%02d%02dT%02d%02d%02dZ", - (utc->tm_year + 1900), utc->tm_mon+1, utc->tm_mday, - utc->tm_hour, utc->tm_min, utc->tm_sec ); - return str; -} - -QDateTime TimeConversion::fromISO8601( const QCString &s ) -{ - -#if defined(_OS_WIN32) || defined (Q_OS_WIN32) || defined (Q_OS_WIN64) - _tzset(); -#else - tzset(); -#endif - - struct tm *thetime = new tm; - - QCString str = s.copy(); - str.replace(QRegExp("-"), "" ); - str.replace(QRegExp(":"), "" ); - str.stripWhiteSpace(); - str = str.lower(); - - int i = str.find( "t" ); - QCString date; - QCString timestr; - if ( i != -1 ) { - date = str.left( i ); - timestr = str.mid( i+1 ); - } else { - date = str; - } - -// qDebug("--- parsing ISO time---"); - thetime->tm_year = 100; - thetime->tm_mon = 0; - thetime->tm_mday = 0; - thetime->tm_hour = 0; - thetime->tm_min = 0; - thetime->tm_sec = 0; - -// qDebug("date = %s", date.data() ); - - switch( date.length() ) { - case 8: - thetime->tm_mday = date.right( 2 ).toInt(); - case 6: - thetime->tm_mon = date.mid( 4, 2 ).toInt() - 1; - case 4: - thetime->tm_year = date.left( 4 ).toInt(); - thetime->tm_year -= 1900; - break; - default: - break; - } - - int tzoff = 0; - bool inLocalTime = FALSE; - if ( timestr.find( 'z' ) == (int)timestr.length() - 1 ) - // UTC - timestr = timestr.left( timestr.length() -1 ); - else { - int plus = timestr.find( "+" ); - int minus = timestr.find( "-" ); - if ( plus != -1 || minus != -1 ) { - // have a timezone offset - plus = (plus != -1) ? plus : minus; - QCString off = timestr.mid( plus ); - timestr = timestr.left( plus ); - - int tzoffhour = 0; - int tzoffmin = 0; - switch( off.length() ) { - case 5: - tzoffmin = off.mid(3).toInt(); - case 3: - tzoffhour = off.left(3).toInt(); - default: - break; - } - tzoff = 60*tzoffhour + tzoffmin; - } else - inLocalTime = TRUE; - } - - // get the time: - switch( timestr.length() ) { - case 6: - thetime->tm_sec = timestr.mid( 4 ).toInt(); - case 4: - thetime->tm_min = timestr.mid( 2, 2 ).toInt(); - case 2: - thetime->tm_hour = timestr.left( 2 ).toInt(); - default: - break; - } - - int tzloc = 0; - time_t tmp = time( 0 ); - if ( !inLocalTime ) { - // have to get the offset between gmt and local time - struct tm *lt = localtime( &tmp ); - tzloc = mktime( lt ); - struct tm *ut = gmtime( &tmp ); - tzloc -= mktime( ut ); - } -// qDebug("time: %d %d %d, tzloc=%d, tzoff=%d", thetime->tm_hour, thetime->tm_min, thetime->tm_sec, -// tzloc, tzoff ); - - tmp = mktime( thetime ); - tmp += 60*(-tzloc + tzoff); - - delete thetime; - - return fromUTC( tmp ); -} - diff --git a/library/backend/timeconversion.h b/library/backend/timeconversion.h deleted file mode 100644 index 1724812..0000000 --- a/library/backend/timeconversion.h +++ b/dev/null @@ -1,45 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef __timeconversion_h__ -#define __timeconversion_h__ - -#include <time.h> -#include <sys/types.h> -#include <qdatetime.h> - -#include <qpe/qpcglobal.h> - -class QPC_EXPORT TimeConversion -{ -public: - static QString toString( const QDate &d ); - static QDate fromString( const QString &datestr ); - - static time_t toUTC( const QDateTime& dt ); - static QDateTime fromUTC( time_t time ); - static int secsTo( const QDateTime &from, const QDateTime &to ); - - static QCString toISO8601( const QDate & ); - static QCString toISO8601( const QDateTime & ); - static QDateTime fromISO8601( const QCString & ); -}; - -#endif // __timeconversion_h__ diff --git a/library/backend/vcc.y b/library/backend/vcc.y index e326a64..5bcf0cb 100644 --- a/library/backend/vcc.y +++ b/library/backend/vcc.y @@ -1,1199 +1,1208 @@ -%{ - -/*************************************************************************** -(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. - -For purposes of this license notice, the term Licensors shall mean, -collectively, Apple Computer, Inc., AT&T Corp., International -Business Machines Corporation and Siemens Rolm Communications Inc. -The term Licensor shall mean any of the Licensors. - -Subject to acceptance of the following conditions, permission is hereby -granted by Licensors without the need for written agreement and without -license or royalty fees, to use, copy, modify and distribute this -software for any purpose. - -The above copyright notice and the following four paragraphs must be -reproduced in all copies of this software and any software including -this software. - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE -ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR -MODIFICATIONS. - -IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT -OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. - -The software is provided with RESTRICTED RIGHTS. Use, duplication, or -disclosure by the government are subject to restrictions set forth in -DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. - -***************************************************************************/ - -/* - * src: vcc.c - * doc: Parser for vCard and vCalendar. Note that this code is - * generated by a yacc parser generator. Generally it should not - * be edited by hand. The real source is vcc.y. The #line directives - * can be commented out here to make it easier to trace through - * in a debugger. However, if a bug is found it should - * be fixed in vcc.y and this file regenerated. - */ - - -/* debugging utilities */ -#if __DEBUG -#define DBG_(x) printf x -#else -#define DBG_(x) -#endif - -/**** External Functions ****/ - -/* assign local name to parser variables and functions so that - we can use more than one yacc based parser. -*/ - -#if 0 -#define yyparse mime_parse -#define yylex mime_lex -#define yyerror mime_error -#define yychar mime_char -/* #define p_yyval p_mime_val */ -#undef yyval -#define yyval mime_yyval -/* #define p_yylval p_mime_lval */ -#undef yylval -#define yylval mime_yylval -#define yydebug mime_debug -#define yynerrs mime_nerrs -#define yyerrflag mime_errflag -#define yyss mime_ss -#define yyssp mime_ssp -#define yyvs mime_vs -#define yyvsp mime_vsp -#define yylhs mime_lhs -#define yylen mime_len -#define yydefred mime_defred -#define yydgoto mime_dgoto -#define yysindex mime_sindex -#define yyrindex mime_rindex -#define yygindex mime_gindex -#define yytable mime_table -#define yycheck mime_check -#define yyname mime_name -#define yyrule mime_rule -#ifdef YYPREFIX -#undef YYPREFIX -#endif -#define YYPREFIX "mime_" -#endif - - -#ifndef _NO_LINE_FOLDING -#define _SUPPORT_LINE_FOLDING 1 -#endif - -/* undef below if compile with MFC */ -/* #define INCLUDEMFC 1 */ - -#if defined(WIN32) || defined(_WIN32) -#ifdef INCLUDEMFC -#include <afx.h> -#endif -#endif - -#include <string.h> -#ifndef __MWERKS__ -#include <stdlib.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <ctype.h> - -//#ifdef PALMTOPCENTER -//#include <qpe/vobject_p.h> -//#else -#include "vobject_p.h" -//#endif - -/**** Types, Constants ****/ - -#define YYDEBUG 0 /* 1 to compile in some debugging code */ -#define MAXTOKEN 256 /* maximum token (line) length */ -#define YYSTACKSIZE 100 // ~unref ? -#define MAXLEVEL 10 /* max # of nested objects parseable */ - /* (includes outermost) */ - - -/**** Global Variables ****/ -int mime_lineNum, mime_numErrors; /* yyerror() can use these */ -static VObject* vObjList; -static VObject *curProp; -static VObject *curObj; -static VObject* ObjStack[MAXLEVEL]; -static int ObjStackTop; - - -/* A helpful utility for the rest of the app. */ -#if __CPLUSPLUS__ -extern "C" { -#endif - - extern void yyerror(char *s); - -#if __CPLUSPLUS__ - }; -#endif - -int yyparse(); - -enum LexMode { - L_NORMAL, - L_VCARD, - L_VCAL, - L_VEVENT, - L_VTODO, - L_VALUES, - L_BASE64, - L_QUOTED_PRINTABLE - }; - -/**** Private Forward Declarations ****/ -static int pushVObject(const char *prop); -static VObject* popVObject(); -static void lexPopMode(int top); -static int lexWithinMode(enum LexMode mode); -static void lexPushMode(enum LexMode mode); -static void enterProps(const char *s); -static void enterAttr(const char *s1, const char *s2); -static void enterValues(const char *value); -#define mime_error yyerror -void mime_error(char *s); -void mime_error_(char *s); - -%} - -/***************************************************************************/ -/*** The grammar ****/ -/***************************************************************************/ - -%union { - char *str; - VObject *vobj; - } - -%token - EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE - BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL - BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO - ID - -/* - * NEWLINE is the token that would occur outside a vCard, - * while LINESEP is the token that would occur inside a vCard. - */ - -%token <str> - STRING ID - -%type <str> name value - -%type <vobj> vcard vcal vobject - -%start mime - -%% - - -mime: vobjects - ; - -vobjects: vobjects vobject - { addList(&vObjList, $2); curObj = 0; } - | vobject - { addList(&vObjList, $1); curObj = 0; } - ; - -vobject: vcard - | vcal - ; - -vcard: - BEGIN_VCARD - { - lexPushMode(L_VCARD); - if (!pushVObject(VCCardProp)) YYERROR; - } - items END_VCARD - { - lexPopMode(0); - $$ = popVObject(); - } - | BEGIN_VCARD - { - lexPushMode(L_VCARD); - if (!pushVObject(VCCardProp)) YYERROR; - } - END_VCARD - { - lexPopMode(0); - $$ = popVObject(); - } - ; - -items: items item - | item - ; - -item: prop COLON - { - lexPushMode(L_VALUES); - } - values LINESEP - { - if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) - lexPopMode(0); - lexPopMode(0); - } - | error - ; - -prop: name - { - enterProps($1); - } - attr_params - | name - { - enterProps($1); - } - ; - -attr_params: attr_params attr_param - | attr_param - ; - -attr_param: SEMICOLON attr - ; - -attr: name - { - enterAttr($1,0); - } - | name EQ name - { - enterAttr($1,$3); - - } - ; - -name: ID - ; - -values: value SEMICOLON { enterValues($1); } values - | value - { enterValues($1); } - ; - -value: STRING - | - { $$ = 0; } - ; - -vcal: - BEGIN_VCAL - { if (!pushVObject(VCCalProp)) YYERROR; } - calitems - END_VCAL - { $$ = popVObject(); } - | BEGIN_VCAL - { if (!pushVObject(VCCalProp)) YYERROR; } - END_VCAL - { $$ = popVObject(); } - ; - -calitems: calitems calitem - | calitem - ; - -calitem: - eventitem - | todoitem - | items - ; - -eventitem: - BEGIN_VEVENT - { - lexPushMode(L_VEVENT); - if (!pushVObject(VCEventProp)) YYERROR; - } - items - END_VEVENT - { - lexPopMode(0); - popVObject(); - } - | BEGIN_VEVENT - { - lexPushMode(L_VEVENT); - if (!pushVObject(VCEventProp)) YYERROR; - } - END_VEVENT - { - lexPopMode(0); - popVObject(); - } - ; - -todoitem: - BEGIN_VTODO - { - lexPushMode(L_VTODO); - if (!pushVObject(VCTodoProp)) YYERROR; - } - items - END_VTODO - { - lexPopMode(0); - popVObject(); - } - | BEGIN_VTODO - { - lexPushMode(L_VTODO); - if (!pushVObject(VCTodoProp)) YYERROR; - } - END_VTODO - { - lexPopMode(0); - popVObject(); - } - ; - -%% -/*------------------------------------*/ -static int pushVObject(const char *prop) - { - VObject *newObj; - if (ObjStackTop == MAXLEVEL) - return FALSE; - - ObjStack[++ObjStackTop] = curObj; - - if (curObj) { - newObj = addProp(curObj,prop); - curObj = newObj; - } - else - curObj = newVObject(prop); - - return TRUE; - } - - -/*---------------------------------------*/ -/* This pops the recently built vCard off the stack and returns it. */ -static VObject* popVObject() - { - VObject *oldObj; - if (ObjStackTop < 0) { - yyerror("pop on empty Object Stack\n"); - return 0; - } - oldObj = curObj; - curObj = ObjStack[ObjStackTop--]; - - return oldObj; - } - - -static void enterValues(const char *value) - { - if (fieldedProp && *fieldedProp) { - if (value) { - addPropValue(curProp,*fieldedProp,value); - } - /* else this field is empty, advance to next field */ - fieldedProp++; - } - else { - if (value) { - setVObjectStringZValue_(curProp,strdup( value )); - } - } - deleteStr(value); - } - -static void enterProps(const char *s) - { - curProp = addGroup(curObj,s); - deleteStr(s); - } - -static void enterAttr(const char *s1, const char *s2) - { - const char *p1, *p2; - p1 = lookupProp_(s1); - if (s2) { - VObject *a; - p2 = lookupProp_(s2); - a = addProp(curProp,p1); - setVObjectStringZValue(a,p2); - } - else - addProp(curProp,p1); - if (qstricmp(p1,VCBase64Prop) == 0 || (s2 && qstricmp(p2,VCBase64Prop)==0)) - lexPushMode(L_BASE64); - else if (qstricmp(p1,VCQuotedPrintableProp) == 0 - || (s2 && qstricmp(p2,VCQuotedPrintableProp)==0)) - lexPushMode(L_QUOTED_PRINTABLE); - deleteStr(s1); deleteStr(s2); - } - - -#define MAX_LEX_LOOKAHEAD_0 32 -#define MAX_LEX_LOOKAHEAD 64 -#define MAX_LEX_MODE_STACK_SIZE 10 -#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop]) - -struct LexBuf { - /* input */ -#ifdef INCLUDEMFC - CFile *inputFile; -#else - FILE *inputFile; -#endif - char *inputString; - unsigned long curPos; - unsigned long inputLen; - /* lookahead buffer */ - /* -- lookahead buffer is short instead of char so that EOF - / can be represented correctly. - */ - unsigned long len; - short buf[MAX_LEX_LOOKAHEAD]; - unsigned long getPtr; - /* context stack */ - unsigned long lexModeStackTop; - enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE]; - /* token buffer */ - unsigned long maxToken; - char *strs; - unsigned long strsLen; - } lexBuf; - -static void lexPushMode(enum LexMode mode) - { - if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1)) - yyerror("lexical context stack overflow"); - else { - lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode; - } - } - -static void lexPopMode(int top) - { - /* special case of pop for ease of error recovery -- this - version will never underflow */ - if (top) - lexBuf.lexModeStackTop = 0; - else - if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--; - } - -static int lexWithinMode(enum LexMode mode) { - unsigned long i; - for (i=0;i<lexBuf.lexModeStackTop;i++) - if (mode == lexBuf.lexModeStack[i]) return 1; - return 0; - } - -static char lexGetc_() - { - /* get next char from input, no buffering. */ - if (lexBuf.curPos == lexBuf.inputLen) - return EOF; - else if (lexBuf.inputString) - return *(lexBuf.inputString + lexBuf.curPos++); - else { -#ifdef INCLUDEMFC - char result; - return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF; -#else - return fgetc(lexBuf.inputFile); -#endif - } - } - -static int lexGeta() - { - ++lexBuf.len; - return (lexBuf.buf[lexBuf.getPtr] = lexGetc_()); - } - -static int lexGeta_(int i) - { - ++lexBuf.len; - return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_()); - } - -static void lexSkipLookahead() { - if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) { - /* don't skip EOF. */ - lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD; - lexBuf.len--; - } - } - -static int lexLookahead() { - int c = (lexBuf.len)? - lexBuf.buf[lexBuf.getPtr]: - lexGeta(); - /* do the \r\n -> \n or \r -> \n translation here */ - if (c == '\r') { - int a = (lexBuf.len>1)? - lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]: - lexGeta_(1); - if (a == '\n') { - lexSkipLookahead(); - } - lexBuf.buf[lexBuf.getPtr] = c = '\n'; - } - else if (c == '\n') { - int a = (lexBuf.len>1)? - lexBuf.buf[lexBuf.getPtr+1]: - lexGeta_(1); - if (a == '\r') { - lexSkipLookahead(); - } - lexBuf.buf[lexBuf.getPtr] = '\n'; - } - return c; - } - -static int lexGetc() { - int c = lexLookahead(); - if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) { - /* EOF will remain in lookahead buffer */ - lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD; - lexBuf.len--; - } - return c; - } - -static void lexSkipLookaheadWord() { - if (lexBuf.strsLen <= lexBuf.len) { - lexBuf.len -= lexBuf.strsLen; - lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD; - } - } - -static void lexClearToken() - { - lexBuf.strsLen = 0; - } - -static void lexAppendc(int c) - { - lexBuf.strs[lexBuf.strsLen] = c; - /* append up to zero termination */ - if (c == 0) return; - lexBuf.strsLen++; - if (lexBuf.strsLen > lexBuf.maxToken) { - /* double the token string size */ - lexBuf.maxToken <<= 1; - lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken); - } - } - -static char* lexStr() { - return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1); - } - -static void lexSkipWhite() { - int c = lexLookahead(); - while (c == ' ' || c == '\t') { - lexSkipLookahead(); - c = lexLookahead(); - } - } - -static char* lexGetWord() { - int c; - lexSkipWhite(); - lexClearToken(); - c = lexLookahead(); - while (c != EOF && !strchr("\t\n ;:=",c)) { - lexAppendc(c); - lexSkipLookahead(); - c = lexLookahead(); - } - lexAppendc(0); - return lexStr(); - } - -static void lexPushLookaheadc(int c) { - int putptr; - /* can't putback EOF, because it never leaves lookahead buffer */ - if (c == EOF) return; - putptr = (int)lexBuf.getPtr - 1; - if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD; - lexBuf.getPtr = putptr; - lexBuf.buf[putptr] = c; - lexBuf.len += 1; - } - -static char* lexLookaheadWord() { - /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0 - / and thing bigger than that will stop the lookahead and return 0; - / leading white spaces are not recoverable. - */ - int c; - int len = 0; - int curgetptr = 0; - lexSkipWhite(); - lexClearToken(); - curgetptr = (int)lexBuf.getPtr; // remember! - while (len < (MAX_LEX_LOOKAHEAD_0)) { - c = lexGetc(); - len++; - if (c == EOF || strchr("\t\n ;:=", c)) { - lexAppendc(0); - /* restore lookahead buf. */ - lexBuf.len += len; - lexBuf.getPtr = curgetptr; - return lexStr(); - } - else - lexAppendc(c); - } - lexBuf.len += len; /* char that has been moved to lookahead buffer */ - lexBuf.getPtr = curgetptr; - return 0; - } - -#ifdef _SUPPORT_LINE_FOLDING -static void handleMoreRFC822LineBreak(int c) { - /* suport RFC 822 line break in cases like - * ADR: foo; - * morefoo; - * more foo; - */ - if (c == ';') { - int a; - lexSkipLookahead(); - /* skip white spaces */ - a = lexLookahead(); - while (a == ' ' || a == '\t') { - lexSkipLookahead(); - a = lexLookahead(); - } - if (a == '\n') { - lexSkipLookahead(); - a = lexLookahead(); - if (a == ' ' || a == '\t') { - /* continuation, throw away all the \n and spaces read so - * far - */ - lexSkipWhite(); - lexPushLookaheadc(';'); - } - else { - lexPushLookaheadc('\n'); - lexPushLookaheadc(';'); - } - } - else { - lexPushLookaheadc(';'); - } - } - } - -static char* lexGet1Value() { - int c; - lexSkipWhite(); - c = lexLookahead(); - lexClearToken(); - while (c != EOF && c != ';') { - if (c == '\\' ) { - int a; - lexSkipLookahead(); - a = lexLookahead(); - if ( a != ';' ) { - lexAppendc('\\'); - } else { - lexAppendc( ';' ); - lexSkipLookahead(); - } - } else if (c == '\n') { - int a; - lexSkipLookahead(); - a = lexLookahead(); - if (a == ' ' || a == '\t') { - lexAppendc(' '); - lexSkipLookahead(); - } - else { - lexPushLookaheadc('\n'); - break; - } - } - else { - lexAppendc(c); - lexSkipLookahead(); - } - c = lexLookahead(); - } - lexAppendc(0); - handleMoreRFC822LineBreak(c); - return c==EOF?0:lexStr(); - } -#endif - -static int match_begin_name(int end) { - char *n = lexLookaheadWord(); - int token = ID; - if (n) { - if (!qstricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD; - else if (!qstricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL; - else if (!qstricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT; - else if (!qstricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO; - deleteStr(n); - return token; - } - return 0; - } - - -#ifdef INCLUDEMFC -void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile) -#else -void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile) -#endif - { - // initialize lex mode stack - lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL; - - // iniatialize lex buffer. - lexBuf.inputString = (char*) inputstring; - lexBuf.inputLen = inputlen; - lexBuf.curPos = 0; - lexBuf.inputFile = inputfile; - - lexBuf.len = 0; - lexBuf.getPtr = 0; - - lexBuf.maxToken = MAXTOKEN; - lexBuf.strs = (char*)malloc(MAXTOKEN); - lexBuf.strsLen = 0; - - } - -static void finiLex() { - free(lexBuf.strs); - } - - -/*-----------------------------------*/ -/* This parses and converts the base64 format for binary encoding into - * a decoded buffer (allocated with new). See RFC 1521. - */ -static char * lexGetDataFromBase64() - { - unsigned long bytesLen = 0, bytesMax = 0; - int quadIx = 0, pad = 0; - unsigned long trip = 0; - unsigned char b; - int c; - unsigned char *bytes = NULL; - unsigned char *oldBytes = NULL; - - DBG_(("db: lexGetDataFromBase64\n")); - while (1) { - c = lexGetc(); - if (c == '\n') { - ++mime_lineNum; - if (lexLookahead() == '\n') { - /* a '\n' character by itself means end of data */ - break; - } - else continue; /* ignore '\n' */ - } - else { - if ((c >= 'A') && (c <= 'Z')) - b = (unsigned char)(c - 'A'); - else if ((c >= 'a') && (c <= 'z')) - b = (unsigned char)(c - 'a') + 26; - else if ((c >= '0') && (c <= '9')) - b = (unsigned char)(c - '0') + 52; - else if (c == '+') - b = 62; - else if (c == '/') - b = 63; - else if (c == '=') { - b = 0; - pad++; - } else if ((c == ' ') || (c == '\t')) { - continue; - } else { /* error condition */ - if (bytes) free(bytes); - else if (oldBytes) free(oldBytes); - // error recovery: skip until 2 adjacent newlines. - DBG_(("db: invalid character 0x%x '%c'\n", c,c)); - if (c != EOF) { - c = lexGetc(); - while (c != EOF) { - if (c == '\n' && lexLookahead() == '\n') { - ++mime_lineNum; - break; - } - c = lexGetc(); - } - } - return NULL; - } - trip = (trip << 6) | b; - if (++quadIx == 4) { - unsigned char outBytes[3]; - int numOut; - int i; - for (i = 0; i < 3; i++) { - outBytes[2-i] = (unsigned char)(trip & 0xFF); - trip >>= 8; - } - numOut = 3 - pad; - if (bytesLen + numOut > bytesMax) { - if (!bytes) { - bytesMax = 1024; - bytes = (unsigned char*)malloc((size_t)bytesMax); - } - else { - bytesMax <<= 2; - oldBytes = bytes; - bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax); - } - if (bytes == 0) { - mime_error("out of memory while processing BASE64 data\n"); - } - } - if (bytes) { - memcpy(bytes + bytesLen, outBytes, numOut); - bytesLen += numOut; - } - trip = 0; - quadIx = 0; - } - } - } /* while */ - DBG_(("db: bytesLen = %d\n", bytesLen)); - /* kludge: all this won't be necessary if we have tree form - representation */ - if (bytes) { - setValueWithSize(curProp,bytes,(unsigned int)bytesLen); - free(bytes); - } - else if (oldBytes) { - setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen); - free(oldBytes); - } - return 0; - } - -static int match_begin_end_name(int end) { - int token; - lexSkipWhite(); - if (lexLookahead() != ':') return ID; - lexSkipLookahead(); - lexSkipWhite(); - token = match_begin_name(end); - if (token == ID) { - lexPushLookaheadc(':'); - DBG_(("db: ID '%s'\n", yylval.str)); - return ID; - } - else if (token != 0) { - lexSkipLookaheadWord(); - deleteStr(yylval.str); - DBG_(("db: begin/end %d\n", token)); - return token; - } - return 0; - } - -static char* lexGetQuotedPrintable() - { - char cur; - - lexClearToken(); - do { - cur = lexGetc(); - switch (cur) { - case '=': { - int c = 0; - int next[2]; - int i; - for (i = 0; i < 2; i++) { - next[i] = lexGetc(); - if (next[i] >= '0' && next[i] <= '9') - c = c * 16 + next[i] - '0'; - else if (next[i] >= 'A' && next[i] <= 'F') - c = c * 16 + next[i] - 'A' + 10; - else - break; - } - if (i == 0) { - /* single '=' follow by LINESEP is continuation sign? */ - if (next[0] == '\n') { - ++mime_lineNum; - } - else { - lexPushLookaheadc('='); - goto EndString; - } - } - else if (i == 1) { - lexPushLookaheadc(next[1]); - lexPushLookaheadc(next[0]); - lexAppendc('='); - } else { - lexAppendc(c); - } - break; - } /* '=' */ - case '\n': { - lexPushLookaheadc('\n'); - goto EndString; - } - case (char)EOF: - break; - default: - lexAppendc(cur); - break; - } /* switch */ - } while (cur != (char)EOF); - -EndString: - lexAppendc(0); - return lexStr(); - } /* LexQuotedPrintable */ - -static int yylex() { - - int lexmode = LEXMODE(); - if (lexmode == L_VALUES) { - int c = lexGetc(); - if (c == ';') { - DBG_(("db: SEMICOLON\n")); - lexPushLookaheadc(c); - handleMoreRFC822LineBreak(c); - lexSkipLookahead(); - return SEMICOLON; - } - else if (strchr("\n",c)) { - ++mime_lineNum; - /* consume all line separator(s) adjacent to each other */ - c = lexLookahead(); - while (strchr("\n",c)) { - lexSkipLookahead(); - c = lexLookahead(); - ++mime_lineNum; - } - DBG_(("db: LINESEP\n")); - return LINESEP; - } - else { - char *p = 0; - lexPushLookaheadc(c); - if (lexWithinMode(L_BASE64)) { - /* get each char and convert to bin on the fly... */ - p = lexGetDataFromBase64(); - yylval.str = p; - return STRING; - } - else if (lexWithinMode(L_QUOTED_PRINTABLE)) { - p = lexGetQuotedPrintable(); - } - else { -#ifdef _SUPPORT_LINE_FOLDING - p = lexGet1Value(); -#else - p = lexGetStrUntil(";\n"); -#endif - } - if (p) { - DBG_(("db: STRING: '%s'\n", p)); - yylval.str = p; - return STRING; - } - else return 0; - } - } - else { - /* normal mode */ - while (1) { - int c = lexGetc(); - switch(c) { - case ':': { - /* consume all line separator(s) adjacent to each other */ - /* ignoring linesep immediately after colon. */ - c = lexLookahead(); - while (strchr("\n",c)) { - lexSkipLookahead(); - c = lexLookahead(); - ++mime_lineNum; - } - DBG_(("db: COLON\n")); - return COLON; - } - case ';': - DBG_(("db: SEMICOLON\n")); - return SEMICOLON; - case '=': - DBG_(("db: EQ\n")); - return EQ; - /* ignore whitespace in this mode */ - case '\t': - case ' ': continue; - case '\n': { - ++mime_lineNum; - continue; - } - case EOF: return 0; - break; - default: { - lexPushLookaheadc(c); - if (isalnum(c)) { - char *t = lexGetWord(); - yylval.str = t; - if (!qstricmp(t, "begin")) { - return match_begin_end_name(0); - } - else if (!qstricmp(t,"end")) { - return match_begin_end_name(1); - } - else { - DBG_(("db: ID '%s'\n", t)); - return ID; - } - } - else { - /* unknow token */ - return 0; - } - break; - } - } - } - } - return 0; - } - - -/***************************************************************************/ -/*** Public Functions ****/ -/***************************************************************************/ - -static VObject* Parse_MIMEHelper() - { - ObjStackTop = -1; - mime_numErrors = 0; - mime_lineNum = 1; - vObjList = 0; - curObj = 0; - - if (yyparse() != 0) - return 0; - - finiLex(); - return vObjList; - } - -/*--------------------------------------------*/ -DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len) - { - initLex(input, len, 0); - return Parse_MIMEHelper(); - } - - -#if INCLUDEMFC - -DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file) - { - unsigned long startPos; - VObject *result; - - initLex(0,-1,file); - startPos = file->GetPosition(); - if (!(result = Parse_MIMEHelper())) - file->Seek(startPos, CFile::begin); - return result; - } - -#else - -VObject* Parse_MIME_FromFile(FILE *file) - { - VObject *result; - long startPos; - - initLex(0,(unsigned long)-1,file); - startPos = ftell(file); - if (!(result = Parse_MIMEHelper())) { - fseek(file,startPos,SEEK_SET); - } - return result; - } - -DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) - { - FILE *fp = fopen(fname,"r"); - if (fp) { - VObject* o = Parse_MIME_FromFile(fp); - fclose(fp); - return o; - } - else { - char msg[80]; - sprintf(msg, "can't open file '%s' for reading\n", fname); - mime_error_(msg); - return 0; - } - } - -#endif - -/*-------------------------------------*/ - -static MimeErrorHandler mimeErrorHandler; - -DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me) - { - mimeErrorHandler = me; - } - -void mime_error(char *s) - { - char msg[256]; - if (mimeErrorHandler) { - sprintf(msg,"%s at line %d", s, mime_lineNum); - mimeErrorHandler(msg); - } - } - -void mime_error_(char *s) - { - if (mimeErrorHandler) { - mimeErrorHandler(s); - } - } - +%{
+
+/***************************************************************************
+(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+
+For purposes of this license notice, the term Licensors shall mean,
+collectively, Apple Computer, Inc., AT&T Corp., International
+Business Machines Corporation and Siemens Rolm Communications Inc.
+The term Licensor shall mean any of the Licensors.
+
+Subject to acceptance of the following conditions, permission is hereby
+granted by Licensors without the need for written agreement and without
+license or royalty fees, to use, copy, modify and distribute this
+software for any purpose.
+
+The above copyright notice and the following four paragraphs must be
+reproduced in all copies of this software and any software including
+this software.
+
+THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
+ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
+MODIFICATIONS.
+
+IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
+INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
+OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.
+
+The software is provided with RESTRICTED RIGHTS. Use, duplication, or
+disclosure by the government are subject to restrictions set forth in
+DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
+
+***************************************************************************/
+
+/*
+ * src: vcc.c
+ * doc: Parser for vCard and vCalendar. Note that this code is
+ * generated by a yacc parser generator. Generally it should not
+ * be edited by hand. The real source is vcc.y. The #line directives
+ * can be commented out here to make it easier to trace through
+ * in a debugger. However, if a bug is found it should
+ * be fixed in vcc.y and this file regenerated.
+ */
+
+
+/* debugging utilities */
+#if __DEBUG
+#define DBG_(x) printf x
+#else
+#define DBG_(x)
+#endif
+
+/**** External Functions ****/
+
+/* assign local name to parser variables and functions so that
+ we can use more than one yacc based parser.
+*/
+
+#if 0
+#define yyparse mime_parse
+#define yylex mime_lex
+#define yyerror mime_error
+#define yychar mime_char
+/* #define p_yyval p_mime_val */
+#undef yyval
+#define yyval mime_yyval
+/* #define p_yylval p_mime_lval */
+#undef yylval
+#define yylval mime_yylval
+#define yydebug mime_debug
+#define yynerrs mime_nerrs
+#define yyerrflag mime_errflag
+#define yyss mime_ss
+#define yyssp mime_ssp
+#define yyvs mime_vs
+#define yyvsp mime_vsp
+#define yylhs mime_lhs
+#define yylen mime_len
+#define yydefred mime_defred
+#define yydgoto mime_dgoto
+#define yysindex mime_sindex
+#define yyrindex mime_rindex
+#define yygindex mime_gindex
+#define yytable mime_table
+#define yycheck mime_check
+#define yyname mime_name
+#define yyrule mime_rule
+#ifdef YYPREFIX
+#undef YYPREFIX
+#endif
+#define YYPREFIX "mime_"
+#endif
+
+
+#ifndef _NO_LINE_FOLDING
+#define _SUPPORT_LINE_FOLDING 1
+#endif
+
+/* undef below if compile with MFC */
+/* #define INCLUDEMFC 1 */
+
+#if defined(WIN32) || defined(_WIN32)
+#ifdef INCLUDEMFC
+#include <afx.h>
+#endif
+#endif
+
+#include <string.h>
+#ifndef __MWERKS__
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+//#ifdef PALMTOPCENTER
+//#include <qpe/vobject_p.h>
+//#else
+#include "vobject_p.h"
+//#endif
+
+/**** Types, Constants ****/
+
+#define YYDEBUG 0 /* 1 to compile in some debugging code */
+#define MAXTOKEN 256 /* maximum token (line) length */
+#define YYSTACKSIZE 100 // ~unref ?
+#define MAXLEVEL 10 /* max # of nested objects parseable */
+ /* (includes outermost) */
+
+
+/**** Global Variables ****/
+int mime_lineNum, mime_numErrors; /* yyerror() can use these */
+static VObject* vObjList;
+static VObject *curProp;
+static VObject *curObj;
+static VObject* ObjStack[MAXLEVEL];
+static int ObjStackTop;
+
+
+/* A helpful utility for the rest of the app. */
+#if __CPLUSPLUS__
+extern "C" {
+#endif
+
+ extern void yyerror(char *s);
+
+#if __CPLUSPLUS__
+ };
+#endif
+
+int yyparse();
+
+enum LexMode {
+ L_NORMAL,
+ L_VCARD,
+ L_VCAL,
+ L_VEVENT,
+ L_VTODO,
+ L_VALUES,
+ L_BASE64,
+ L_QUOTED_PRINTABLE
+ };
+
+/**** Private Forward Declarations ****/
+static int pushVObject(const char *prop);
+static VObject* popVObject();
+static void lexPopMode(int top);
+static int lexWithinMode(enum LexMode mode);
+static void lexPushMode(enum LexMode mode);
+static void enterProps(const char *s);
+static void enterAttr(const char *s1, const char *s2);
+static void enterValues(const char *value);
+#define mime_error yyerror
+void mime_error(char *s);
+void mime_error_(char *s);
+
+%}
+
+/***************************************************************************/
+/*** The grammar ****/
+/***************************************************************************/
+
+%union {
+ char *str;
+ VObject *vobj;
+ }
+
+%token
+ EQ COLON DOT SEMICOLON SPACE HTAB LINESEP NEWLINE
+ BEGIN_VCARD END_VCARD BEGIN_VCAL END_VCAL
+ BEGIN_VEVENT END_VEVENT BEGIN_VTODO END_VTODO
+ ID
+
+/*
+ * NEWLINE is the token that would occur outside a vCard,
+ * while LINESEP is the token that would occur inside a vCard.
+ */
+
+%token <str>
+ STRING ID
+
+%type <str> name value
+
+%type <vobj> vcard vcal vobject
+
+%start mime
+
+%%
+
+
+mime: vobjects
+ ;
+
+vobjects: vobjects vobject
+ { addList(&vObjList, $2); curObj = 0; }
+ | vobject
+ { addList(&vObjList, $1); curObj = 0; }
+ ;
+
+vobject: vcard
+ | vcal
+ ;
+
+vcard:
+ BEGIN_VCARD
+ {
+ lexPushMode(L_VCARD);
+ if (!pushVObject(VCCardProp)) YYERROR;
+ }
+ items END_VCARD
+ {
+ lexPopMode(0);
+ $$ = popVObject();
+ }
+ | BEGIN_VCARD
+ {
+ lexPushMode(L_VCARD);
+ if (!pushVObject(VCCardProp)) YYERROR;
+ }
+ END_VCARD
+ {
+ lexPopMode(0);
+ $$ = popVObject();
+ }
+ ;
+
+items: items item
+ | item
+ ;
+
+item: prop COLON
+ {
+ lexPushMode(L_VALUES);
+ }
+ values LINESEP
+ {
+ if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
+ lexPopMode(0);
+ lexPopMode(0);
+ }
+ | error
+ ;
+
+prop: name
+ {
+ enterProps($1);
+ }
+ attr_params
+ | name
+ {
+ enterProps($1);
+ }
+ ;
+
+attr_params: attr_params attr_param
+ | attr_param
+ ;
+
+attr_param: SEMICOLON attr
+ ;
+
+attr: name
+ {
+ enterAttr($1,0);
+ }
+ | name EQ name
+ {
+ enterAttr($1,$3);
+
+ }
+ ;
+
+name: ID
+ ;
+
+values: value SEMICOLON { enterValues($1); } values
+ | value
+ { enterValues($1); }
+ ;
+
+value: STRING
+ |
+ { $$ = 0; }
+ ;
+
+vcal:
+ BEGIN_VCAL
+ { if (!pushVObject(VCCalProp)) YYERROR; }
+ calitems
+ END_VCAL
+ { $$ = popVObject(); }
+ | BEGIN_VCAL
+ { if (!pushVObject(VCCalProp)) YYERROR; }
+ END_VCAL
+ { $$ = popVObject(); }
+ ;
+
+calitems: calitems calitem
+ | calitem
+ ;
+
+calitem:
+ eventitem
+ | todoitem
+ | items
+ ;
+
+eventitem:
+ BEGIN_VEVENT
+ {
+ lexPushMode(L_VEVENT);
+ if (!pushVObject(VCEventProp)) YYERROR;
+ }
+ items
+ END_VEVENT
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ | BEGIN_VEVENT
+ {
+ lexPushMode(L_VEVENT);
+ if (!pushVObject(VCEventProp)) YYERROR;
+ }
+ END_VEVENT
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ ;
+
+todoitem:
+ BEGIN_VTODO
+ {
+ lexPushMode(L_VTODO);
+ if (!pushVObject(VCTodoProp)) YYERROR;
+ }
+ items
+ END_VTODO
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ | BEGIN_VTODO
+ {
+ lexPushMode(L_VTODO);
+ if (!pushVObject(VCTodoProp)) YYERROR;
+ }
+ END_VTODO
+ {
+ lexPopMode(0);
+ popVObject();
+ }
+ ;
+
+%%
+/*------------------------------------*/
+static int pushVObject(const char *prop)
+ {
+ VObject *newObj;
+ if (ObjStackTop == MAXLEVEL)
+ return FALSE;
+
+ ObjStack[++ObjStackTop] = curObj;
+
+ if (curObj) {
+ newObj = addProp(curObj,prop);
+ curObj = newObj;
+ }
+ else
+ curObj = newVObject(prop);
+
+ return TRUE;
+ }
+
+
+/*---------------------------------------*/
+/* This pops the recently built vCard off the stack and returns it. */
+static VObject* popVObject()
+ {
+ VObject *oldObj;
+ if (ObjStackTop < 0) {
+ yyerror("pop on empty Object Stack\n");
+ return 0;
+ }
+ oldObj = curObj;
+ curObj = ObjStack[ObjStackTop--];
+
+ return oldObj;
+ }
+
+
+static void enterValues(const char *value)
+ {
+ if (fieldedProp && *fieldedProp) {
+ if (value) {
+ addPropValue(curProp,*fieldedProp,value);
+ }
+ /* else this field is empty, advance to next field */
+ fieldedProp++;
+ }
+ else {
+ if (value) {
+ setVObjectStringZValue_(curProp,strdup( value ));
+ }
+ }
+ deleteStr(value);
+ }
+
+static void enterProps(const char *s)
+ {
+ curProp = addGroup(curObj,s);
+ deleteStr(s);
+ }
+
+static void enterAttr(const char *s1, const char *s2)
+ {
+ const char *p1, *p2;
+ p1 = lookupProp_(s1);
+ if (s2) {
+ VObject *a;
+ p2 = lookupProp_(s2);
+ a = addProp(curProp,p1);
+ setVObjectStringZValue(a,p2);
+ }
+ else
+ addProp(curProp,p1);
+ if (qstricmp(p1,VCBase64Prop) == 0 || (s2 && qstricmp(p2,VCBase64Prop)==0))
+ lexPushMode(L_BASE64);
+ else if (qstricmp(p1,VCQuotedPrintableProp) == 0
+ || (s2 && qstricmp(p2,VCQuotedPrintableProp)==0))
+ lexPushMode(L_QUOTED_PRINTABLE);
+ deleteStr(s1); deleteStr(s2);
+ }
+
+
+#define MAX_LEX_LOOKAHEAD_0 32
+#define MAX_LEX_LOOKAHEAD 64
+#define MAX_LEX_MODE_STACK_SIZE 10
+#define LEXMODE() (lexBuf.lexModeStack[lexBuf.lexModeStackTop])
+
+struct LexBuf {
+ /* input */
+#ifdef INCLUDEMFC
+ CFile *inputFile;
+#else
+ FILE *inputFile;
+#endif
+ char *inputString;
+ unsigned long curPos;
+ unsigned long inputLen;
+ /* lookahead buffer */
+ /* -- lookahead buffer is short instead of char so that EOF
+ / can be represented correctly.
+ */
+ unsigned long len;
+ short buf[MAX_LEX_LOOKAHEAD];
+ unsigned long getPtr;
+ /* context stack */
+ unsigned long lexModeStackTop;
+ enum LexMode lexModeStack[MAX_LEX_MODE_STACK_SIZE];
+ /* token buffer */
+ unsigned long maxToken;
+ char *strs;
+ unsigned long strsLen;
+ } lexBuf;
+
+static void lexPushMode(enum LexMode mode)
+ {
+ if (lexBuf.lexModeStackTop == (MAX_LEX_MODE_STACK_SIZE-1))
+ yyerror("lexical context stack overflow");
+ else {
+ lexBuf.lexModeStack[++lexBuf.lexModeStackTop] = mode;
+ }
+ }
+
+static void lexPopMode(int top)
+ {
+ /* special case of pop for ease of error recovery -- this
+ version will never underflow */
+ if (top)
+ lexBuf.lexModeStackTop = 0;
+ else
+ if (lexBuf.lexModeStackTop > 0) lexBuf.lexModeStackTop--;
+ }
+
+static int lexWithinMode(enum LexMode mode) {
+ unsigned long i;
+ for (i=0;i<lexBuf.lexModeStackTop;i++)
+ if (mode == lexBuf.lexModeStack[i]) return 1;
+ return 0;
+ }
+
+static int lexGetc_()
+ {
+ /* get next char from input, no buffering. */
+ if (lexBuf.curPos == lexBuf.inputLen)
+ return EOF;
+ else if (lexBuf.inputString)
+ return *(lexBuf.inputString + lexBuf.curPos++);
+ else {
+#ifdef INCLUDEMFC
+ char result;
+ return lexBuf.inputFile->Read(&result, 1) == 1 ? result : EOF;
+#else
+ return fgetc(lexBuf.inputFile);
+#endif
+ }
+ }
+
+static int lexGeta()
+ {
+ ++lexBuf.len;
+ return (lexBuf.buf[lexBuf.getPtr] = lexGetc_());
+ }
+
+static int lexGeta_(int i)
+ {
+ ++lexBuf.len;
+ return (lexBuf.buf[(lexBuf.getPtr+i)%MAX_LEX_LOOKAHEAD] = lexGetc_());
+ }
+
+static void lexSkipLookahead() {
+ if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
+ /* don't skip EOF. */
+ lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
+ lexBuf.len--;
+ }
+ }
+
+static int lexLookahead() {
+ int c = (lexBuf.len)?
+ lexBuf.buf[lexBuf.getPtr]:
+ lexGeta();
+ /* do the \r\n -> \n or \r -> \n translation here */
+ if (c == '\r') {
+ int a = (lexBuf.len>1)?
+ lexBuf.buf[(lexBuf.getPtr+1)%MAX_LEX_LOOKAHEAD]:
+ lexGeta_(1);
+ if (a == '\n') {
+ lexSkipLookahead();
+ }
+ lexBuf.buf[lexBuf.getPtr] = c = '\n';
+ }
+ else if (c == '\n') {
+ int a = (lexBuf.len>1)?
+ lexBuf.buf[lexBuf.getPtr+1]:
+ lexGeta_(1);
+ if (a == '\r') {
+ lexSkipLookahead();
+ }
+ lexBuf.buf[lexBuf.getPtr] = '\n';
+ }
+ return c;
+ }
+
+static int lexGetc() {
+ int c = lexLookahead();
+ if (lexBuf.len > 0 && lexBuf.buf[lexBuf.getPtr]!=EOF) {
+ /* EOF will remain in lookahead buffer */
+ lexBuf.getPtr = (lexBuf.getPtr + 1) % MAX_LEX_LOOKAHEAD;
+ lexBuf.len--;
+ }
+ return c;
+ }
+
+static void lexSkipLookaheadWord() {
+ if (lexBuf.strsLen <= lexBuf.len) {
+ lexBuf.len -= lexBuf.strsLen;
+ lexBuf.getPtr = (lexBuf.getPtr + lexBuf.strsLen) % MAX_LEX_LOOKAHEAD;
+ }
+ }
+
+static void lexClearToken()
+ {
+ lexBuf.strsLen = 0;
+ }
+
+static void lexAppendc(int c)
+ {
+ lexBuf.strs[lexBuf.strsLen] = c;
+ /* append up to zero termination */
+ if (c == 0) return;
+ lexBuf.strsLen++;
+ if (lexBuf.strsLen > lexBuf.maxToken) {
+ /* double the token string size */
+ lexBuf.maxToken <<= 1;
+ lexBuf.strs = (char*) realloc(lexBuf.strs,(size_t)lexBuf.maxToken);
+ }
+ }
+
+static char* lexStr() {
+ return dupStr(lexBuf.strs,(size_t)lexBuf.strsLen+1);
+ }
+
+static void lexSkipWhite() {
+ int c = lexLookahead();
+ while (c == ' ' || c == '\t') {
+ lexSkipLookahead();
+ c = lexLookahead();
+ }
+ }
+
+static char* lexGetWord() {
+ int c;
+ lexSkipWhite();
+ lexClearToken();
+ c = lexLookahead();
+ while (c != EOF && !strchr("\t\n ;:=",c)) {
+ lexAppendc(c);
+ lexSkipLookahead();
+ c = lexLookahead();
+ }
+ lexAppendc(0);
+ return lexStr();
+ }
+
+static void lexPushLookaheadc(int c) {
+ int putptr;
+ /* can't putback EOF, because it never leaves lookahead buffer */
+ if (c == EOF) return;
+ putptr = (int)lexBuf.getPtr - 1;
+ if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
+ lexBuf.getPtr = putptr;
+ lexBuf.buf[putptr] = c;
+ lexBuf.len += 1;
+ }
+
+static char* lexLookaheadWord() {
+ /* this function can lookahead word with max size of MAX_LEX_LOOKAHEAD_0
+ / and thing bigger than that will stop the lookahead and return 0;
+ / leading white spaces are not recoverable.
+ */
+ int c;
+ int len = 0;
+ int curgetptr = 0;
+ lexSkipWhite();
+ lexClearToken();
+ curgetptr = (int)lexBuf.getPtr; // remember!
+ while (len < (MAX_LEX_LOOKAHEAD_0)) {
+ c = lexGetc();
+ len++;
+ if (c == EOF || strchr("\t\n ;:=", c)) {
+ lexAppendc(0);
+ /* restore lookahead buf. */
+ lexBuf.len += len;
+ lexBuf.getPtr = curgetptr;
+ return lexStr();
+ }
+ else
+ lexAppendc(c);
+ }
+ lexBuf.len += len; /* char that has been moved to lookahead buffer */
+ lexBuf.getPtr = curgetptr;
+ return 0;
+ }
+
+#ifdef _SUPPORT_LINE_FOLDING
+static void handleMoreRFC822LineBreak(int c) {
+ /* suport RFC 822 line break in cases like
+ * ADR: foo;
+ * morefoo;
+ * more foo;
+ */
+ if (c == ';') {
+ int a;
+ lexSkipLookahead();
+ /* skip white spaces */
+ a = lexLookahead();
+ while (a == ' ' || a == '\t') {
+ lexSkipLookahead();
+ a = lexLookahead();
+ }
+ if (a == '\n') {
+ lexSkipLookahead();
+ a = lexLookahead();
+ if (a == ' ' || a == '\t') {
+ /* continuation, throw away all the \n and spaces read so
+ * far
+ */
+ lexSkipWhite();
+ lexPushLookaheadc(';');
+ }
+ else {
+ lexPushLookaheadc('\n');
+ lexPushLookaheadc(';');
+ }
+ }
+ else {
+ lexPushLookaheadc(';');
+ }
+ }
+ }
+
+static char* lexGet1Value() {
+ int c;
+ lexSkipWhite();
+ c = lexLookahead();
+ lexClearToken();
+ while (c != EOF && c != ';') {
+ if (c == '\\' ) {
+ int a;
+ lexSkipLookahead();
+ a = lexLookahead();
+ if ( a != ';' ) {
+ lexAppendc('\\');
+ } else {
+ lexAppendc( ';' );
+ lexSkipLookahead();
+ }
+ } else if (c == '\n') {
+ int a;
+ lexSkipLookahead();
+ a = lexLookahead();
+ if (a == ' ' || a == '\t') {
+ lexAppendc(' ');
+ lexSkipLookahead();
+ }
+ else {
+ lexPushLookaheadc('\n');
+ break;
+ }
+ }
+ else {
+ lexAppendc(c);
+ lexSkipLookahead();
+ }
+ c = lexLookahead();
+ }
+ lexAppendc(0);
+ handleMoreRFC822LineBreak(c);
+ return c==EOF?0:lexStr();
+ }
+#endif
+
+static int match_begin_name(int end) {
+ char *n = lexLookaheadWord();
+ int token = ID;
+ if (n) {
+ if (!qstricmp(n,"vcard")) token = end?END_VCARD:BEGIN_VCARD;
+ else if (!qstricmp(n,"vcalendar")) token = end?END_VCAL:BEGIN_VCAL;
+ else if (!qstricmp(n,"vevent")) token = end?END_VEVENT:BEGIN_VEVENT;
+ else if (!qstricmp(n,"vtodo")) token = end?END_VTODO:BEGIN_VTODO;
+ deleteStr(n);
+ return token;
+ }
+ return 0;
+ }
+
+
+#ifdef INCLUDEMFC
+void initLex(const char *inputstring, unsigned long inputlen, CFile *inputfile)
+#else
+void initLex(const char *inputstring, unsigned long inputlen, FILE *inputfile)
+#endif
+ {
+ // initialize lex mode stack
+ lexBuf.lexModeStack[lexBuf.lexModeStackTop=0] = L_NORMAL;
+
+ // iniatialize lex buffer.
+ lexBuf.inputString = (char*) inputstring;
+ lexBuf.inputLen = inputlen;
+ lexBuf.curPos = 0;
+ lexBuf.inputFile = inputfile;
+
+ lexBuf.len = 0;
+ lexBuf.getPtr = 0;
+
+ lexBuf.maxToken = MAXTOKEN;
+ lexBuf.strs = (char*)malloc(MAXTOKEN);
+ lexBuf.strsLen = 0;
+
+ }
+
+static void finiLex() {
+ free(lexBuf.strs);
+ }
+
+
+/*-----------------------------------*/
+/* This parses and converts the base64 format for binary encoding into
+ * a decoded buffer (allocated with new). See RFC 1521.
+ */
+static char * lexGetDataFromBase64()
+ {
+ unsigned long bytesLen = 0, bytesMax = 0;
+ int quadIx = 0, pad = 0;
+ unsigned long trip = 0;
+ unsigned char b;
+ int c;
+ unsigned char *bytes = NULL;
+ unsigned char *oldBytes = NULL;
+
+ DBG_(("db: lexGetDataFromBase64\n"));
+ while (1) {
+ c = lexGetc();
+ if (c == '\n') {
+ ++mime_lineNum;
+ if (lexLookahead() == '\n') {
+ /* a '\n' character by itself means end of data */
+ break;
+ }
+ else continue; /* ignore '\n' */
+ }
+ else {
+ if ((c >= 'A') && (c <= 'Z'))
+ b = (unsigned char)(c - 'A');
+ else if ((c >= 'a') && (c <= 'z'))
+ b = (unsigned char)(c - 'a') + 26;
+ else if ((c >= '0') && (c <= '9'))
+ b = (unsigned char)(c - '0') + 52;
+ else if (c == '+')
+ b = 62;
+ else if (c == '/')
+ b = 63;
+ else if (c == '=') {
+ b = 0;
+ pad++;
+ } else if ((c == ' ') || (c == '\t')) {
+ continue;
+ } else { /* error condition */
+ if (bytes) free(bytes);
+ else if (oldBytes) free(oldBytes);
+ // error recovery: skip until 2 adjacent newlines.
+ DBG_(("db: invalid character 0x%x '%c'\n", c,c));
+ if (c != EOF) {
+ c = lexGetc();
+ while (c != EOF) {
+ if (c == '\n' && lexLookahead() == '\n') {
+ ++mime_lineNum;
+ break;
+ }
+ c = lexGetc();
+ }
+ }
+ return NULL;
+ }
+ trip = (trip << 6) | b;
+ if (++quadIx == 4) {
+ unsigned char outBytes[3];
+ int numOut;
+ int i;
+ for (i = 0; i < 3; i++) {
+ outBytes[2-i] = (unsigned char)(trip & 0xFF);
+ trip >>= 8;
+ }
+ numOut = 3 - pad;
+ if (bytesLen + numOut > bytesMax) {
+ if (!bytes) {
+ bytesMax = 1024;
+ bytes = (unsigned char*)malloc((size_t)bytesMax);
+ }
+ else {
+ bytesMax <<= 2;
+ oldBytes = bytes;
+ bytes = (unsigned char*)realloc(bytes,(size_t)bytesMax);
+ }
+ if (bytes == 0) {
+ mime_error("out of memory while processing BASE64 data\n");
+ }
+ }
+ if (bytes) {
+ memcpy(bytes + bytesLen, outBytes, numOut);
+ bytesLen += numOut;
+ }
+ trip = 0;
+ quadIx = 0;
+ }
+ }
+ } /* while */
+ DBG_(("db: bytesLen = %d\n", bytesLen));
+ /* kludge: all this won't be necessary if we have tree form
+ representation */
+ if (bytes) {
+ setValueWithSize(curProp,bytes,(unsigned int)bytesLen);
+ free(bytes);
+ }
+ else if (oldBytes) {
+ setValueWithSize(curProp,oldBytes,(unsigned int)bytesLen);
+ free(oldBytes);
+ }
+ return 0;
+ }
+
+static int match_begin_end_name(int end) {
+ int token;
+ lexSkipWhite();
+ if (lexLookahead() != ':') return ID;
+ lexSkipLookahead();
+ lexSkipWhite();
+ token = match_begin_name(end);
+ if (token == ID) {
+ lexPushLookaheadc(':');
+ DBG_(("db: ID '%s'\n", yylval.str));
+ return ID;
+ }
+ else if (token != 0) {
+ lexSkipLookaheadWord();
+ deleteStr(yylval.str);
+ DBG_(("db: begin/end %d\n", token));
+ return token;
+ }
+ return 0;
+ }
+
+static char* lexGetQuotedPrintable()
+{
+ int c;
+ lexSkipWhite();
+ c = lexLookahead();
+ lexClearToken();
+
+ while (c != EOF && c != ';') {
+ if (c == '\n') {
+ // break, leave '\n' on remaining chars.
+ break;
+ } else if (c == '=') {
+ int cur = 0;
+ int next;
+
+ lexSkipLookahead(); // skip '='
+ next = lexLookahead();
+
+ if (next == '\n') {
+ // skip and only skip the \n
+ lexSkipLookahead();
+ c = lexLookahead();
+ ++mime_lineNum; // aid in error reporting
+ continue;
+ } else if (next >= '0' && next <= '9') {
+ cur = next - '0';
+ } else if (next >= 'A' && next <= 'F') {
+ cur = next - 'A' + 10;
+ } else {
+ // we have been sent buggy stuff. doesn't matter
+ // what we do so long as we keep going.
+ // should probably spit an error here
+ c = lexLookahead();
+ continue;
+ }
+
+ lexSkipLookahead(); // skip A-Z0-9
+ next = lexLookahead();
+
+ cur = cur * 16;
+ // this time really just expecting 0-9A-F
+ if (next >= '0' && next <= '9') {
+ cur += next - '0';
+ } else if (next >= 'A' && next <= 'F') {
+ cur += next - 'A' + 10;
+ } else {
+ // we have been sent buggy stuff. doesn't matter
+ // what we do so long as we keep going.
+ // should probably spit an error here
+ c = lexLookahead();
+ continue;
+ }
+
+ // got a valid escaped =. append it.
+ lexSkipLookahead(); // skip second 0-9A-F
+ lexAppendc(cur);
+ } else {
+ lexSkipLookahead(); // skip whatever we just read.
+ lexAppendc(c); // and append it.
+ }
+ c = lexLookahead();
+ }
+ lexAppendc(0);
+ return c==EOF?0:lexStr();
+}
+
+static int yylex() {
+
+ int lexmode = LEXMODE();
+ if (lexmode == L_VALUES) {
+ int c = lexGetc();
+ if (c == ';') {
+ DBG_(("db: SEMICOLON\n"));
+ lexPushLookaheadc(c);
+ handleMoreRFC822LineBreak(c);
+ lexSkipLookahead();
+ return SEMICOLON;
+ }
+ else if (strchr("\n",c)) {
+ ++mime_lineNum;
+ /* consume all line separator(s) adjacent to each other */
+ c = lexLookahead();
+ while (strchr("\n",c)) {
+ lexSkipLookahead();
+ c = lexLookahead();
+ ++mime_lineNum;
+ }
+ DBG_(("db: LINESEP\n"));
+ return LINESEP;
+ }
+ else {
+ char *p = 0;
+ lexPushLookaheadc(c);
+ if (lexWithinMode(L_BASE64)) {
+ /* get each char and convert to bin on the fly... */
+ p = lexGetDataFromBase64();
+ yylval.str = p;
+ return STRING;
+ }
+ else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
+ p = lexGetQuotedPrintable();
+ }
+ else {
+#ifdef _SUPPORT_LINE_FOLDING
+ p = lexGet1Value();
+#else
+ p = lexGetStrUntil(";\n");
+#endif
+ }
+ if (p) {
+ DBG_(("db: STRING: '%s'\n", p));
+ yylval.str = p;
+ return STRING;
+ }
+ else return 0;
+ }
+ }
+ else {
+ /* normal mode */
+ while (1) {
+ int c = lexGetc();
+ switch(c) {
+ case ':': {
+ /* consume all line separator(s) adjacent to each other */
+ /* ignoring linesep immediately after colon. */
+ c = lexLookahead();
+ while (strchr("\n",c)) {
+ lexSkipLookahead();
+ c = lexLookahead();
+ ++mime_lineNum;
+ }
+ DBG_(("db: COLON\n"));
+ return COLON;
+ }
+ case ';':
+ DBG_(("db: SEMICOLON\n"));
+ return SEMICOLON;
+ case '=':
+ DBG_(("db: EQ\n"));
+ return EQ;
+ /* ignore whitespace in this mode */
+ case '\t':
+ case ' ': continue;
+ case '\n': {
+ ++mime_lineNum;
+ continue;
+ }
+ case EOF: return 0;
+ break;
+ default: {
+ lexPushLookaheadc(c);
+ if (isalnum(c)) {
+ char *t = lexGetWord();
+ yylval.str = t;
+ if (!qstricmp(t, "begin")) {
+ return match_begin_end_name(0);
+ }
+ else if (!qstricmp(t,"end")) {
+ return match_begin_end_name(1);
+ }
+ else {
+ DBG_(("db: ID '%s'\n", t));
+ return ID;
+ }
+ }
+ else {
+ /* unknow token */
+ return 0;
+ }
+ break;
+ }
+ }
+ }
+ }
+ return 0;
+ }
+
+
+/***************************************************************************/
+/*** Public Functions ****/
+/***************************************************************************/
+
+static VObject* Parse_MIMEHelper()
+ {
+ ObjStackTop = -1;
+ mime_numErrors = 0;
+ mime_lineNum = 1;
+ vObjList = 0;
+ curObj = 0;
+
+ if (yyparse() != 0)
+ return 0;
+
+ finiLex();
+ return vObjList;
+ }
+
+/*--------------------------------------------*/
+DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
+ {
+ initLex(input, len, 0);
+ return Parse_MIMEHelper();
+ }
+
+
+#if INCLUDEMFC
+
+DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file)
+ {
+ unsigned long startPos;
+ VObject *result;
+
+ initLex(0,-1,file);
+ startPos = file->GetPosition();
+ if (!(result = Parse_MIMEHelper()))
+ file->Seek(startPos, CFile::begin);
+ return result;
+ }
+
+#else
+
+VObject* Parse_MIME_FromFile(FILE *file)
+ {
+ VObject *result;
+ long startPos;
+
+ initLex(0,(unsigned long)-1,file);
+ startPos = ftell(file);
+ if (!(result = Parse_MIMEHelper())) {
+ fseek(file,startPos,SEEK_SET);
+ }
+ return result;
+ }
+
+DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
+ {
+ FILE *fp = fopen(fname,"r");
+ if (fp) {
+ VObject* o = Parse_MIME_FromFile(fp);
+ fclose(fp);
+ return o;
+ }
+ else {
+ char msg[80];
+ sprintf(msg, "can't open file '%s' for reading\n", fname);
+ mime_error_(msg);
+ return 0;
+ }
+ }
+
+#endif
+
+/*-------------------------------------*/
+
+static MimeErrorHandler mimeErrorHandler;
+
+DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler me)
+ {
+ mimeErrorHandler = me;
+ }
+
+void mime_error(char *s)
+ {
+ char msg[256];
+ if (mimeErrorHandler) {
+ sprintf(msg,"%s at line %d", s, mime_lineNum);
+ mimeErrorHandler(msg);
+ }
+ }
+
+void mime_error_(char *s)
+ {
+ if (mimeErrorHandler) {
+ mimeErrorHandler(s);
+ }
+ }
+
diff --git a/library/backend/vcc_yacc.cpp b/library/backend/vcc_yacc.cpp index cb24631..19a108f 100644 --- a/library/backend/vcc_yacc.cpp +++ b/library/backend/vcc_yacc.cpp @@ -1,19 +1,44 @@ #ifndef lint -static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; +/*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/ +static char yyrcsid[] = "$Id$"; #endif #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 #define yyclearin (yychar=(-1)) #define yyerrok (yyerrflag=0) #define YYRECOVERING (yyerrflag!=0) -#define YYPREFIX "yy" -#line 1 "vcc.y" +#define yyparse vccparse +#define yylex vcclex +#define yyerror vccerror +#define yychar vccchar +#define yyval vccval +#define yylval vcclval +#define yydebug vccdebug +#define yynerrs vccnerrs +#define yyerrflag vccerrflag +#define yyss vccss +#define yyssp vccssp +#define yyvs vccvs +#define yyvsp vccvsp +#define yylhs vcclhs +#define yylen vcclen +#define yydefred vccdefred +#define yydgoto vccdgoto +#define yysindex vccsindex +#define yyrindex vccrindex +#define yygindex vccgindex +#define yytable vcctable +#define yycheck vcccheck +#define yyname vccname +#define yyrule vccrule +#define YYPREFIX "vcc" +#line 1 "backend/vcc.y" /***************************************************************************
(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
Business Machines Corporation and Siemens Rolm Communications Inc.
For purposes of this license notice, the term Licensors shall mean,
collectively, Apple Computer, Inc., AT&T Corp., International
@@ -68,16 +93,17 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. #endif
/**** External Functions ****/
/* assign local name to parser variables and functions so that
we can use more than one yacc based parser.
*/
+#if 0
#define yyparse mime_parse
#define yylex mime_lex
#define yyerror mime_error
#define yychar mime_char
/* #define p_yyval p_mime_val */
#undef yyval
#define yyval mime_yyval
/* #define p_yylval p_mime_lval */
@@ -100,16 +126,17 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. #define yytable mime_table
#define yycheck mime_check
#define yyname mime_name
#define yyrule mime_rule
#ifdef YYPREFIX
#undef YYPREFIX
#endif
#define YYPREFIX "mime_"
+#endif
#ifndef _NO_LINE_FOLDING
#define _SUPPORT_LINE_FOLDING 1
#endif
/* undef below if compile with MFC */
/* #define INCLUDEMFC 1 */
@@ -123,30 +150,27 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. #include <string.h>
#ifndef __MWERKS__
#include <stdlib.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
-#ifdef PALMTOPCENTER -#include <qpe/vobject_p.h>
-#include <qpe/qfiledirect_p.h> -#else +/*#ifdef PALMTOPCENTER
*/ +/*#include <qpe/vobject_p.h>
*/ +/*#else
*/ #include "vobject_p.h"
-#include "qfiledirect_p.h" -#endif +/*#endif
*/ /**** Types, Constants ****/
#define YYDEBUG 0 /* 1 to compile in some debugging code */
#define MAXTOKEN 256 /* maximum token (line) length */
-#define YYSTACKSIZE 100 /* ~unref ? -*/ +#define YYSTACKSIZE 100 /* ~unref ?
*/ #define MAXLEVEL 10 /* max # of nested objects parseable */
/* (includes outermost) */
/**** Global Variables ****/
int mime_lineNum, mime_numErrors; /* yyerror() can use these */
static VObject* vObjList;
static VObject *curProp;
@@ -183,24 +207,26 @@ enum LexMode { static int pushVObject(const char *prop);
static VObject* popVObject();
static void lexPopMode(int top);
static int lexWithinMode(enum LexMode mode);
static void lexPushMode(enum LexMode mode);
static void enterProps(const char *s);
static void enterAttr(const char *s1, const char *s2);
static void enterValues(const char *value);
+#define mime_error yyerror
+void mime_error(char *s);
void mime_error_(char *s);
-#line 185 "vcc.y" +#line 189 "backend/vcc.y" typedef union {
char *str;
VObject *vobj;
} YYSTYPE; -#line 196 "y.tab.c" +#line 225 "y.tab.c" #define EQ 257 #define COLON 258 #define DOT 259 #define SEMICOLON 260 #define SPACE 261 #define HTAB 262 #define LINESEP 263 #define NEWLINE 264 @@ -210,103 +236,103 @@ typedef union { #define END_VCAL 268 #define BEGIN_VEVENT 269 #define END_VEVENT 270 #define BEGIN_VTODO 271 #define END_VTODO 272 #define ID 273 #define STRING 274 #define YYERRCODE 256 -short yylhs[] = { -1, +short vcclhs[] = { -1, 0, 6, 6, 5, 5, 8, 3, 9, 3, 7, 7, 13, 10, 10, 15, 11, 11, 14, 14, 16, 17, 17, 1, 18, 12, 12, 2, 2, 20, 4, 21, 4, 19, 19, 22, 22, 22, 25, 23, 26, 23, 27, 24, 28, 24, }; -short yylen[] = { 2, +short vcclen[] = { 2, 1, 2, 1, 1, 1, 0, 4, 0, 3, 2, 1, 0, 5, 1, 0, 3, 1, 2, 1, 2, 1, 3, 1, 0, 4, 1, 1, 0, 0, 4, 0, 3, 2, 1, 1, 1, 1, 0, 4, 0, 3, 0, 4, 0, 3, }; -short yydefred[] = { 0, +short vccdefred[] = { 0, 0, 0, 0, 4, 5, 3, 0, 0, 0, 0, 0, 2, 14, 23, 0, 0, 11, 0, 9, 0, 0, 0, 0, 34, 35, 36, 32, 0, 7, 10, 12, 0, 0, 0, 0, 30, 33, 0, 0, 19, 0, 0, 41, 0, 45, 0, 20, 18, 27, 0, 0, 39, 43, 0, 24, 13, 22, 0, 25, }; -short yydgoto[] = { 3, +short vccdgoto[] = { 3, 15, 50, 4, 5, 6, 7, 22, 8, 9, 17, 18, 51, 41, 39, 28, 40, 47, 58, 23, 10, 11, 24, 25, 26, 32, 33, 34, 35, }; -short yysindex[] = { -262, +short vccsindex[] = { -262, 0, 0, 0, 0, 0, 0, -262, -252, -219, -249, -256, 0, 0, 0, 0, -227, 0, -242, 0, 0, 0, -252, -254, 0, 0, 0, 0, -208, 0, 0, 0, -252, -228, -252, -213, 0, 0, -212, -208, 0, -214, -233, 0, -224, 0, -195, 0, 0, 0, -197, -199, 0, 0, -212, 0, 0, 0, -214, 0, }; -short yyrindex[] = { 0, +short vccrindex[] = { 0, -222, -238, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, -215, 0, 0, 0, 0, -220, -218, -260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -192, 0, -250, 0, 0, 0, 0, -202, 0, 0, 0, -196, 0, 0, 0, 0, 0, 0, 0, -250, 0, }; -short yygindex[] = { 0, +short vccgindex[] = { 0, 3, 0, 0, 0, 61, 0, -7, 0, 0, -16, 0, 11, 0, 0, 0, 31, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, }; #define YYTABLESIZE 71 -short yytable[] = { 30, +short vcctable[] = { 30, 16, 13, 1, 13, 2, 30, 13, 37, 37, 28, 37, 27, 28, 36, 20, 31, 21, 29, 14, 20, 14, 21, 13, 14, 42, 30, 44, 30, 13, 31, 29, 13, 29, 6, 29, 38, 52, 42, 29, 14, 46, 43, 17, 8, 15, 14, 19, 53, 14, 40, 6, 38, 38, 44, 42, 21, 57, 21, 45, 49, 14, 54, 55, 56, 1, 16, 26, 12, 59, 48, 37, }; -short yycheck[] = { 16, +short vcccheck[] = { 16, 8, 256, 265, 256, 267, 22, 256, 268, 269, 260, 271, 268, 263, 268, 269, 258, 271, 256, 273, 269, 273, 271, 256, 273, 32, 42, 34, 44, 256, 268, 269, 256, 271, 256, 273, 256, 270, 256, 266, 273, 38, 270, 258, 266, 260, 273, 266, 272, 273, 270, 273, 260, 273, 272, 273, 258, 54, 260, 272, 274, 273, 257, 260, 263, 0, 258, 263, 7, 58, 39, 23, }; #define YYFINAL 3 #ifndef YYDEBUG #define YYDEBUG 0 #endif #define YYMAXTOKEN 274 #if YYDEBUG -char *yyname[] = { +char *vccname[] = { "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"EQ","COLON","DOT","SEMICOLON", "SPACE","HTAB","LINESEP","NEWLINE","BEGIN_VCARD","END_VCARD","BEGIN_VCAL", "END_VCAL","BEGIN_VEVENT","END_VEVENT","BEGIN_VTODO","END_VTODO","ID","STRING", }; -char *yyrule[] = { +char *vccrule[] = { "$accept : mime", "mime : vobjects", "vobjects : vobjects vobject", "vobjects : vobject", "vobject : vcard", "vobject : vcal", "$$1 :", "vcard : BEGIN_VCARD $$1 items END_VCARD", @@ -367,17 +393,17 @@ int yyerrflag; int yychar; short *yyssp; YYSTYPE *yyvsp; YYSTYPE yyval; YYSTYPE yylval; short yyss[YYSTACKSIZE]; YYSTYPE yyvs[YYSTACKSIZE]; #define yystacksize YYSTACKSIZE -#line 378 "vcc.y" +#line 382 "backend/vcc.y" /*------------------------------------*/
static int pushVObject(const char *prop)
{
VObject *newObj;
if (ObjStackTop == MAXLEVEL)
return FALSE;
@@ -506,17 +532,17 @@ static void lexPopMode(int top) static int lexWithinMode(enum LexMode mode) {
unsigned long i;
for (i=0;i<lexBuf.lexModeStackTop;i++)
if (mode == lexBuf.lexModeStack[i]) return 1;
return 0;
}
-static char lexGetc_()
+static int lexGetc_()
{
/* get next char from input, no buffering. */
if (lexBuf.curPos == lexBuf.inputLen)
return EOF;
else if (lexBuf.inputString)
return *(lexBuf.inputString + lexBuf.curPos++);
else {
#ifdef INCLUDEMFC
@@ -920,17 +946,17 @@ static int match_begin_end_name(int end) { DBG_(("db: begin/end %d\n", token));
return token;
}
return 0;
}
static char* lexGetQuotedPrintable()
{
- char cur;
+ int cur;
lexClearToken();
do {
cur = lexGetc();
switch (cur) {
case '=': {
int c = 0;
int next[2];
@@ -962,23 +988,23 @@ static char* lexGetQuotedPrintable() lexAppendc(c);
}
break;
} /* '=' */
case '\n': {
lexPushLookaheadc('\n');
goto EndString;
}
- case (char)EOF:
+ case (int)EOF:
break;
default:
lexAppendc(cur);
break;
} /* switch */
- } while (cur != (char)EOF);
+ } while (cur != (int)EOF);
EndString:
lexAppendc(0);
return lexStr();
} /* LexQuotedPrintable */
static int yylex() {
@@ -1145,23 +1171,28 @@ VObject* Parse_MIME_FromFile(FILE *file) if (!(result = Parse_MIMEHelper())) {
fseek(file,startPos,SEEK_SET);
}
return result;
}
DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
{
- QFileDirect f( fname );
- if ( !f.open( IO_ReadOnly ) ) {
- qWarning("Unable to open mime for reading %s", fname);
- return 0;
+ FILE *fp = fopen(fname,"r");
+ if (fp) {
+ VObject* o = Parse_MIME_FromFile(fp);
+ fclose(fp);
+ return o;
+ }
+ else {
+ char msg[80];
+ sprintf(msg, "can't open file '%s' for reading\n", fname);
+ mime_error_(msg);
+ return 0;
}
-
- return Parse_MIME_FromFile( f.directHandle() );
}
#endif
/*-------------------------------------*/
static MimeErrorHandler mimeErrorHandler;
@@ -1181,23 +1212,27 @@ void mime_error(char *s) void mime_error_(char *s)
{
if (mimeErrorHandler) {
mimeErrorHandler(s);
}
}
-#line 1192 "y.tab.c" +#line 1221 "y.tab.c" #define YYABORT goto yyabort #define YYREJECT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab int +#if defined(__STDC__) +yyparse(void) +#else yyparse() +#endif { register int yym, yyn, yystate; #if YYDEBUG register char *yys; extern char *getenv(); if (yys = getenv("YYDEBUG")) { @@ -1211,17 +1246,17 @@ yyparse() yyerrflag = 0; yychar = (-1); yyssp = yyss; yyvsp = yyvs; *yyssp = yystate = 0; yyloop: - if (yyn = yydefred[yystate]) goto yyreduce; + if ((yyn = yydefred[yystate]) != 0) goto yyreduce; if (yychar < 0) { if ((yychar = yylex()) < 0) yychar = 0; #if YYDEBUG if (yydebug) { yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; @@ -1251,20 +1286,16 @@ yyloop: } if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && yyn <= YYTABLESIZE && yycheck[yyn] == yychar) { yyn = yytable[yyn]; goto yyreduce; } if (yyerrflag) goto yyinrecovery; -#ifdef lint - goto yynewerror; -#endif -yynewerror: yyerror("syntax error"); #ifdef lint goto yyerrlab; #endif yyerrlab: ++yynerrs; yyinrecovery: if (yyerrflag < 3) @@ -1323,175 +1354,175 @@ yyreduce: printf("%sdebug: state %d, reducing by rule %d (%s)\n", YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; yyval = yyvsp[1-yym]; switch (yyn) { case 2: -#line 217 "vcc.y" +#line 221 "backend/vcc.y" { addList(&vObjList, yyvsp[0].vobj); curObj = 0; } break; case 3: -#line 219 "vcc.y" +#line 223 "backend/vcc.y" { addList(&vObjList, yyvsp[0].vobj); curObj = 0; } break; case 6: -#line 228 "vcc.y" +#line 232 "backend/vcc.y" {
lexPushMode(L_VCARD);
if (!pushVObject(VCCardProp)) YYERROR;
} break; case 7: -#line 233 "vcc.y" +#line 237 "backend/vcc.y" {
lexPopMode(0);
yyval.vobj = popVObject();
} break; case 8: -#line 238 "vcc.y" +#line 242 "backend/vcc.y" {
lexPushMode(L_VCARD);
if (!pushVObject(VCCardProp)) YYERROR;
} break; case 9: -#line 243 "vcc.y" +#line 247 "backend/vcc.y" {
lexPopMode(0);
yyval.vobj = popVObject();
} break; case 12: -#line 254 "vcc.y" +#line 258 "backend/vcc.y" {
lexPushMode(L_VALUES);
} break; case 13: -#line 258 "vcc.y" +#line 262 "backend/vcc.y" {
if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
lexPopMode(0);
lexPopMode(0);
} break; case 15: -#line 267 "vcc.y" +#line 271 "backend/vcc.y" {
enterProps(yyvsp[0].str);
} break; case 17: -#line 272 "vcc.y" +#line 276 "backend/vcc.y" {
enterProps(yyvsp[0].str);
} break; case 21: -#line 285 "vcc.y" +#line 289 "backend/vcc.y" {
enterAttr(yyvsp[0].str,0);
} break; case 22: -#line 289 "vcc.y" +#line 293 "backend/vcc.y" {
enterAttr(yyvsp[-2].str,yyvsp[0].str);
} break; case 24: -#line 298 "vcc.y" +#line 302 "backend/vcc.y" { enterValues(yyvsp[-1].str); } break; case 26: -#line 300 "vcc.y" +#line 304 "backend/vcc.y" { enterValues(yyvsp[0].str); } break; case 28: -#line 305 "vcc.y" +#line 309 "backend/vcc.y" { yyval.str = 0; } break; case 29: -#line 310 "vcc.y" +#line 314 "backend/vcc.y" { if (!pushVObject(VCCalProp)) YYERROR; } break; case 30: -#line 313 "vcc.y" +#line 317 "backend/vcc.y" { yyval.vobj = popVObject(); } break; case 31: -#line 315 "vcc.y" +#line 319 "backend/vcc.y" { if (!pushVObject(VCCalProp)) YYERROR; } break; case 32: -#line 317 "vcc.y" +#line 321 "backend/vcc.y" { yyval.vobj = popVObject(); } break; case 38: -#line 332 "vcc.y" +#line 336 "backend/vcc.y" {
lexPushMode(L_VEVENT);
if (!pushVObject(VCEventProp)) YYERROR;
} break; case 39: -#line 338 "vcc.y" +#line 342 "backend/vcc.y" {
lexPopMode(0);
popVObject();
} break; case 40: -#line 343 "vcc.y" +#line 347 "backend/vcc.y" {
lexPushMode(L_VEVENT);
if (!pushVObject(VCEventProp)) YYERROR;
} break; case 41: -#line 348 "vcc.y" +#line 352 "backend/vcc.y" {
lexPopMode(0);
popVObject();
} break; case 42: -#line 356 "vcc.y" +#line 360 "backend/vcc.y" {
lexPushMode(L_VTODO);
if (!pushVObject(VCTodoProp)) YYERROR;
} break; case 43: -#line 362 "vcc.y" +#line 366 "backend/vcc.y" {
lexPopMode(0);
popVObject();
} break; case 44: -#line 367 "vcc.y" +#line 371 "backend/vcc.y" {
lexPushMode(L_VTODO);
if (!pushVObject(VCTodoProp)) YYERROR;
} break; case 45: -#line 372 "vcc.y" +#line 376 "backend/vcc.y" {
lexPopMode(0);
popVObject();
} break; -#line 1492 "y.tab.c" +#line 1521 "y.tab.c" } yyssp -= yym; yystate = *yyssp; yyvsp -= yym; yym = yylhs[yyn]; if (yystate == 0 && yym == 0) { #if YYDEBUG diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp index 9c2ba3b..e6f6b78 100644 --- a/library/backend/vobject.cpp +++ b/library/backend/vobject.cpp @@ -1,1219 +1,1315 @@ -/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
- * src: vobject.c
- * doc: vobject and APIs to construct vobject, APIs pretty print
- * vobject, and convert a vobject into its textual representation.
- */
-
-#ifndef MWERKS
-#include <malloc.h>
-#endif
-
-#include "vobject_p.h"
-#include "qfiledirect_p.h"
-#include <string.h>
-#include <stdio.h>
-#include <fcntl.h>
-//#include <io.h>
-
-
-#define NAME_OF(o) o->id
-#define VALUE_TYPE(o) o->valType
-#define STRINGZ_VALUE_OF(o) o->val.strs
-#define INTEGER_VALUE_OF(o) o->val.i
-#define LONG_VALUE_OF(o) o->val.l
-#define ANY_VALUE_OF(o) o->val.any
-#define VOBJECT_VALUE_OF(o) o->val.vobj
-
-typedef union ValueItem {
- const char *strs;
- unsigned int i;
- unsigned long l;
- void *any;
- VObject *vobj;
- } ValueItem;
-
-struct VObject {
- VObject *next;
- const char *id;
- VObject *prop;
- unsigned short valType;
- ValueItem val;
- };
-
-typedef struct StrItem StrItem;
-
-struct StrItem {
- StrItem *next;
- const char *s;
- unsigned int refCnt;
- };
-
-const char** fieldedProp;
-
-
-
-/*----------------------------------------------------------------------
- The following functions involve with memory allocation:
- newVObject
- deleteVObject
- dupStr
- deleteStr
- newStrItem
- deleteStrItem
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(VObject*) newVObject_(const char *id)
-{
- VObject *p = (VObject*)malloc(sizeof(VObject));
- p->next = 0;
- p->id = id;
- p->prop = 0;
- VALUE_TYPE(p) = 0;
- ANY_VALUE_OF(p) = 0;
- return p;
-}
-
-DLLEXPORT(VObject*) newVObject(const char *id)
-{
- return newVObject_(lookupStr(id));
-}
-
-DLLEXPORT(void) deleteVObject(VObject *p)
-{
- unUseStr(p->id);
- free(p);
-}
-
-DLLEXPORT(char*) dupStr(const char *s, unsigned int size)
-{
- char *t;
- if (size == 0) {
- size = strlen(s);
- }
- t = (char*)malloc(size+1);
- if (t) {
- memcpy(t,s,size);
- t[size] = 0;
- return t;
- }
- else {
- return (char*)0;
- }
-}
-
-DLLEXPORT(void) deleteStr(const char *p)
-{
- if (p) free((void*)p);
-}
-
-
-static StrItem* newStrItem(const char *s, StrItem *next)
-{
- StrItem *p = (StrItem*)malloc(sizeof(StrItem));
- p->next = next;
- p->s = s;
- p->refCnt = 1;
- return p;
-}
-
-static void deleteStrItem(StrItem *p)
-{
- free((void*)p);
-}
-
-
-/*----------------------------------------------------------------------
- The following function provide accesses to VObject's value.
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(const char*) vObjectName(VObject *o)
-{
- return NAME_OF(o);
-}
-
-DLLEXPORT(void) setVObjectName(VObject *o, const char* id)
-{
- NAME_OF(o) = id;
-}
-
-DLLEXPORT(const char*) vObjectStringZValue(VObject *o)
-{
- return STRINGZ_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s)
-{
- STRINGZ_VALUE_OF(o) = dupStr(s,0);
- VALUE_TYPE(o) = VCVT_STRINGZ;
-}
-
-DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s)
-{
- STRINGZ_VALUE_OF(o) = s;
- VALUE_TYPE(o) = VCVT_STRINGZ;
-}
-
-DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o)
-{
- return INTEGER_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i)
-{
- INTEGER_VALUE_OF(o) = i;
- VALUE_TYPE(o) = VCVT_UINT;
-}
-
-DLLEXPORT(unsigned long) vObjectLongValue(VObject *o)
-{
- return LONG_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l)
-{
- LONG_VALUE_OF(o) = l;
- VALUE_TYPE(o) = VCVT_ULONG;
-}
-
-DLLEXPORT(void*) vObjectAnyValue(VObject *o)
-{
- return ANY_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t)
-{
- ANY_VALUE_OF(o) = t;
- VALUE_TYPE(o) = VCVT_RAW;
-}
-
-DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o)
-{
- return VOBJECT_VALUE_OF(o);
-}
-
-DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p)
-{
- VOBJECT_VALUE_OF(o) = p;
- VALUE_TYPE(o) = VCVT_VOBJECT;
-}
-
-DLLEXPORT(int) vObjectValueType(VObject *o)
-{
- return VALUE_TYPE(o);
-}
-
-
-/*----------------------------------------------------------------------
- The following functions can be used to build VObject.
- ----------------------------------------------------------------------*/
-
-DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p)
-{
- /* circular link list pointed to tail */
- /*
- o {next,id,prop,val}
- V
- pn {next,id,prop,val}
- V
- ...
- p1 {next,id,prop,val}
- V
- pn
- -->
- o {next,id,prop,val}
- V
- pn {next,id,prop,val}
- V
- p {next,id,prop,val}
- ...
- p1 {next,id,prop,val}
- V
- pn
- */
-
- VObject *tail = o->prop;
- if (tail) {
- p->next = tail->next;
- o->prop = tail->next = p;
- }
- else {
- o->prop = p->next = p;
- }
- return p;
-}
-
-DLLEXPORT(VObject*) addProp(VObject *o, const char *id)
-{
- return addVObjectProp(o,newVObject(id));
-}
-
-DLLEXPORT(VObject*) addProp_(VObject *o, const char *id)
-{
- return addVObjectProp(o,newVObject_(id));
-}
-
-DLLEXPORT(void) addList(VObject **o, VObject *p)
-{
- p->next = 0;
- if (*o == 0) {
- *o = p;
- }
- else {
- VObject *t = *o;
- while (t->next) {
- t = t->next;
- }
- t->next = p;
- }
-}
-
-DLLEXPORT(VObject*) nextVObjectInList(VObject *o)
-{
- return o->next;
-}
-
-DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size)
-{
- VObject *sizeProp;
- setVObjectAnyValue(prop, val);
- sizeProp = addProp(prop,VCDataSizeProp);
- setVObjectLongValue(sizeProp, size);
- return prop;
-}
-
-DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size)
-{
- void *p = dupStr((const char *)val,size);
- return setValueWithSize_(prop,p,p?size:0);
-}
-
-DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o)
-{
- i->start = o->prop;
- i->next = 0;
-}
-
-DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o)
-{
- i->start = o->next;
- i->next = 0;
-}
-
-DLLEXPORT(int) moreIteration(VObjectIterator *i)
-{
- return (i->start && (i->next==0 || i->next!=i->start));
-}
-
-DLLEXPORT(VObject*) nextVObject(VObjectIterator *i)
-{
- if (i->start && i->next != i->start) {
- if (i->next == 0) {
- i->next = i->start->next;
- return i->next;
- }
- else {
- i->next = i->next->next;
- return i->next;
- }
- }
- else return (VObject*)0;
-}
-
-DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id)
-{
- VObjectIterator i;
- initPropIterator(&i,o);
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- if (!qstricmp(id,each->id))
- return each;
- }
- return (VObject*)0;
-}
-
-DLLEXPORT(VObject*) addGroup(VObject *o, const char *g)
-{
- /*
- a.b.c
- -->
- prop(c)
- prop(VCGrouping=b)
- prop(VCGrouping=a)
- */
- char *dot = strrchr(g,'.');
- if (dot) {
- VObject *p, *t;
- char *gs, *n = dot+1;
- gs = dupStr(g,0); /* so we can write to it. */
- /* used to be
- * t = p = addProp_(o,lookupProp_(n));
- */
- t = p = addProp_(o,lookupProp(n));
- dot = strrchr(gs,'.');
- *dot = 0;
- do {
- dot = strrchr(gs,'.');
- if (dot) {
- n = dot+1;
- *dot=0;
- }
- else
- n = gs;
- /* property(VCGroupingProp=n);
- * and the value may have VCGrouping property
- */
- t = addProp(t,VCGroupingProp);
- setVObjectStringZValue(t,lookupProp_(n));
- } while (n != gs);
- deleteStr(gs);
- return p;
- }
- else
- return addProp_(o,lookupProp(g));
-}
-
-DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v)
-{
- VObject *prop;
- prop = addProp(o,p);
- setVObjectStringZValue_(prop, strdup( v ) );
- return prop;
-}
-
-DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v,
- unsigned int size)
-{
- VObject *prop;
- prop = addProp(o,p);
- setValueWithSize_(prop, (void*)v, size);
- return prop;
-}
-
-DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v,
- unsigned int size)
-{
- return addPropSizedValue_(o,p,dupStr(v,size),size);
-}
-
-
-DLLEXPORT(void) cleanVObject(VObject *o)
-{
- if (o == 0) return;
- if (o->prop) {
- /* destroy time: cannot use the iterator here.
- Have to break the cycle in the circular link
- list and turns it into regular NULL-terminated
- list -- since at some point of destruction,
- the reference entry for the iterator to work
- will not longer be valid.
- */
- VObject *p;
- p = o->prop->next;
- o->prop->next = 0;
- do {
- VObject *t = p->next;
- cleanVObject(p);
- p = t;
- } while (p);
- }
- switch (VALUE_TYPE(o)) {
- case VCVT_STRINGZ:
- case VCVT_RAW:
- // assume they are all allocated by malloc.
- free((char*)STRINGZ_VALUE_OF(o));
- break;
- case VCVT_VOBJECT:
- cleanVObject(VOBJECT_VALUE_OF(o));
- break;
- }
- deleteVObject(o);
-}
-
-DLLEXPORT(void) cleanVObjects(VObject *list)
-{
- while (list) {
- VObject *t = list;
- list = nextVObjectInList(list);
- cleanVObject(t);
- }
-}
-
-/*----------------------------------------------------------------------
- The following is a String Table Facilities.
- ----------------------------------------------------------------------*/
-
-#define STRTBLSIZE 255
-
-static StrItem *strTbl[STRTBLSIZE];
-
-static unsigned int hashStr(const char *s)
-{
- unsigned int h = 0;
- int i;
- for (i=0;s[i];i++) {
- h += s[i]*i;
- }
- return h % STRTBLSIZE;
-}
-
-DLLEXPORT(const char*) lookupStr(const char *s)
-{
- StrItem *t;
- unsigned int h = hashStr(s);
- if ((t = strTbl[h]) != 0) {
- do {
- if (qstricmp(t->s,s) == 0) {
- t->refCnt++;
- return t->s;
- }
- t = t->next;
- } while (t);
- }
- s = dupStr(s,0);
- strTbl[h] = newStrItem(s,strTbl[h]);
- return s;
-}
-
-DLLEXPORT(void) unUseStr(const char *s)
-{
- StrItem *t, *p;
- unsigned int h = hashStr(s);
- if ((t = strTbl[h]) != 0) {
- p = t;
- do {
- if (qstricmp(t->s,s) == 0) {
- t->refCnt--;
- if (t->refCnt == 0) {
- if (p == strTbl[h]) {
- strTbl[h] = t->next;
- }
- else {
- p->next = t->next;
- }
- deleteStr(t->s);
- deleteStrItem(t);
- return;
- }
- }
- p = t;
- t = t->next;
- } while (t);
- }
-}
-
-DLLEXPORT(void) cleanStrTbl()
-{
- int i;
- for (i=0; i<STRTBLSIZE;i++) {
- StrItem *t = strTbl[i];
- while (t) {
- StrItem *p;
- deleteStr(t->s);
- p = t;
- t = t->next;
- deleteStrItem(p);
- } while (t);
- strTbl[i] = 0;
- }
-}
-
-
-struct PreDefProp {
- const char *name;
- const char *alias;
- const char** fields;
- unsigned int flags;
- };
-
-/* flags in PreDefProp */
-#define PD_BEGIN 0x1
-#define PD_INTERNAL 0x2
-
-static const char *adrFields[] = {
- VCPostalBoxProp,
- VCExtAddressProp,
- VCStreetAddressProp,
- VCCityProp,
- VCRegionProp,
- VCPostalCodeProp,
- VCCountryNameProp,
- 0
-};
-
-static const char *nameFields[] = {
- VCFamilyNameProp,
- VCGivenNameProp,
- VCAdditionalNamesProp,
- VCNamePrefixesProp,
- VCNameSuffixesProp,
- NULL
- };
-
-static const char *orgFields[] = {
- VCOrgNameProp,
- VCOrgUnitProp,
- VCOrgUnit2Prop,
- VCOrgUnit3Prop,
- VCOrgUnit4Prop,
- NULL
- };
-
-static const char *AAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCAudioContentProp,
- 0
- };
-
-/* ExDate -- has unamed fields */
-/* RDate -- has unamed fields */
-
-static const char *DAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCDisplayStringProp,
- 0
- };
-
-static const char *MAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCEmailAddressProp,
- VCNoteProp,
- 0
- };
-
-static const char *PAlarmFields[] = {
- VCRunTimeProp,
- VCSnoozeTimeProp,
- VCRepeatCountProp,
- VCProcedureNameProp,
- 0
- };
-
-static struct PreDefProp propNames[] = {
- { VC7bitProp, 0, 0, 0 },
- { VC8bitProp, 0, 0, 0 },
- { VCAAlarmProp, 0, AAlarmFields, 0 },
- { VCAdditionalNamesProp, 0, 0, 0 },
- { VCAdrProp, 0, adrFields, 0 },
- { VCAgentProp, 0, 0, 0 },
- { VCAIFFProp, 0, 0, 0 },
- { VCAOLProp, 0, 0, 0 },
- { VCAppleLinkProp, 0, 0, 0 },
- { VCAttachProp, 0, 0, 0 },
- { VCAttendeeProp, 0, 0, 0 },
- { VCATTMailProp, 0, 0, 0 },
- { VCAudioContentProp, 0, 0, 0 },
- { VCAVIProp, 0, 0, 0 },
- { VCBase64Prop, 0, 0, 0 },
- { VCBBSProp, 0, 0, 0 },
- { VCBirthDateProp, 0, 0, 0 },
- { VCBMPProp, 0, 0, 0 },
- { VCBodyProp, 0, 0, 0 },
- { VCBusinessRoleProp, 0, 0, 0 },
- { VCCalProp, 0, 0, PD_BEGIN },
- { VCCaptionProp, 0, 0, 0 },
- { VCCardProp, 0, 0, PD_BEGIN },
- { VCCarProp, 0, 0, 0 },
- { VCCategoriesProp, 0, 0, 0 },
- { VCCellularProp, 0, 0, 0 },
- { VCCGMProp, 0, 0, 0 },
- { VCCharSetProp, 0, 0, 0 },
- { VCCIDProp, VCContentIDProp, 0, 0 },
- { VCCISProp, 0, 0, 0 },
- { VCCityProp, 0, 0, 0 },
- { VCClassProp, 0, 0, 0 },
- { VCCommentProp, 0, 0, 0 },
- { VCCompletedProp, 0, 0, 0 },
- { VCContentIDProp, 0, 0, 0 },
- { VCCountryNameProp, 0, 0, 0 },
- { VCDAlarmProp, 0, DAlarmFields, 0 },
- { VCDataSizeProp, 0, 0, PD_INTERNAL },
- { VCDayLightProp, 0, 0, 0 },
- { VCDCreatedProp, 0, 0, 0 },
- { VCDeliveryLabelProp, 0, 0, 0 },
- { VCDescriptionProp, 0, 0, 0 },
- { VCDIBProp, 0, 0, 0 },
- { VCDisplayStringProp, 0, 0, 0 },
- { VCDomesticProp, 0, 0, 0 },
- { VCDTendProp, 0, 0, 0 },
- { VCDTstartProp, 0, 0, 0 },
- { VCDueProp, 0, 0, 0 },
- { VCEmailAddressProp, 0, 0, 0 },
- { VCEncodingProp, 0, 0, 0 },
- { VCEndProp, 0, 0, 0 },
- { VCEventProp, 0, 0, PD_BEGIN },
- { VCEWorldProp, 0, 0, 0 },
- { VCExNumProp, 0, 0, 0 },
- { VCExpDateProp, 0, 0, 0 },
- { VCExpectProp, 0, 0, 0 },
- { VCExtAddressProp, 0, 0, 0 },
- { VCFamilyNameProp, 0, 0, 0 },
- { VCFaxProp, 0, 0, 0 },
- { VCFullNameProp, 0, 0, 0 },
- { VCGeoLocationProp, 0, 0, 0 },
- { VCGeoProp, 0, 0, 0 },
- { VCGIFProp, 0, 0, 0 },
- { VCGivenNameProp, 0, 0, 0 },
- { VCGroupingProp, 0, 0, 0 },
- { VCHomeProp, 0, 0, 0 },
- { VCIBMMailProp, 0, 0, 0 },
- { VCInlineProp, 0, 0, 0 },
- { VCInternationalProp, 0, 0, 0 },
- { VCInternetProp, 0, 0, 0 },
- { VCISDNProp, 0, 0, 0 },
- { VCJPEGProp, 0, 0, 0 },
- { VCLanguageProp, 0, 0, 0 },
- { VCLastModifiedProp, 0, 0, 0 },
- { VCLastRevisedProp, 0, 0, 0 },
- { VCLocationProp, 0, 0, 0 },
- { VCLogoProp, 0, 0, 0 },
- { VCMailerProp, 0, 0, 0 },
- { VCMAlarmProp, 0, MAlarmFields, 0 },
- { VCMCIMailProp, 0, 0, 0 },
- { VCMessageProp, 0, 0, 0 },
- { VCMETProp, 0, 0, 0 },
- { VCModemProp, 0, 0, 0 },
- { VCMPEG2Prop, 0, 0, 0 },
- { VCMPEGProp, 0, 0, 0 },
- { VCMSNProp, 0, 0, 0 },
- { VCNamePrefixesProp, 0, 0, 0 },
- { VCNameProp, 0, nameFields, 0 },
- { VCNameSuffixesProp, 0, 0, 0 },
- { VCNoteProp, 0, 0, 0 },
- { VCOrgNameProp, 0, 0, 0 },
- { VCOrgProp, 0, orgFields, 0 },
- { VCOrgUnit2Prop, 0, 0, 0 },
- { VCOrgUnit3Prop, 0, 0, 0 },
- { VCOrgUnit4Prop, 0, 0, 0 },
- { VCOrgUnitProp, 0, 0, 0 },
- { VCPagerProp, 0, 0, 0 },
- { VCPAlarmProp, 0, PAlarmFields, 0 },
- { VCParcelProp, 0, 0, 0 },
- { VCPartProp, 0, 0, 0 },
- { VCPCMProp, 0, 0, 0 },
- { VCPDFProp, 0, 0, 0 },
- { VCPGPProp, 0, 0, 0 },
- { VCPhotoProp, 0, 0, 0 },
- { VCPICTProp, 0, 0, 0 },
- { VCPMBProp, 0, 0, 0 },
- { VCPostalBoxProp, 0, 0, 0 },
- { VCPostalCodeProp, 0, 0, 0 },
- { VCPostalProp, 0, 0, 0 },
- { VCPowerShareProp, 0, 0, 0 },
- { VCPreferredProp, 0, 0, 0 },
- { VCPriorityProp, 0, 0, 0 },
- { VCProcedureNameProp, 0, 0, 0 },
- { VCProdIdProp, 0, 0, 0 },
- { VCProdigyProp, 0, 0, 0 },
- { VCPronunciationProp, 0, 0, 0 },
- { VCPSProp, 0, 0, 0 },
- { VCPublicKeyProp, 0, 0, 0 },
- { VCQPProp, VCQuotedPrintableProp, 0, 0 },
- { VCQuickTimeProp, 0, 0, 0 },
- { VCQuotedPrintableProp, 0, 0, 0 },
- { VCRDateProp, 0, 0, 0 },
- { VCRegionProp, 0, 0, 0 },
- { VCRelatedToProp, 0, 0, 0 },
- { VCRepeatCountProp, 0, 0, 0 },
- { VCResourcesProp, 0, 0, 0 },
- { VCRNumProp, 0, 0, 0 },
- { VCRoleProp, 0, 0, 0 },
- { VCRRuleProp, 0, 0, 0 },
- { VCRSVPProp, 0, 0, 0 },
- { VCRunTimeProp, 0, 0, 0 },
- { VCSequenceProp, 0, 0, 0 },
- { VCSnoozeTimeProp, 0, 0, 0 },
- { VCStartProp, 0, 0, 0 },
- { VCStatusProp, 0, 0, 0 },
- { VCStreetAddressProp, 0, 0, 0 },
- { VCSubTypeProp, 0, 0, 0 },
- { VCSummaryProp, 0, 0, 0 },
- { VCTelephoneProp, 0, 0, 0 },
- { VCTIFFProp, 0, 0, 0 },
- { VCTimeZoneProp, 0, 0, 0 },
- { VCTitleProp, 0, 0, 0 },
- { VCTLXProp, 0, 0, 0 },
- { VCTodoProp, 0, 0, PD_BEGIN },
- { VCTranspProp, 0, 0, 0 },
- { VCUniqueStringProp, 0, 0, 0 },
- { VCURLProp, 0, 0, 0 },
- { VCURLValueProp, 0, 0, 0 },
- { VCValueProp, 0, 0, 0 },
- { VCVersionProp, 0, 0, 0 },
- { VCVideoProp, 0, 0, 0 },
- { VCVoiceProp, 0, 0, 0 },
- { VCWAVEProp, 0, 0, 0 },
- { VCWMFProp, 0, 0, 0 },
- { VCWorkProp, 0, 0, 0 },
- { VCX400Prop, 0, 0, 0 },
- { VCX509Prop, 0, 0, 0 },
- { VCXRuleProp, 0, 0, 0 },
- { 0,0,0,0 }
- };
-
-
-static struct PreDefProp* lookupPropInfo(const char* str)
-{
- /* brute force for now, could use a hash table here. */
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (qstricmp(str, propNames[i].name) == 0) {
- return &propNames[i];
- }
-
- return 0;
-}
-
-
-DLLEXPORT(const char*) lookupProp_(const char* str)
-{
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (qstricmp(str, propNames[i].name) == 0) {
- const char* s;
- s = propNames[i].alias?propNames[i].alias:propNames[i].name;
- return lookupStr(s);
- }
- return lookupStr(str);
-}
-
-
-DLLEXPORT(const char*) lookupProp(const char* str)
-{
- int i;
-
- for (i = 0; propNames[i].name; i++)
- if (qstricmp(str, propNames[i].name) == 0) {
- const char *s;
- fieldedProp = propNames[i].fields;
- s = propNames[i].alias?propNames[i].alias:propNames[i].name;
- return lookupStr(s);
- }
- fieldedProp = 0;
- return lookupStr(str);
-}
-
-
-/*----------------------------------------------------------------------
- APIs to Output text form.
- ----------------------------------------------------------------------*/
-#define OFILE_REALLOC_SIZE 256
-typedef struct OFile {
- FILE *fp;
- char *s;
- int len;
- int limit;
- int alloc:1;
- int fail:1;
- } OFile;
-
-#if 0
-static void appendsOFile(OFile *fp, const char *s)
-{
- int slen;
- if (fp->fail) return;
- slen = strlen(s);
- if (fp->fp) {
- fwrite(s,1,slen,fp->fp);
- }
- else {
-stuff:
- if (fp->len + slen < fp->limit) {
- memcpy(fp->s+fp->len,s,slen);
- fp->len += slen;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen;
- fp->s = (char *) realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-
-static void appendcOFile(OFile *fp, char c)
-{
- if (fp->fail) return;
- if (fp->fp) {
- fputc(c,fp->fp);
- }
- else {
-stuff:
- if (fp->len+1 < fp->limit) {
- fp->s[fp->len] = c;
- fp->len++;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- fp->s = (char *) realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-#else
-static void appendcOFile_(OFile *fp, char c)
-{
- if (fp->fail) return;
- if (fp->fp) {
- fputc(c,fp->fp);
- }
- else {
-stuff:
- if (fp->len+1 < fp->limit) {
- fp->s[fp->len] = c;
- fp->len++;
- return;
- }
- else if (fp->alloc) {
- fp->limit = fp->limit + OFILE_REALLOC_SIZE;
- fp->s = (char *)realloc(fp->s,fp->limit);
- if (fp->s) goto stuff;
- }
- if (fp->alloc)
- free(fp->s);
- fp->s = 0;
- fp->fail = 1;
- }
-}
-
-static void appendcOFile(OFile *fp, char c)
-{
- if (c == '\n') {
- /* write out as <CR><LF> */
- appendcOFile_(fp,0xd);
- appendcOFile_(fp,0xa);
- }
- else
- appendcOFile_(fp,c);
-}
-
-static void appendsOFile(OFile *fp, const char *s)
-{
- int i, slen;
- slen = strlen(s);
- for (i=0; i<slen; i++) {
- appendcOFile(fp,s[i]);
- }
-}
-
-#endif
-
-static void initOFile(OFile *fp, FILE *ofp)
-{
- fp->fp = ofp;
- fp->s = 0;
- fp->len = 0;
- fp->limit = 0;
- fp->alloc = 0;
- fp->fail = 0;
-}
-
-static int writeBase64(OFile *fp, unsigned char *s, long len)
-{
- long cur = 0;
- int i, numQuads = 0;
- unsigned long trip;
- unsigned char b;
- char quad[5];
-#define MAXQUADS 16
-
- quad[4] = 0;
-
- while (cur < len) {
- // collect the triplet of bytes into 'trip'
- trip = 0;
- for (i = 0; i < 3; i++) {
- b = (cur < len) ? *(s + cur) : 0;
- cur++;
- trip = trip << 8 | b;
- }
- // fill in 'quad' with the appropriate four characters
- for (i = 3; i >= 0; i--) {
- b = (unsigned char)(trip & 0x3F);
- trip = trip >> 6;
- if ((3 - i) < (cur - len))
- quad[i] = '='; // pad char
- else if (b < 26) quad[i] = (char)b + 'A';
- else if (b < 52) quad[i] = (char)(b - 26) + 'a';
- else if (b < 62) quad[i] = (char)(b - 52) + '0';
- else if (b == 62) quad[i] = '+';
- else quad[i] = '/';
- }
- // now output 'quad' with appropriate whitespace and line ending
- appendsOFile(fp, (numQuads == 0 ? " " : ""));
- appendsOFile(fp, quad);
- appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : "")));
- numQuads = (numQuads + 1) % MAXQUADS;
- }
- appendcOFile(fp,'\n');
-
- return 1;
-}
-
-static void writeQPString(OFile *fp, const char *s)
-{
- const char *p = s;
- while (*p) {
- if (*p == '\n') {
- if (p[1]) appendsOFile(fp,"=0A=");
- }
- appendcOFile(fp,*p);
- p++;
- }
-}
-
-
-
-static void writeVObject_(OFile *fp, VObject *o);
-
-static void writeValue(OFile *fp, VObject *o, unsigned long size)
-{
- if (o == 0) return;
- switch (VALUE_TYPE(o)) {
- case VCVT_STRINGZ: {
- writeQPString(fp, STRINGZ_VALUE_OF(o));
- break;
- }
- case VCVT_UINT: {
- char buf[16];
- sprintf(buf,"%u", INTEGER_VALUE_OF(o));
- appendsOFile(fp,buf);
- break;
- }
- case VCVT_ULONG: {
- char buf[16];
- sprintf(buf,"%lu", LONG_VALUE_OF(o));
- appendsOFile(fp,buf);
- break;
- }
- case VCVT_RAW: {
- appendcOFile(fp,'\n');
- writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size);
- break;
- }
- case VCVT_VOBJECT:
- appendcOFile(fp,'\n');
- writeVObject_(fp,VOBJECT_VALUE_OF(o));
- break;
- }
-}
-
-static void writeAttrValue(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- pi = lookupPropInfo(NAME_OF(o));
- if (pi && ((pi->flags & PD_INTERNAL) != 0)) return;
- appendcOFile(fp,';');
- appendsOFile(fp,NAME_OF(o));
- }
- else
- appendcOFile(fp,';');
- if (VALUE_TYPE(o)) {
- appendcOFile(fp,'=');
- writeValue(fp,o,0);
- }
-}
-
-static void writeGroup(OFile *fp, VObject *o)
-{
- char buf1[256];
- char buf2[256];
- strcpy(buf1,NAME_OF(o));
- while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
- strcpy(buf2,STRINGZ_VALUE_OF(o));
- strcat(buf2,".");
- strcat(buf2,buf1);
- strcpy(buf1,buf2);
- }
- appendsOFile(fp,buf1);
-}
-
-static int inList(const char **list, const char *s)
-{
- if (list == 0) return 0;
- while (*list) {
- if (qstricmp(*list,s) == 0) return 1;
- list++;
- }
- return 0;
-}
-
-static void writeProp(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- VObjectIterator t;
- const char **fields_ = 0;
- pi = lookupPropInfo(NAME_OF(o));
- if (pi && ((pi->flags & PD_BEGIN) != 0)) {
- writeVObject_(fp,o);
- return;
- }
- if (isAPropertyOf(o,VCGroupingProp))
- writeGroup(fp,o);
- else
- appendsOFile(fp,NAME_OF(o));
- if (pi) fields_ = pi->fields;
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- const char *s;
- VObject *eachProp = nextVObject(&t);
- s = NAME_OF(eachProp);
- if (qstricmp(VCGroupingProp,s) && !inList(fields_,s))
- writeAttrValue(fp,eachProp);
- }
- if (fields_) {
- int i = 0, n = 0;
- const char** fields = fields_;
- /* output prop as fields */
- appendcOFile(fp,':');
- while (*fields) {
- VObject *t = isAPropertyOf(o,*fields);
- i++;
- if (t) n = i;
- fields++;
- }
- fields = fields_;
- for (i=0;i<n;i++) {
- writeValue(fp,isAPropertyOf(o,*fields),0);
- fields++;
- if (i<(n-1)) appendcOFile(fp,';');
- }
- }
- }
-
- if (VALUE_TYPE(o)) {
- unsigned long size = 0;
- VObject *p = isAPropertyOf(o,VCDataSizeProp);
- if (p) size = LONG_VALUE_OF(p);
- appendcOFile(fp,':');
- writeValue(fp,o,size);
- }
-
- appendcOFile(fp,'\n');
-}
-
-static void writeVObject_(OFile *fp, VObject *o)
-{
- if (NAME_OF(o)) {
- struct PreDefProp *pi;
- pi = lookupPropInfo(NAME_OF(o));
-
- if (pi && ((pi->flags & PD_BEGIN) != 0)) {
- VObjectIterator t;
- const char *begin = NAME_OF(o);
- appendsOFile(fp,"BEGIN:");
- appendsOFile(fp,begin);
- appendcOFile(fp,'\n');
- initPropIterator(&t,o);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- writeProp(fp, eachProp);
- }
- appendsOFile(fp,"END:");
- appendsOFile(fp,begin);
- appendsOFile(fp,"\n\n");
- }
- }
-}
-
-void writeVObject(FILE *fp, VObject *o)
-{
- OFile ofp;
- // #####
- //_setmode(_fileno(fp), _O_BINARY);
- initOFile(&ofp,fp);
- writeVObject_(&ofp,o);
-}
-
-DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o)
-{
- QFileDirect f( fname);
- if ( !f.open( IO_WriteOnly ) ) {
- qWarning("Unable to open vobject write %s", fname);
- return;
- }
-
- writeVObject( f.directHandle(),o );
-}
-
-DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
-{
- QFileDirect f( fname);
- if ( !f.open( IO_WriteOnly ) ) {
- qWarning("Unable to open vobject write %s", fname);
- return;
- }
-
- while (list) {
- writeVObject(f.directHandle(),list);
- list = nextVObjectInList(list);
- }
-}
-
-DLLEXPORT(const char *) vObjectTypeInfo(VObject *o)
-{
- const char *type = vObjectName( o );
- if ( strcmp( type, "TYPE" ) == 0 )
- type = vObjectStringZValue( o );
- return type;
-}
-
-
-// end of source file vobject.c
+/*************************************************************************** +(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International +Business Machines Corporation and Siemens Rolm Communications Inc. + +For purposes of this license notice, the term Licensors shall mean, +collectively, Apple Computer, Inc., AT&T Corp., International +Business Machines Corporation and Siemens Rolm Communications Inc. +The term Licensor shall mean any of the Licensors. + +Subject to acceptance of the following conditions, permission is hereby +granted by Licensors without the need for written agreement and without +license or royalty fees, to use, copy, modify and distribute this +software for any purpose. + +The above copyright notice and the following four paragraphs must be +reproduced in all copies of this software and any software including +this software. + +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE +ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR +MODIFICATIONS. + +IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, +INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT +OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + +The software is provided with RESTRICTED RIGHTS. Use, duplication, or +disclosure by the government are subject to restrictions set forth in +DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. + +***************************************************************************/ + +/* + * src: vobject.c + * doc: vobject and APIs to construct vobject, APIs pretty print + * vobject, and convert a vobject into its textual representation. + */ + +#ifndef MWERKS +#include <malloc.h> +#endif + +#include "vobject_p.h" +#include "qfiledirect_p.h" +#include <string.h> +#include <stdio.h> +#include <fcntl.h> +//#include <io.h> + + +#define NAME_OF(o) o->id +#define VALUE_TYPE(o) o->valType +#define STRINGZ_VALUE_OF(o) o->val.strs +#define INTEGER_VALUE_OF(o) o->val.i +#define LONG_VALUE_OF(o) o->val.l +#define ANY_VALUE_OF(o) o->val.any +#define VOBJECT_VALUE_OF(o) o->val.vobj + +typedef union ValueItem { + const char *strs; + unsigned int i; + unsigned long l; + void *any; + VObject *vobj; + } ValueItem; + +struct VObject { + VObject *next; + const char *id; + VObject *prop; + unsigned short valType; + ValueItem val; + }; + +typedef struct StrItem StrItem; + +struct StrItem { + StrItem *next; + const char *s; + unsigned int refCnt; + }; + +const char** fieldedProp; + + + +/*---------------------------------------------------------------------- + The following functions involve with memory allocation: + newVObject + deleteVObject + dupStr + deleteStr + newStrItem + deleteStrItem + ----------------------------------------------------------------------*/ + +DLLEXPORT(VObject*) newVObject_(const char *id) +{ + VObject *p = (VObject*)malloc(sizeof(VObject)); + p->next = 0; + p->id = id; + p->prop = 0; + VALUE_TYPE(p) = 0; + ANY_VALUE_OF(p) = 0; + return p; +} + +DLLEXPORT(VObject*) newVObject(const char *id) +{ + return newVObject_(lookupStr(id)); +} + +DLLEXPORT(void) deleteVObject(VObject *p) +{ + unUseStr(p->id); + free(p); +} + +DLLEXPORT(char*) dupStr(const char *s, unsigned int size) +{ + char *t; + if (size == 0) { + size = strlen(s); + } + t = (char*)malloc(size+1); + if (t) { + memcpy(t,s,size); + t[size] = 0; + return t; + } + else { + return (char*)0; + } +} + +DLLEXPORT(void) deleteStr(const char *p) +{ + if (p) free((void*)p); +} + + +static StrItem* newStrItem(const char *s, StrItem *next) +{ + StrItem *p = (StrItem*)malloc(sizeof(StrItem)); + p->next = next; + p->s = s; + p->refCnt = 1; + return p; +} + +static void deleteStrItem(StrItem *p) +{ + free((void*)p); +} + + +/*---------------------------------------------------------------------- + The following function provide accesses to VObject's value. + ----------------------------------------------------------------------*/ + +DLLEXPORT(const char*) vObjectName(VObject *o) +{ + return NAME_OF(o); +} + +DLLEXPORT(void) setVObjectName(VObject *o, const char* id) +{ + NAME_OF(o) = id; +} + +DLLEXPORT(const char*) vObjectStringZValue(VObject *o) +{ + return STRINGZ_VALUE_OF(o); +} + +DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s) +{ + STRINGZ_VALUE_OF(o) = dupStr(s,0); + VALUE_TYPE(o) = VCVT_STRINGZ; +} + +DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s) +{ + STRINGZ_VALUE_OF(o) = s; + VALUE_TYPE(o) = VCVT_STRINGZ; +} + +DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o) +{ + return INTEGER_VALUE_OF(o); +} + +DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i) +{ + INTEGER_VALUE_OF(o) = i; + VALUE_TYPE(o) = VCVT_UINT; +} + +DLLEXPORT(unsigned long) vObjectLongValue(VObject *o) +{ + return LONG_VALUE_OF(o); +} + +DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l) +{ + LONG_VALUE_OF(o) = l; + VALUE_TYPE(o) = VCVT_ULONG; +} + +DLLEXPORT(void*) vObjectAnyValue(VObject *o) +{ + return ANY_VALUE_OF(o); +} + +DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t) +{ + ANY_VALUE_OF(o) = t; + VALUE_TYPE(o) = VCVT_RAW; +} + +DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o) +{ + return VOBJECT_VALUE_OF(o); +} + +DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p) +{ + VOBJECT_VALUE_OF(o) = p; + VALUE_TYPE(o) = VCVT_VOBJECT; +} + +DLLEXPORT(int) vObjectValueType(VObject *o) +{ + return VALUE_TYPE(o); +} + + +/*---------------------------------------------------------------------- + The following functions can be used to build VObject. + ----------------------------------------------------------------------*/ + +DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p) +{ + /* circular link list pointed to tail */ + /* + o {next,id,prop,val} + V + pn {next,id,prop,val} + V + ... + p1 {next,id,prop,val} + V + pn + --> + o {next,id,prop,val} + V + pn {next,id,prop,val} + V + p {next,id,prop,val} + ... + p1 {next,id,prop,val} + V + pn + */ + + VObject *tail = o->prop; + if (tail) { + p->next = tail->next; + o->prop = tail->next = p; + } + else { + o->prop = p->next = p; + } + return p; +} + +DLLEXPORT(VObject*) addProp(VObject *o, const char *id) +{ + return addVObjectProp(o,newVObject(id)); +} + +DLLEXPORT(VObject*) addProp_(VObject *o, const char *id) +{ + return addVObjectProp(o,newVObject_(id)); +} + +DLLEXPORT(void) addList(VObject **o, VObject *p) +{ + p->next = 0; + if (*o == 0) { + *o = p; + } + else { + VObject *t = *o; + while (t->next) { + t = t->next; + } + t->next = p; + } +} + +DLLEXPORT(VObject*) nextVObjectInList(VObject *o) +{ + return o->next; +} + +DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size) +{ + VObject *sizeProp; + setVObjectAnyValue(prop, val); + sizeProp = addProp(prop,VCDataSizeProp); + setVObjectLongValue(sizeProp, size); + return prop; +} + +DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size) +{ + void *p = dupStr((const char *)val,size); + return setValueWithSize_(prop,p,p?size:0); +} + +DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o) +{ + i->start = o->prop; + i->next = 0; +} + +DLLEXPORT(void) initVObjectIterator(VObjectIterator *i, VObject *o) +{ + i->start = o->next; + i->next = 0; +} + +DLLEXPORT(int) moreIteration(VObjectIterator *i) +{ + return (i->start && (i->next==0 || i->next!=i->start)); +} + +DLLEXPORT(VObject*) nextVObject(VObjectIterator *i) +{ + if (i->start && i->next != i->start) { + if (i->next == 0) { + i->next = i->start->next; + return i->next; + } + else { + i->next = i->next->next; + return i->next; + } + } + else return (VObject*)0; +} + +DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id) +{ + VObjectIterator i; + initPropIterator(&i,o); + while (moreIteration(&i)) { + VObject *each = nextVObject(&i); + if (!qstricmp(id,each->id)) + return each; + } + return (VObject*)0; +} + +DLLEXPORT(VObject*) addGroup(VObject *o, const char *g) +{ + /* + a.b.c + --> + prop(c) + prop(VCGrouping=b) + prop(VCGrouping=a) + */ + char *dot = strrchr(g,'.'); + if (dot) { + VObject *p, *t; + char *gs, *n = dot+1; + gs = dupStr(g,0); /* so we can write to it. */ + /* used to be + * t = p = addProp_(o,lookupProp_(n)); + */ + t = p = addProp_(o,lookupProp(n)); + dot = strrchr(gs,'.'); + *dot = 0; + do { + dot = strrchr(gs,'.'); + if (dot) { + n = dot+1; + *dot=0; + } + else + n = gs; + /* property(VCGroupingProp=n); + * and the value may have VCGrouping property + */ + t = addProp(t,VCGroupingProp); + setVObjectStringZValue(t,lookupProp_(n)); + } while (n != gs); + deleteStr(gs); + return p; + } + else + return addProp_(o,lookupProp(g)); +} + +DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v) +{ + VObject *prop; + prop = addProp(o,p); + setVObjectStringZValue_(prop, strdup( v ) ); + return prop; +} + +DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, + unsigned int size) +{ + VObject *prop; + prop = addProp(o,p); + setValueWithSize_(prop, (void*)v, size); + return prop; +} + +DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, + unsigned int size) +{ + return addPropSizedValue_(o,p,dupStr(v,size),size); +} + + +DLLEXPORT(void) cleanVObject(VObject *o) +{ + if (o == 0) return; + if (o->prop) { + /* destroy time: cannot use the iterator here. + Have to break the cycle in the circular link + list and turns it into regular NULL-terminated + list -- since at some point of destruction, + the reference entry for the iterator to work + will not longer be valid. + */ + VObject *p; + p = o->prop->next; + o->prop->next = 0; + do { + VObject *t = p->next; + cleanVObject(p); + p = t; + } while (p); + } + switch (VALUE_TYPE(o)) { + case VCVT_STRINGZ: + case VCVT_RAW: + // assume they are all allocated by malloc. + free((char*)STRINGZ_VALUE_OF(o)); + break; + case VCVT_VOBJECT: + cleanVObject(VOBJECT_VALUE_OF(o)); + break; + } + deleteVObject(o); +} + +DLLEXPORT(void) cleanVObjects(VObject *list) +{ + while (list) { + VObject *t = list; + list = nextVObjectInList(list); + cleanVObject(t); + } +} + +/*---------------------------------------------------------------------- + The following is a String Table Facilities. + ----------------------------------------------------------------------*/ + +#define STRTBLSIZE 255 + +static StrItem *strTbl[STRTBLSIZE]; + +static unsigned int hashStr(const char *s) +{ + unsigned int h = 0; + int i; + for (i=0;s[i];i++) { + h += s[i]*i; + } + return h % STRTBLSIZE; +} + +DLLEXPORT(const char*) lookupStr(const char *s) +{ + StrItem *t; + unsigned int h = hashStr(s); + if ((t = strTbl[h]) != 0) { + do { + if (qstricmp(t->s,s) == 0) { + t->refCnt++; + return t->s; + } + t = t->next; + } while (t); + } + s = dupStr(s,0); + strTbl[h] = newStrItem(s,strTbl[h]); + return s; +} + +DLLEXPORT(void) unUseStr(const char *s) +{ + StrItem *t, *p; + unsigned int h = hashStr(s); + if ((t = strTbl[h]) != 0) { + p = t; + do { + if (qstricmp(t->s,s) == 0) { + t->refCnt--; + if (t->refCnt == 0) { + if (p == strTbl[h]) { + strTbl[h] = t->next; + } + else { + p->next = t->next; + } + deleteStr(t->s); + deleteStrItem(t); + return; + } + } + p = t; + t = t->next; + } while (t); + } +} + +DLLEXPORT(void) cleanStrTbl() +{ + int i; + for (i=0; i<STRTBLSIZE;i++) { + StrItem *t = strTbl[i]; + while (t) { + StrItem *p; + deleteStr(t->s); + p = t; + t = t->next; + deleteStrItem(p); + } while (t); + strTbl[i] = 0; + } +} + + +struct PreDefProp { + const char *name; + const char *alias; + const char** fields; + unsigned int flags; + }; + +/* flags in PreDefProp */ +#define PD_BEGIN 0x1 +#define PD_INTERNAL 0x2 + +static const char *adrFields[] = { + VCPostalBoxProp, + VCExtAddressProp, + VCStreetAddressProp, + VCCityProp, + VCRegionProp, + VCPostalCodeProp, + VCCountryNameProp, + 0 +}; + +static const char *nameFields[] = { + VCFamilyNameProp, + VCGivenNameProp, + VCAdditionalNamesProp, + VCNamePrefixesProp, + VCNameSuffixesProp, + NULL + }; + +static const char *orgFields[] = { + VCOrgNameProp, + VCOrgUnitProp, + VCOrgUnit2Prop, + VCOrgUnit3Prop, + VCOrgUnit4Prop, + NULL + }; + +static const char *AAlarmFields[] = { + VCRunTimeProp, + VCSnoozeTimeProp, + VCRepeatCountProp, + VCAudioContentProp, + 0 + }; + +/* ExDate -- has unamed fields */ +/* RDate -- has unamed fields */ + +static const char *DAlarmFields[] = { + VCRunTimeProp, + VCSnoozeTimeProp, + VCRepeatCountProp, + VCDisplayStringProp, + 0 + }; + +static const char *MAlarmFields[] = { + VCRunTimeProp, + VCSnoozeTimeProp, + VCRepeatCountProp, + VCEmailAddressProp, + VCNoteProp, + 0 + }; + +static const char *PAlarmFields[] = { + VCRunTimeProp, + VCSnoozeTimeProp, + VCRepeatCountProp, + VCProcedureNameProp, + 0 + }; + +static struct PreDefProp propNames[] = { + { VC7bitProp, 0, 0, 0 }, + { VC8bitProp, 0, 0, 0 }, + { VCAAlarmProp, 0, AAlarmFields, 0 }, + { VCAdditionalNamesProp, 0, 0, 0 }, + { VCAdrProp, 0, adrFields, 0 }, + { VCAgentProp, 0, 0, 0 }, + { VCAIFFProp, 0, 0, 0 }, + { VCAOLProp, 0, 0, 0 }, + { VCAppleLinkProp, 0, 0, 0 }, + { VCAttachProp, 0, 0, 0 }, + { VCAttendeeProp, 0, 0, 0 }, + { VCATTMailProp, 0, 0, 0 }, + { VCAudioContentProp, 0, 0, 0 }, + { VCAVIProp, 0, 0, 0 }, + { VCBase64Prop, 0, 0, 0 }, + { VCBBSProp, 0, 0, 0 }, + { VCBirthDateProp, 0, 0, 0 }, + { VCBMPProp, 0, 0, 0 }, + { VCBodyProp, 0, 0, 0 }, + { VCBusinessRoleProp, 0, 0, 0 }, + { VCCalProp, 0, 0, PD_BEGIN }, + { VCCaptionProp, 0, 0, 0 }, + { VCCardProp, 0, 0, PD_BEGIN }, + { VCCarProp, 0, 0, 0 }, + { VCCategoriesProp, 0, 0, 0 }, + { VCCellularProp, 0, 0, 0 }, + { VCCGMProp, 0, 0, 0 }, + { VCCharSetProp, 0, 0, 0 }, + { VCCIDProp, VCContentIDProp, 0, 0 }, + { VCCISProp, 0, 0, 0 }, + { VCCityProp, 0, 0, 0 }, + { VCClassProp, 0, 0, 0 }, + { VCCommentProp, 0, 0, 0 }, + { VCCompletedProp, 0, 0, 0 }, + { VCContentIDProp, 0, 0, 0 }, + { VCCountryNameProp, 0, 0, 0 }, + { VCDAlarmProp, 0, DAlarmFields, 0 }, + { VCDataSizeProp, 0, 0, PD_INTERNAL }, + { VCDayLightProp, 0, 0, 0 }, + { VCDCreatedProp, 0, 0, 0 }, + { VCDeliveryLabelProp, 0, 0, 0 }, + { VCDescriptionProp, 0, 0, 0 }, + { VCDIBProp, 0, 0, 0 }, + { VCDisplayStringProp, 0, 0, 0 }, + { VCDomesticProp, 0, 0, 0 }, + { VCDTendProp, 0, 0, 0 }, + { VCDTstartProp, 0, 0, 0 }, + { VCDueProp, 0, 0, 0 }, + { VCEmailAddressProp, 0, 0, 0 }, + { VCEncodingProp, 0, 0, 0 }, + { VCEndProp, 0, 0, 0 }, + { VCEventProp, 0, 0, PD_BEGIN }, + { VCEWorldProp, 0, 0, 0 }, + { VCExNumProp, 0, 0, 0 }, + { VCExpDateProp, 0, 0, 0 }, + { VCExpectProp, 0, 0, 0 }, + { VCExtAddressProp, 0, 0, 0 }, + { VCFamilyNameProp, 0, 0, 0 }, + { VCFaxProp, 0, 0, 0 }, + { VCFullNameProp, 0, 0, 0 }, + { VCGeoLocationProp, 0, 0, 0 }, + { VCGeoProp, 0, 0, 0 }, + { VCGIFProp, 0, 0, 0 }, + { VCGivenNameProp, 0, 0, 0 }, + { VCGroupingProp, 0, 0, 0 }, + { VCHomeProp, 0, 0, 0 }, + { VCIBMMailProp, 0, 0, 0 }, + { VCInlineProp, 0, 0, 0 }, + { VCInternationalProp, 0, 0, 0 }, + { VCInternetProp, 0, 0, 0 }, + { VCISDNProp, 0, 0, 0 }, + { VCJPEGProp, 0, 0, 0 }, + { VCLanguageProp, 0, 0, 0 }, + { VCLastModifiedProp, 0, 0, 0 }, + { VCLastRevisedProp, 0, 0, 0 }, + { VCLocationProp, 0, 0, 0 }, + { VCLogoProp, 0, 0, 0 }, + { VCMailerProp, 0, 0, 0 }, + { VCMAlarmProp, 0, MAlarmFields, 0 }, + { VCMCIMailProp, 0, 0, 0 }, + { VCMessageProp, 0, 0, 0 }, + { VCMETProp, 0, 0, 0 }, + { VCModemProp, 0, 0, 0 }, + { VCMPEG2Prop, 0, 0, 0 }, + { VCMPEGProp, 0, 0, 0 }, + { VCMSNProp, 0, 0, 0 }, + { VCNamePrefixesProp, 0, 0, 0 }, + { VCNameProp, 0, nameFields, 0 }, + { VCNameSuffixesProp, 0, 0, 0 }, + { VCNoteProp, 0, 0, 0 }, + { VCOrgNameProp, 0, 0, 0 }, + { VCOrgProp, 0, orgFields, 0 }, + { VCOrgUnit2Prop, 0, 0, 0 }, + { VCOrgUnit3Prop, 0, 0, 0 }, + { VCOrgUnit4Prop, 0, 0, 0 }, + { VCOrgUnitProp, 0, 0, 0 }, + { VCPagerProp, 0, 0, 0 }, + { VCPAlarmProp, 0, PAlarmFields, 0 }, + { VCParcelProp, 0, 0, 0 }, + { VCPartProp, 0, 0, 0 }, + { VCPCMProp, 0, 0, 0 }, + { VCPDFProp, 0, 0, 0 }, + { VCPGPProp, 0, 0, 0 }, + { VCPhotoProp, 0, 0, 0 }, + { VCPICTProp, 0, 0, 0 }, + { VCPMBProp, 0, 0, 0 }, + { VCPostalBoxProp, 0, 0, 0 }, + { VCPostalCodeProp, 0, 0, 0 }, + { VCPostalProp, 0, 0, 0 }, + { VCPowerShareProp, 0, 0, 0 }, + { VCPreferredProp, 0, 0, 0 }, + { VCPriorityProp, 0, 0, 0 }, + { VCProcedureNameProp, 0, 0, 0 }, + { VCProdIdProp, 0, 0, 0 }, + { VCProdigyProp, 0, 0, 0 }, + { VCPronunciationProp, 0, 0, 0 }, + { VCPSProp, 0, 0, 0 }, + { VCPublicKeyProp, 0, 0, 0 }, + { VCQPProp, VCQuotedPrintableProp, 0, 0 }, + { VCQuickTimeProp, 0, 0, 0 }, + { VCQuotedPrintableProp, 0, 0, 0 }, + { VCRDateProp, 0, 0, 0 }, + { VCRegionProp, 0, 0, 0 }, + { VCRelatedToProp, 0, 0, 0 }, + { VCRepeatCountProp, 0, 0, 0 }, + { VCResourcesProp, 0, 0, 0 }, + { VCRNumProp, 0, 0, 0 }, + { VCRoleProp, 0, 0, 0 }, + { VCRRuleProp, 0, 0, 0 }, + { VCRSVPProp, 0, 0, 0 }, + { VCRunTimeProp, 0, 0, 0 }, + { VCSequenceProp, 0, 0, 0 }, + { VCSnoozeTimeProp, 0, 0, 0 }, + { VCStartProp, 0, 0, 0 }, + { VCStatusProp, 0, 0, 0 }, + { VCStreetAddressProp, 0, 0, 0 }, + { VCSubTypeProp, 0, 0, 0 }, + { VCSummaryProp, 0, 0, 0 }, + { VCTelephoneProp, 0, 0, 0 }, + { VCTIFFProp, 0, 0, 0 }, + { VCTimeZoneProp, 0, 0, 0 }, + { VCTitleProp, 0, 0, 0 }, + { VCTLXProp, 0, 0, 0 }, + { VCTodoProp, 0, 0, PD_BEGIN }, + { VCTranspProp, 0, 0, 0 }, + { VCUniqueStringProp, 0, 0, 0 }, + { VCURLProp, 0, 0, 0 }, + { VCURLValueProp, 0, 0, 0 }, + { VCValueProp, 0, 0, 0 }, + { VCVersionProp, 0, 0, 0 }, + { VCVideoProp, 0, 0, 0 }, + { VCVoiceProp, 0, 0, 0 }, + { VCWAVEProp, 0, 0, 0 }, + { VCWMFProp, 0, 0, 0 }, + { VCWorkProp, 0, 0, 0 }, + { VCX400Prop, 0, 0, 0 }, + { VCX509Prop, 0, 0, 0 }, + { VCXRuleProp, 0, 0, 0 }, + { 0,0,0,0 } + }; + + +static struct PreDefProp* lookupPropInfo(const char* str) +{ + /* brute force for now, could use a hash table here. */ + int i; + + for (i = 0; propNames[i].name; i++) + if (qstricmp(str, propNames[i].name) == 0) { + return &propNames[i]; + } + + return 0; +} + + +DLLEXPORT(const char*) lookupProp_(const char* str) +{ + int i; + + for (i = 0; propNames[i].name; i++) + if (qstricmp(str, propNames[i].name) == 0) { + const char* s; + s = propNames[i].alias?propNames[i].alias:propNames[i].name; + return lookupStr(s); + } + return lookupStr(str); +} + + +DLLEXPORT(const char*) lookupProp(const char* str) +{ + int i; + + for (i = 0; propNames[i].name; i++) + if (qstricmp(str, propNames[i].name) == 0) { + const char *s; + fieldedProp = propNames[i].fields; + s = propNames[i].alias?propNames[i].alias:propNames[i].name; + return lookupStr(s); + } + fieldedProp = 0; + return lookupStr(str); +} + + +/*---------------------------------------------------------------------- + APIs to Output text form. + ----------------------------------------------------------------------*/ +#define OFILE_REALLOC_SIZE 256 +typedef struct OFile { + FILE *fp; + char *s; + int len; + int limit; + int alloc:1; + int fail:1; + } OFile; + +#if 0 +static void appendsOFile(OFile *fp, const char *s) +{ + int slen; + if (fp->fail) return; + slen = strlen(s); + if (fp->fp) { + fwrite(s,1,slen,fp->fp); + } + else { +stuff: + if (fp->len + slen < fp->limit) { + memcpy(fp->s+fp->len,s,slen); + fp->len += slen; + return; + } + else if (fp->alloc) { + fp->limit = fp->limit + OFILE_REALLOC_SIZE; + if (OFILE_REALLOC_SIZE <= slen) fp->limit += slen; + fp->s = (char *) realloc(fp->s,fp->limit); + if (fp->s) goto stuff; + } + if (fp->alloc) + free(fp->s); + fp->s = 0; + fp->fail = 1; + } +} + +static void appendcOFile(OFile *fp, char c) +{ + if (fp->fail) return; + if (fp->fp) { + fputc(c,fp->fp); + } + else { +stuff: + if (fp->len+1 < fp->limit) { + fp->s[fp->len] = c; + fp->len++; + return; + } + else if (fp->alloc) { + fp->limit = fp->limit + OFILE_REALLOC_SIZE; + fp->s = (char *) realloc(fp->s,fp->limit); + if (fp->s) goto stuff; + } + if (fp->alloc) + free(fp->s); + fp->s = 0; + fp->fail = 1; + } +} +#else +static void appendcOFile_(OFile *fp, char c) +{ + if (fp->fail) return; + if (fp->fp) { + fputc(c,fp->fp); + } + else { +stuff: + if (fp->len+1 < fp->limit) { + fp->s[fp->len] = c; + fp->len++; + return; + } + else if (fp->alloc) { + fp->limit = fp->limit + OFILE_REALLOC_SIZE; + fp->s = (char *)realloc(fp->s,fp->limit); + if (fp->s) goto stuff; + } + if (fp->alloc) + free(fp->s); + fp->s = 0; + fp->fail = 1; + } +} + +static void appendcOFile(OFile *fp, char c) +{ + if (c == '\n') { + /* write out as <CR><LF> */ + appendcOFile_(fp,0xd); + appendcOFile_(fp,0xa); + } + else + appendcOFile_(fp,c); +} + +static void appendsOFile(OFile *fp, const char *s) +{ + int i, slen; + slen = strlen(s); + for (i=0; i<slen; i++) { + appendcOFile(fp,s[i]); + } +} + +#endif + +static void initOFile(OFile *fp, FILE *ofp) +{ + fp->fp = ofp; + fp->s = 0; + fp->len = 0; + fp->limit = 0; + fp->alloc = 0; + fp->fail = 0; +} + +static int writeBase64(OFile *fp, unsigned char *s, long len) +{ + long cur = 0; + int i, numQuads = 0; + unsigned long trip; + unsigned char b; + char quad[5]; +#define MAXQUADS 16 + + quad[4] = 0; + + while (cur < len) { + // collect the triplet of bytes into 'trip' + trip = 0; + for (i = 0; i < 3; i++) { + b = (cur < len) ? *(s + cur) : 0; + cur++; + trip = trip << 8 | b; + } + // fill in 'quad' with the appropriate four characters + for (i = 3; i >= 0; i--) { + b = (unsigned char)(trip & 0x3F); + trip = trip >> 6; + if ((3 - i) < (cur - len)) + quad[i] = '='; // pad char + else if (b < 26) quad[i] = (char)b + 'A'; + else if (b < 52) quad[i] = (char)(b - 26) + 'a'; + else if (b < 62) quad[i] = (char)(b - 52) + '0'; + else if (b == 62) quad[i] = '+'; + else quad[i] = '/'; + } + // now output 'quad' with appropriate whitespace and line ending + appendsOFile(fp, (numQuads == 0 ? " " : "")); + appendsOFile(fp, quad); + appendsOFile(fp, ((cur >= len)?"\n" :(numQuads==MAXQUADS-1?"\n" : ""))); + numQuads = (numQuads + 1) % MAXQUADS; + } + appendcOFile(fp,'\n'); + + return 1; +} + +static const char *replaceChar(unsigned char c) +{ + if (c == '\n') { + return "=0A=\n"; + } else if ( + (c >= 'A' && c <= 'Z') + || + (c >= 'a' && c <= 'z') + || + (c >= '0' && c <= '9') + || + (c >= '\'' && c <= ')') + || + (c >= '+' && c <= '-') + || + (c == '/') + || + (c == '?') + || + (c == ' ')) + { + return 0; + } + + static char trans[4]; + trans[0] = '='; + trans[3] = '\0'; + int rem = c % 16; + int div = c / 16; + + if (div < 10) + trans[1] = '0' + div; + else + trans[1] = 'A' + (div - 10); + + if (rem < 10) + trans[2] = '0' + rem; + else + trans[2] = 'A' + (rem - 10); + + return trans; +} + +static void writeQPString(OFile *fp, const char *s) +{ + /* + only A-Z, 0-9 and + "'" (ASCII code 39) + "(" (ASCII code 40) + ")" (ASCII code 41) + "+" (ASCII code 43) + "," (ASCII code 44) + "-" (ASCII code 45) + "/" (ASCII code 47) + "?" (ASCII code 63) + + should remain un-encoded. + '=' needs to be encoded as it is the escape character. + ';' needs to be as it is a field separator. + + */ + const char *p = s; + while (*p) { + const char *rep = replaceChar(*p); + if (rep) + appendsOFile(fp, rep); + else + appendcOFile(fp, *p); + p++; + } +} + +static bool includesUnprintable(VObject *o) +{ + if (o) { + if (VALUE_TYPE(o) == VCVT_STRINGZ) { + const char *p = STRINGZ_VALUE_OF(o); + if (p) { + while (*p) { + if (replaceChar(*p)) + return TRUE; + p++; + } + } + } + } + return FALSE; +} + +static void writeVObject_(OFile *fp, VObject *o); + +static void writeValue(OFile *fp, VObject *o, unsigned long size) +{ + if (o == 0) return; + switch (VALUE_TYPE(o)) { + case VCVT_STRINGZ: { + writeQPString(fp, STRINGZ_VALUE_OF(o)); + break; + } + case VCVT_UINT: { + char buf[16]; + sprintf(buf,"%u", INTEGER_VALUE_OF(o)); + appendsOFile(fp,buf); + break; + } + case VCVT_ULONG: { + char buf[16]; + sprintf(buf,"%lu", LONG_VALUE_OF(o)); + appendsOFile(fp,buf); + break; + } + case VCVT_RAW: { + appendcOFile(fp,'\n'); + writeBase64(fp,(unsigned char*)(ANY_VALUE_OF(o)),size); + break; + } + case VCVT_VOBJECT: + appendcOFile(fp,'\n'); + writeVObject_(fp,VOBJECT_VALUE_OF(o)); + break; + } +} + +static void writeAttrValue(OFile *fp, VObject *o) +{ + if (NAME_OF(o)) { + struct PreDefProp *pi; + pi = lookupPropInfo(NAME_OF(o)); + if (pi && ((pi->flags & PD_INTERNAL) != 0)) return; + if ( includesUnprintable(o) ) { + appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp); + appendsOFile(fp, ";" VCCharSetProp "=" "UTF-8"); + } + appendcOFile(fp,';'); + appendsOFile(fp,NAME_OF(o)); + } + else + appendcOFile(fp,';'); + if (VALUE_TYPE(o)) { + appendcOFile(fp,'='); + writeValue(fp,o,0); + } +} + +static void writeGroup(OFile *fp, VObject *o) +{ + char buf1[256]; + char buf2[256]; + strcpy(buf1,NAME_OF(o)); + while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) { + strcpy(buf2,STRINGZ_VALUE_OF(o)); + strcat(buf2,"."); + strcat(buf2,buf1); + strcpy(buf1,buf2); + } + appendsOFile(fp,buf1); +} + +static int inList(const char **list, const char *s) +{ + if (list == 0) return 0; + while (*list) { + if (qstricmp(*list,s) == 0) return 1; + list++; + } + return 0; +} + +static void writeProp(OFile *fp, VObject *o) +{ + if (NAME_OF(o)) { + struct PreDefProp *pi; + VObjectIterator t; + const char **fields_ = 0; + pi = lookupPropInfo(NAME_OF(o)); + if (pi && ((pi->flags & PD_BEGIN) != 0)) { + writeVObject_(fp,o); + return; + } + if (isAPropertyOf(o,VCGroupingProp)) + writeGroup(fp,o); + else + appendsOFile(fp,NAME_OF(o)); + if (pi) fields_ = pi->fields; + initPropIterator(&t,o); + while (moreIteration(&t)) { + const char *s; + VObject *eachProp = nextVObject(&t); + s = NAME_OF(eachProp); + if (qstricmp(VCGroupingProp,s) && !inList(fields_,s)) + writeAttrValue(fp,eachProp); + } + if (fields_) { + int i = 0, n = 0; + const char** fields = fields_; + /* output prop as fields */ + bool printable = TRUE; + while (*fields && printable) { + VObject *t = isAPropertyOf(o,*fields); + if (includesUnprintable(t)) + printable = FALSE; + fields++; + } + fields = fields_; + if (!printable) { + appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp); + appendsOFile(fp, ";" VCCharSetProp "=" "UTF-8"); + } + appendcOFile(fp,':'); + while (*fields) { + VObject *t = isAPropertyOf(o,*fields); + i++; + if (t) n = i; + fields++; + } + fields = fields_; + for (i=0;i<n;i++) { + writeValue(fp,isAPropertyOf(o,*fields),0); + fields++; + if (i<(n-1)) appendcOFile(fp,';'); + } + } + } + + + if (VALUE_TYPE(o)) { + if ( includesUnprintable(o) ) { + appendsOFile(fp, ";" VCEncodingProp "=" VCQuotedPrintableProp); + appendsOFile(fp, ";" VCCharSetProp "=" "UTF-8"); + } + unsigned long size = 0; + VObject *p = isAPropertyOf(o,VCDataSizeProp); + if (p) size = LONG_VALUE_OF(p); + appendcOFile(fp,':'); + writeValue(fp,o,size); + } + + appendcOFile(fp,'\n'); +} + +static void writeVObject_(OFile *fp, VObject *o) +{ + if (NAME_OF(o)) { + struct PreDefProp *pi; + pi = lookupPropInfo(NAME_OF(o)); + + if (pi && ((pi->flags & PD_BEGIN) != 0)) { + VObjectIterator t; + const char *begin = NAME_OF(o); + appendsOFile(fp,"BEGIN:"); + appendsOFile(fp,begin); + appendcOFile(fp,'\n'); + initPropIterator(&t,o); + while (moreIteration(&t)) { + VObject *eachProp = nextVObject(&t); + writeProp(fp, eachProp); + } + appendsOFile(fp,"END:"); + appendsOFile(fp,begin); + appendsOFile(fp,"\n\n"); + } + } +} + +void writeVObject(FILE *fp, VObject *o) +{ + OFile ofp; + // ##### + //_setmode(_fileno(fp), _O_BINARY); + initOFile(&ofp,fp); + writeVObject_(&ofp,o); +} + +DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o) +{ + QFileDirect f( fname); + if ( !f.open( IO_WriteOnly ) ) { + qWarning("Unable to open vobject write %s", fname); + return; + } + + writeVObject( f.directHandle(),o ); +} + +DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list) +{ + QFileDirect f( fname); + if ( !f.open( IO_WriteOnly ) ) { + qWarning("Unable to open vobject write %s", fname); + return; + } + + while (list) { + writeVObject(f.directHandle(),list); + list = nextVObjectInList(list); + } +} + +DLLEXPORT(const char *) vObjectTypeInfo(VObject *o) +{ + const char *type = vObjectName( o ); + if ( strcmp( type, "TYPE" ) == 0 ) + type = vObjectStringZValue( o ); + return type; +} + + +// end of source file vobject.c diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h index a0d921e..0d0a2a8 100644 --- a/library/backend/vobject_p.h +++ b/library/backend/vobject_p.h @@ -1,404 +1,406 @@ -/***************************************************************************
-(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-
-For purposes of this license notice, the term Licensors shall mean,
-collectively, Apple Computer, Inc., AT&T Corp., International
-Business Machines Corporation and Siemens Rolm Communications Inc.
-The term Licensor shall mean any of the Licensors.
-
-Subject to acceptance of the following conditions, permission is hereby
-granted by Licensors without the need for written agreement and without
-license or royalty fees, to use, copy, modify and distribute this
-software for any purpose.
-
-The above copyright notice and the following four paragraphs must be
-reproduced in all copies of this software and any software including
-this software.
-
-THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
-ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
-MODIFICATIONS.
-
-IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
-INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
-OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.
-
-The software is provided with RESTRICTED RIGHTS. Use, duplication, or
-disclosure by the government are subject to restrictions set forth in
-DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-
-***************************************************************************/
-
-/*
-
-The vCard/vCalendar C interface is implemented in the set
-of files as follows:
-
-vcc.y, yacc source, and vcc.c, the yacc output you will use
-implements the core parser
-
-vobject.c implements an API that insulates the caller from
-the parser and changes in the vCard/vCalendar BNF
-
-port.h defines compilation environment dependent stuff
-
-vcc.h and vobject.h are header files for their .c counterparts
-
-vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
-which you may find useful.
-
-test.c is a standalone test driver that exercises some of
-the features of the APIs provided. Invoke test.exe on a
-VCARD/VCALENDAR input text file and you will see the pretty
-print output of the internal representation (this pretty print
-output should give you a good idea of how the internal
-representation looks like -- there is one such output in the
-following too). Also, a file with the .out suffix is generated
-to show that the internal representation can be written back
-in the original text format.
-
-For more information on this API see the readme.txt file
-which accompanied this distribution.
-
- Also visit:
-
- http://www.versit.com
- http://www.ralden.com
-
-*/
-
-
-#ifndef __VOBJECT_H__
-#define __VOBJECT_H__ 1
-
-#include <qstring.h>
-
-#define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
-#define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
-
-/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
-are globally unique IDs which can be used to generate clipboard format
-ID's as per the requirements of a specific platform. For example, in
-Windows they are used as the parameter in a call to RegisterClipboardFormat.
-For example:
-
- CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
-
-*/
-
-#define vCardMimeType "text/x-vCard"
-#define vCalendarMimeType "text/x-vCalendar"
-
-#undef DLLEXPORT
-#include <qglobal.h>
-#if defined(Q_WS_WIN)
-#define DLLEXPORT(t) __declspec(dllexport) t
-#else
-#define DLLEXPORT(t) t
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-
-
-#define VC7bitProp "7BIT"
-#define VC8bitProp "8BIT"
-#define VCAAlarmProp "AALARM"
-#define VCAdditionalNamesProp "ADDN"
-#define VCAdrProp "ADR"
-#define VCAgentProp "AGENT"
-#define VCAIFFProp "AIFF"
-#define VCAOLProp "AOL"
-#define VCAppleLinkProp "APPLELINK"
-#define VCAttachProp "ATTACH"
-#define VCAttendeeProp "ATTENDEE"
-#define VCATTMailProp "ATTMAIL"
-#define VCAudioContentProp "AUDIOCONTENT"
-#define VCAVIProp "AVI"
-#define VCBase64Prop "BASE64"
-#define VCBBSProp "BBS"
-#define VCBirthDateProp "BDAY"
-#define VCBMPProp "BMP"
-#define VCBodyProp "BODY"
-#define VCBusinessRoleProp "ROLE"
-#define VCCalProp "VCALENDAR"
-#define VCCaptionProp "CAP"
-#define VCCardProp "VCARD"
-#define VCCarProp "CAR"
-#define VCCategoriesProp "CATEGORIES"
-#define VCCellularProp "CELL"
-#define VCCGMProp "CGM"
-#define VCCharSetProp "CS"
-#define VCCIDProp "CID"
-#define VCCISProp "CIS"
-#define VCCityProp "L"
-#define VCClassProp "CLASS"
-#define VCCommentProp "NOTE"
-#define VCCompletedProp "COMPLETED"
-#define VCContentIDProp "CONTENT-ID"
-#define VCCountryNameProp "C"
-#define VCDAlarmProp "DALARM"
-#define VCDataSizeProp "DATASIZE"
-#define VCDayLightProp "DAYLIGHT"
-#define VCDCreatedProp "DCREATED"
-#define VCDeliveryLabelProp "LABEL"
-#define VCDescriptionProp "DESCRIPTION"
-#define VCDIBProp "DIB"
-#define VCDisplayStringProp "DISPLAYSTRING"
-#define VCDomesticProp "DOM"
-#define VCDTendProp "DTEND"
-#define VCDTstartProp "DTSTART"
-#define VCDueProp "DUE"
-#define VCEmailAddressProp "EMAIL"
-#define VCEncodingProp "ENCODING"
-#define VCEndProp "END"
-#define VCEventProp "VEVENT"
-#define VCEWorldProp "EWORLD"
-#define VCExNumProp "EXNUM"
-#define VCExpDateProp "EXDATE"
-#define VCExpectProp "EXPECT"
-#define VCExtAddressProp "EXT ADD"
-#define VCFamilyNameProp "F"
-#define VCFaxProp "FAX"
-#define VCFullNameProp "FN"
-#define VCGeoProp "GEO"
-#define VCGeoLocationProp "GEO"
-#define VCGIFProp "GIF"
-#define VCGivenNameProp "G"
-#define VCGroupingProp "Grouping"
-#define VCHomeProp "HOME"
-#define VCIBMMailProp "IBMMail"
-#define VCInlineProp "INLINE"
-#define VCInternationalProp "INTL"
-#define VCInternetProp "INTERNET"
-#define VCISDNProp "ISDN"
-#define VCJPEGProp "JPEG"
-#define VCLanguageProp "LANG"
-#define VCLastModifiedProp "LAST-MODIFIED"
-#define VCLastRevisedProp "REV"
-#define VCLocationProp "LOCATION"
-#define VCLogoProp "LOGO"
-#define VCMailerProp "MAILER"
-#define VCMAlarmProp "MALARM"
-#define VCMCIMailProp "MCIMAIL"
-#define VCMessageProp "MSG"
-#define VCMETProp "MET"
-#define VCModemProp "MODEM"
-#define VCMPEG2Prop "MPEG2"
-#define VCMPEGProp "MPEG"
-#define VCMSNProp "MSN"
-#define VCNamePrefixesProp "NPRE"
-#define VCNameProp "N"
-#define VCNameSuffixesProp "NSUF"
-#define VCNoteProp "NOTE"
-#define VCOrgNameProp "ORGNAME"
-#define VCOrgProp "ORG"
-#define VCOrgUnit2Prop "OUN2"
-#define VCOrgUnit3Prop "OUN3"
-#define VCOrgUnit4Prop "OUN4"
-#define VCOrgUnitProp "OUN"
-#define VCPagerProp "PAGER"
-#define VCPAlarmProp "PALARM"
-#define VCParcelProp "PARCEL"
-#define VCPartProp "PART"
-#define VCPCMProp "PCM"
-#define VCPDFProp "PDF"
-#define VCPGPProp "PGP"
-#define VCPhotoProp "PHOTO"
-#define VCPICTProp "PICT"
-#define VCPMBProp "PMB"
-#define VCPostalBoxProp "BOX"
-#define VCPostalCodeProp "PC"
-#define VCPostalProp "POSTAL"
-#define VCPowerShareProp "POWERSHARE"
-#define VCPreferredProp "PREF"
-#define VCPriorityProp "PRIORITY"
-#define VCProcedureNameProp "PROCEDURENAME"
-#define VCProdIdProp "PRODID"
-#define VCProdigyProp "PRODIGY"
-#define VCPronunciationProp "SOUND"
-#define VCPSProp "PS"
-#define VCPublicKeyProp "KEY"
-#define VCQPProp "QP"
-#define VCQuickTimeProp "QTIME"
-#define VCQuotedPrintableProp "QUOTED-PRINTABLE"
-#define VCRDateProp "RDATE"
-#define VCRegionProp "R"
-#define VCRelatedToProp "RELATED-TO"
-#define VCRepeatCountProp "REPEATCOUNT"
-#define VCResourcesProp "RESOURCES"
-#define VCRNumProp "RNUM"
-#define VCRoleProp "ROLE"
-#define VCRRuleProp "RRULE"
-#define VCRSVPProp "RSVP"
-#define VCRunTimeProp "RUNTIME"
-#define VCSequenceProp "SEQUENCE"
-#define VCSnoozeTimeProp "SNOOZETIME"
-#define VCStartProp "START"
-#define VCStatusProp "STATUS"
-#define VCStreetAddressProp "STREET"
-#define VCSubTypeProp "SUBTYPE"
-#define VCSummaryProp "SUMMARY"
-#define VCTelephoneProp "TEL"
-#define VCTIFFProp "TIFF"
-#define VCTimeZoneProp "TZ"
-#define VCTitleProp "TITLE"
-#define VCTLXProp "TLX"
-#define VCTodoProp "VTODO"
-#define VCTranspProp "TRANSP"
-#define VCUniqueStringProp "UID"
-#define VCURLProp "URL"
-#define VCURLValueProp "URLVAL"
-#define VCValueProp "VALUE"
-#define VCVersionProp "VERSION"
-#define VCVideoProp "VIDEO"
-#define VCVoiceProp "VOICE"
-#define VCWAVEProp "WAVE"
-#define VCWMFProp "WMF"
-#define VCWorkProp "WORK"
-#define VCX400Prop "X400"
-#define VCX509Prop "X509"
-#define VCXRuleProp "XRULE"
-
-
-typedef struct VObject VObject;
-
-typedef struct VObjectIterator {
- VObject* start;
- VObject* next;
- } VObjectIterator;
-
-extern DLLEXPORT(VObject*) newVObject(const char *id);
-extern DLLEXPORT(void) deleteVObject(VObject *p);
-extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
-extern DLLEXPORT(void) deleteStr(const char *p);
-extern DLLEXPORT(void) unUseStr(const char *s);
-
-extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
-extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
-extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
-extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
-extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
-extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
-extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
-extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
-
-extern DLLEXPORT(const char*) vObjectName(VObject *o);
-extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
-extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
-extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
-extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
-extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
-extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
-
-extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
-extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
-extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
-extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
-extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
-extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
-extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
-extern DLLEXPORT(void) addList(VObject **o, VObject *p);
-
-extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
-
-extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
-extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
-extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
-extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
-
-extern DLLEXPORT(const char*) lookupStr(const char *s);
-extern DLLEXPORT(void) cleanStrTbl();
-
-extern DLLEXPORT(void) cleanVObject(VObject *o);
-extern DLLEXPORT(void) cleanVObjects(VObject *list);
-
-extern DLLEXPORT(const char*) lookupProp(const char* str);
-extern DLLEXPORT(const char*) lookupProp_(const char* str);
-
-extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
-extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
-
-extern DLLEXPORT(int) vObjectValueType(VObject *o);
-
-/* return type of vObjectValueType: */
-#define VCVT_NOVALUE 0
- /* if the VObject has no value associated with it. */
-#define VCVT_STRINGZ 1
- /* if the VObject has value set by setVObjectStringZValue. */
-#define VCVT_UINT 2
- /* if the VObject has value set by setVObjectIntegerValue. */
-#define VCVT_ULONG 3
- /* if the VObject has value set by setVObjectLongValue. */
-#define VCVT_RAW 4
- /* if the VObject has value set by setVObjectAnyValue. */
-#define VCVT_VOBJECT 5
- /* if the VObject has value set by setVObjectVObjectValue. */
-
-extern const char** fieldedProp;
-
-/***************************************************
- * The methods below are implemented in vcc.c (generated from vcc.y )
- ***************************************************/
-
-/* NOTE regarding printVObject and writeVObject
-
-The functions below are not exported from the DLL because they
-take a FILE* as a parameter, which cannot be passed across a DLL
-interface (at least that is my experience). Instead you can use
-their companion functions which take file names or pointers
-to memory. However, if you are linking this code into
-your build directly then you may find them a more convenient API
-and you can go ahead and use them. If you try to use them with
-the DLL LIB you will get a link error.
-*/
-extern void writeVObject(FILE *fp, VObject *o);
-
-
-
-typedef void (*MimeErrorHandler)(char *);
-
-extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
-
-extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
-extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
-
-
-/* NOTE regarding Parse_MIME_FromFile
-The function above, Parse_MIME_FromFile, comes in two flavors,
-neither of which is exported from the DLL. Each version takes
-a CFile or FILE* as a parameter, neither of which can be
-passed across a DLL interface (at least that is my experience).
-If you are linking this code into your build directly then
-you may find them a more convenient API that the other flavors
-that take a file name. If you use them with the DLL LIB you
-will get a link error.
-*/
-
-
-#if INCLUDEMFC
-extern VObject* Parse_MIME_FromFile(CFile *file);
-#else
-extern VObject* Parse_MIME_FromFile(FILE *file);
-#endif
-
-extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o);
-
-
-#endif /* __VOBJECT_H__ */
-
-
+/*************************************************************************** +(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International +Business Machines Corporation and Siemens Rolm Communications Inc. + +For purposes of this license notice, the term Licensors shall mean, +collectively, Apple Computer, Inc., AT&T Corp., International +Business Machines Corporation and Siemens Rolm Communications Inc. +The term Licensor shall mean any of the Licensors. + +Subject to acceptance of the following conditions, permission is hereby +granted by Licensors without the need for written agreement and without +license or royalty fees, to use, copy, modify and distribute this +software for any purpose. + +The above copyright notice and the following four paragraphs must be +reproduced in all copies of this software and any software including +this software. + +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE +ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR +MODIFICATIONS. + +IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, +INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT +OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + +The software is provided with RESTRICTED RIGHTS. Use, duplication, or +disclosure by the government are subject to restrictions set forth in +DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. + +***************************************************************************/ + +/* + +The vCard/vCalendar C interface is implemented in the set +of files as follows: + +vcc.y, yacc source, and vcc.c, the yacc output you will use +implements the core parser + +vobject.c implements an API that insulates the caller from +the parser and changes in the vCard/vCalendar BNF + +port.h defines compilation environment dependent stuff + +vcc.h and vobject.h are header files for their .c counterparts + +vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions +which you may find useful. + +test.c is a standalone test driver that exercises some of +the features of the APIs provided. Invoke test.exe on a +VCARD/VCALENDAR input text file and you will see the pretty +print output of the internal representation (this pretty print +output should give you a good idea of how the internal +representation looks like -- there is one such output in the +following too). Also, a file with the .out suffix is generated +to show that the internal representation can be written back +in the original text format. + +For more information on this API see the readme.txt file +which accompanied this distribution. + + Also visit: + + http://www.versit.com + http://www.ralden.com + +*/ + +// No tr() anywhere in this file + + +#ifndef __VOBJECT_H__ +#define __VOBJECT_H__ 1 + +#include <qstring.h> + +#define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard" +#define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar" + +/* The above strings vCardClipboardFormat and vCalendarClipboardFormat +are globally unique IDs which can be used to generate clipboard format +ID's as per the requirements of a specific platform. For example, in +Windows they are used as the parameter in a call to RegisterClipboardFormat. +For example: + + CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); + +*/ + +#define vCardMimeType "text/x-vCard" +#define vCalendarMimeType "text/x-vCalendar" + +#undef DLLEXPORT +#include <qglobal.h> +#if defined(Q_WS_WIN) +#define DLLEXPORT(t) __declspec(dllexport) t +#else +#define DLLEXPORT(t) t +#endif + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + +#include <stdlib.h> +#include <stdio.h> + + +#define VC7bitProp "7BIT" +#define VC8bitProp "8BIT" +#define VCAAlarmProp "AALARM" +#define VCAdditionalNamesProp "ADDN" +#define VCAdrProp "ADR" +#define VCAgentProp "AGENT" +#define VCAIFFProp "AIFF" +#define VCAOLProp "AOL" +#define VCAppleLinkProp "APPLELINK" +#define VCAttachProp "ATTACH" +#define VCAttendeeProp "ATTENDEE" +#define VCATTMailProp "ATTMAIL" +#define VCAudioContentProp "AUDIOCONTENT" +#define VCAVIProp "AVI" +#define VCBase64Prop "BASE64" +#define VCBBSProp "BBS" +#define VCBirthDateProp "BDAY" +#define VCBMPProp "BMP" +#define VCBodyProp "BODY" +#define VCBusinessRoleProp "ROLE" +#define VCCalProp "VCALENDAR" +#define VCCaptionProp "CAP" +#define VCCardProp "VCARD" +#define VCCarProp "CAR" +#define VCCategoriesProp "CATEGORIES" +#define VCCellularProp "CELL" +#define VCCGMProp "CGM" +#define VCCharSetProp "CHARSET" +#define VCCIDProp "CID" +#define VCCISProp "CIS" +#define VCCityProp "L" +#define VCClassProp "CLASS" +#define VCCommentProp "NOTE" +#define VCCompletedProp "COMPLETED" +#define VCContentIDProp "CONTENT-ID" +#define VCCountryNameProp "C" +#define VCDAlarmProp "DALARM" +#define VCDataSizeProp "DATASIZE" +#define VCDayLightProp "DAYLIGHT" +#define VCDCreatedProp "DCREATED" +#define VCDeliveryLabelProp "LABEL" +#define VCDescriptionProp "DESCRIPTION" +#define VCDIBProp "DIB" +#define VCDisplayStringProp "DISPLAYSTRING" +#define VCDomesticProp "DOM" +#define VCDTendProp "DTEND" +#define VCDTstartProp "DTSTART" +#define VCDueProp "DUE" +#define VCEmailAddressProp "EMAIL" +#define VCEncodingProp "ENCODING" +#define VCEndProp "END" +#define VCEventProp "VEVENT" +#define VCEWorldProp "EWORLD" +#define VCExNumProp "EXNUM" +#define VCExpDateProp "EXDATE" +#define VCExpectProp "EXPECT" +#define VCExtAddressProp "EXT ADD" +#define VCFamilyNameProp "F" +#define VCFaxProp "FAX" +#define VCFullNameProp "FN" +#define VCGeoProp "GEO" +#define VCGeoLocationProp "GEO" +#define VCGIFProp "GIF" +#define VCGivenNameProp "G" +#define VCGroupingProp "Grouping" +#define VCHomeProp "HOME" +#define VCIBMMailProp "IBMMail" +#define VCInlineProp "INLINE" +#define VCInternationalProp "INTL" +#define VCInternetProp "INTERNET" +#define VCISDNProp "ISDN" +#define VCJPEGProp "JPEG" +#define VCLanguageProp "LANG" +#define VCLastModifiedProp "LAST-MODIFIED" +#define VCLastRevisedProp "REV" +#define VCLocationProp "LOCATION" +#define VCLogoProp "LOGO" +#define VCMailerProp "MAILER" +#define VCMAlarmProp "MALARM" +#define VCMCIMailProp "MCIMAIL" +#define VCMessageProp "MSG" +#define VCMETProp "MET" +#define VCModemProp "MODEM" +#define VCMPEG2Prop "MPEG2" +#define VCMPEGProp "MPEG" +#define VCMSNProp "MSN" +#define VCNamePrefixesProp "NPRE" +#define VCNameProp "N" +#define VCNameSuffixesProp "NSUF" +#define VCNoteProp "NOTE" +#define VCOrgNameProp "ORGNAME" +#define VCOrgProp "ORG" +#define VCOrgUnit2Prop "OUN2" +#define VCOrgUnit3Prop "OUN3" +#define VCOrgUnit4Prop "OUN4" +#define VCOrgUnitProp "OUN" +#define VCPagerProp "PAGER" +#define VCPAlarmProp "PALARM" +#define VCParcelProp "PARCEL" +#define VCPartProp "PART" +#define VCPCMProp "PCM" +#define VCPDFProp "PDF" +#define VCPGPProp "PGP" +#define VCPhotoProp "PHOTO" +#define VCPICTProp "PICT" +#define VCPMBProp "PMB" +#define VCPostalBoxProp "BOX" +#define VCPostalCodeProp "PC" +#define VCPostalProp "POSTAL" +#define VCPowerShareProp "POWERSHARE" +#define VCPreferredProp "PREF" +#define VCPriorityProp "PRIORITY" +#define VCProcedureNameProp "PROCEDURENAME" +#define VCProdIdProp "PRODID" +#define VCProdigyProp "PRODIGY" +#define VCPronunciationProp "SOUND" +#define VCPSProp "PS" +#define VCPublicKeyProp "KEY" +#define VCQPProp "QP" +#define VCQuickTimeProp "QTIME" +#define VCQuotedPrintableProp "QUOTED-PRINTABLE" +#define VCRDateProp "RDATE" +#define VCRegionProp "R" +#define VCRelatedToProp "RELATED-TO" +#define VCRepeatCountProp "REPEATCOUNT" +#define VCResourcesProp "RESOURCES" +#define VCRNumProp "RNUM" +#define VCRoleProp "ROLE" +#define VCRRuleProp "RRULE" +#define VCRSVPProp "RSVP" +#define VCRunTimeProp "RUNTIME" +#define VCSequenceProp "SEQUENCE" +#define VCSnoozeTimeProp "SNOOZETIME" +#define VCStartProp "START" +#define VCStatusProp "STATUS" +#define VCStreetAddressProp "STREET" +#define VCSubTypeProp "SUBTYPE" +#define VCSummaryProp "SUMMARY" +#define VCTelephoneProp "TEL" +#define VCTIFFProp "TIFF" +#define VCTimeZoneProp "TZ" +#define VCTitleProp "TITLE" +#define VCTLXProp "TLX" +#define VCTodoProp "VTODO" +#define VCTranspProp "TRANSP" +#define VCUniqueStringProp "UID" +#define VCURLProp "URL" +#define VCURLValueProp "URLVAL" +#define VCValueProp "VALUE" +#define VCVersionProp "VERSION" +#define VCVideoProp "VIDEO" +#define VCVoiceProp "VOICE" +#define VCWAVEProp "WAVE" +#define VCWMFProp "WMF" +#define VCWorkProp "WORK" +#define VCX400Prop "X400" +#define VCX509Prop "X509" +#define VCXRuleProp "XRULE" + + +typedef struct VObject VObject; + +typedef struct VObjectIterator { + VObject* start; + VObject* next; + } VObjectIterator; + +extern DLLEXPORT(VObject*) newVObject(const char *id); +extern DLLEXPORT(void) deleteVObject(VObject *p); +extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); +extern DLLEXPORT(void) deleteStr(const char *p); +extern DLLEXPORT(void) unUseStr(const char *s); + +extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); +extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); +extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); +extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); +extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); +extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); +extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); +extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); + +extern DLLEXPORT(const char*) vObjectName(VObject *o); +extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); +extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); +extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); +extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); +extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); +extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); + +extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); +extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); +extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); +extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); +extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); +extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); +extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); +extern DLLEXPORT(void) addList(VObject **o, VObject *p); + +extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); + +extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); +extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); +extern DLLEXPORT(int) moreIteration(VObjectIterator *i); +extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); + +extern DLLEXPORT(const char*) lookupStr(const char *s); +extern DLLEXPORT(void) cleanStrTbl(); + +extern DLLEXPORT(void) cleanVObject(VObject *o); +extern DLLEXPORT(void) cleanVObjects(VObject *list); + +extern DLLEXPORT(const char*) lookupProp(const char* str); +extern DLLEXPORT(const char*) lookupProp_(const char* str); + +extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); +extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); + +extern DLLEXPORT(int) vObjectValueType(VObject *o); + +/* return type of vObjectValueType: */ +#define VCVT_NOVALUE 0 + /* if the VObject has no value associated with it. */ +#define VCVT_STRINGZ 1 + /* if the VObject has value set by setVObjectStringZValue. */ +#define VCVT_UINT 2 + /* if the VObject has value set by setVObjectIntegerValue. */ +#define VCVT_ULONG 3 + /* if the VObject has value set by setVObjectLongValue. */ +#define VCVT_RAW 4 + /* if the VObject has value set by setVObjectAnyValue. */ +#define VCVT_VOBJECT 5 + /* if the VObject has value set by setVObjectVObjectValue. */ + +extern const char** fieldedProp; + +/*************************************************** + * The methods below are implemented in vcc.c (generated from vcc.y ) + ***************************************************/ + +/* NOTE regarding printVObject and writeVObject + +The functions below are not exported from the DLL because they +take a FILE* as a parameter, which cannot be passed across a DLL +interface (at least that is my experience). Instead you can use +their companion functions which take file names or pointers +to memory. However, if you are linking this code into +your build directly then you may find them a more convenient API +and you can go ahead and use them. If you try to use them with +the DLL LIB you will get a link error. +*/ +extern void writeVObject(FILE *fp, VObject *o); + + + +typedef void (*MimeErrorHandler)(char *); + +extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); + +extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); +extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); + + +/* NOTE regarding Parse_MIME_FromFile +The function above, Parse_MIME_FromFile, comes in two flavors, +neither of which is exported from the DLL. Each version takes +a CFile or FILE* as a parameter, neither of which can be +passed across a DLL interface (at least that is my experience). +If you are linking this code into your build directly then +you may find them a more convenient API that the other flavors +that take a file name. If you use them with the DLL LIB you +will get a link error. +*/ + + +#if INCLUDEMFC +extern VObject* Parse_MIME_FromFile(CFile *file); +#else +extern VObject* Parse_MIME_FromFile(FILE *file); +#endif + +extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); + + +#endif /* __VOBJECT_H__ */ + + diff --git a/library/categoryeditbase_p.ui b/library/categoryeditbase_p.ui index a76e433..e192ae1 100644 --- a/library/categoryeditbase_p.ui +++ b/library/categoryeditbase_p.ui @@ -25,17 +25,17 @@ <name>name</name> <cstring>CategoryEditBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>201</width> + <width>197</width> <height>287</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Category Edit</string> </property> <property> @@ -100,16 +100,20 @@ <name>pixmap</name> <pixmap></pixmap> </property> </item> <property stdset="1"> <name>name</name> <cstring>lvView</cstring> </property> + <property> + <name>whatsThis</name> + <string>Check the categories this document belongs to.</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout2</cstring> </property> <hbox> @@ -122,31 +126,39 @@ <number>6</number> </property> <widget> <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>txtCat</cstring> </property> + <property> + <name>whatsThis</name> + <string>Enter a new category here. Press <b>Add</b> to add it to the list.</string> + </property> </widget> <widget> <class>QToolButton</class> <property stdset="1"> <name>name</name> <cstring>cmdAdd</cstring> </property> <property stdset="1"> <name>focusPolicy</name> <enum>TabFocus</enum> </property> <property stdset="1"> <name>text</name> <string>Add</string> </property> + <property> + <name>whatsThis</name> + <string>Enter a new category to the left and press to add it to the list.</string> + </property> </widget> <widget> <class>QToolButton</class> <property stdset="1"> <name>name</name> <cstring>cmdDel</cstring> </property> <property stdset="1"> @@ -156,27 +168,35 @@ <property stdset="1"> <name>text</name> <string></string> </property> <property stdset="1"> <name>pixmap</name> <pixmap>image0</pixmap> </property> + <property> + <name>whatsThis</name> + <string>Press to delete the highlighted category.</string> + </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>chkGlobal</cstring> </property> <property stdset="1"> <name>text</name> <string>Global</string> </property> + <property> + <name>whatsThis</name> + <string>Check to make this property available to all applications.</string> + </property> </widget> </hbox> </widget> </vbox> </widget> <images> <image> <name>image0</name> diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp index f4b3e6b..272c223 100644 --- a/library/datebookmonth.cpp +++ b/library/datebookmonth.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -15,63 +15,69 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "config.h" #include "datebookmonth.h" #include "datebookdb.h" -#include <qpe/event.h> +#include <qtopia/private/event.h> #include "resource.h" #include "qpeapplication.h" #include "timestring.h" #include <qtoolbutton.h> #include <qspinbox.h> #include <qcombobox.h> #include <qdatetime.h> #include <qpainter.h> #include <qpopupmenu.h> +#include <qvaluestack.h> +#include <qwhatsthis.h> DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) : QHBox( parent, name ) { setBackgroundMode( PaletteButton ); begin = new QToolButton( this ); begin->setFocusPolicy(NoFocus); begin->setPixmap( Resource::loadPixmap( "start" ) ); begin->setAutoRaise( TRUE ); begin->setFixedSize( begin->sizeHint() ); + QWhatsThis::add( begin, tr("Show January in the selected year") ); back = new QToolButton( this ); back->setFocusPolicy(NoFocus); back->setPixmap( Resource::loadPixmap( "back" ) ); back->setAutoRaise( TRUE ); back->setFixedSize( back->sizeHint() ); + QWhatsThis::add( back, tr("Show the previous month") ); month = new QComboBox( FALSE, this ); for ( int i = 0; i < 12; ++i ) month->insertItem( Calendar::nameOfMonth( i + 1 ) ); year = new QSpinBox( 1752, 8000, 1, this ); next = new QToolButton( this ); next->setFocusPolicy(NoFocus); next->setPixmap( Resource::loadPixmap( "forward" ) ); next->setAutoRaise( TRUE ); next->setFixedSize( next->sizeHint() ); + QWhatsThis::add( next, tr("Show the next month") ); end = new QToolButton( this ); end->setFocusPolicy(NoFocus); end->setPixmap( Resource::loadPixmap( "finish" ) ); end->setAutoRaise( TRUE ); end->setFixedSize( end->sizeHint() ); + QWhatsThis::add( end, tr("Show December in the selected year") ); connect( month, SIGNAL( activated( int ) ), this, SLOT( updateDate() ) ); connect( year, SIGNAL( valueChanged( int ) ), this, SLOT( updateDate() ) ); connect( begin, SIGNAL( clicked() ), this, SLOT( firstMonth() ) ); connect( end, SIGNAL( clicked() ), @@ -449,17 +455,16 @@ void DateBookMonth::redraw() } QDate DateBookMonth::selectedDate() const { if ( !table ) return QDate::currentDate(); int y, m, d; table->getDate( y, m, d ); - qDebug( "got %d %d %d", y, m, d ); return QDate( y, m, d ); } void DateBookMonth::slotWeekChange( bool startOnMonday ) { table->setWeekStart( startOnMonday ); } @@ -520,113 +525,139 @@ void DayItemMonth::setEvents( const QValueList<EffectiveEvent> &effEv ) void DayItemMonth::clearEffEvents() { d->mDayEvents.clear(); } void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ) { + p->save(); + QColorGroup g( cg ); g.setBrush( QColorGroup::Base, back ); g.setColor( QColorGroup::Text, forg ); - p->fillRect( 0, 0, cr.width(), cr.height(), selected ? g.brush( QColorGroup::Highlight ) : g.brush( QColorGroup::Base ) ); - if ( selected ) p->setPen( g.highlightedText() ); else p->setPen( g.text() ); - p->save(); - QFont f = p->font(); - f.setPointSize( ( f.pointSize() / 3 ) * 2 ); - p->setFont( f ); - QFontMetrics fm( f ); - p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) ); - p->restore(); - // Put indicators for something like this, (similar to PalmOS) - // Before noon: item at top of the day - // At noon: put a small item at the middle - // After noon: put an indicator at the bottom of the day - // an all day event: mark with a circle in the middle (a la DateBook+) - bool beforeNoon = false; - bool atNoon = false; - bool afterNoon = false; - bool bAllDay = false; - bool bRepeatAfter = false; - bool bRepeatBefore = false; - bool bRepeatNoon = false; - bool straddleAfter = false; - bool straddleBefore = false; + QValueStack<int> normalLine; + QValueStack<int> repeatLine; + QValueStack<int> travelLine; + + bool normalAllDay = FALSE; + bool repeatAllDay = FALSE; + bool travelAllDay = FALSE; + QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin(); + for ( ; itDays != d->mDayEvents.end(); ++itDays ) { - if ( (*itDays).event().type() == Event::AllDay ) - bAllDay = TRUE; - else if ( (*itDays).start().hour() < 12 ) { - beforeNoon = TRUE; - if ( (*itDays).end().hour() > 12 ) { - atNoon = TRUE; - straddleBefore = TRUE; + int w = cr.width(); + Event ev = (*itDays).event(); + + int f = (*itDays).start().hour(); // assume Effective event + int t = (*itDays).end().hour(); // is truncated. + + if (ev.isAllDay()) { + if (!ev.hasRepeat()) + normalAllDay = TRUE; + else + repeatAllDay = TRUE; + } else { + int sLine, eLine; + if (f == 0) + sLine = 0; + else if (f < 8 ) + sLine = 1; + else if (f >= 17) + sLine = w - 4; + else { + sLine = (f - 8) * (w - 8); + if (sLine) + sLine /= 8; + sLine += 4; } - if ( (*itDays).end().hour() > 14 || - (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) { - afterNoon = TRUE; - straddleAfter = TRUE; + if (t == 23) + eLine = w; + else if (t < 8) + eLine = 4; + else if (t >= 17) + eLine = w - 1; + else { + eLine = (t - 8) * (w - 8); + if (eLine) + eLine /= 8; + eLine += 4; } - if ( (*itDays).event().hasRepeat() ) - bRepeatBefore = TRUE; - } else if ( (*itDays).start().hour() == 12 ) { - if ( !atNoon ) - atNoon = TRUE; - if ( (*itDays).event().hasRepeat() ) - bRepeatNoon = TRUE; - if ( (*itDays).end().hour() > 14 || - (*itDays).end().hour() == 14 && (*itDays).end().minute() > 0 ) { - afterNoon = TRUE; - straddleAfter = TRUE; + if (!ev.hasRepeat()) { + normalLine.push(sLine); + normalLine.push(eLine); + } else { + repeatLine.push(sLine); + repeatLine.push(eLine); } - } else if ( (*itDays).start().hour() > 12 ) { - afterNoon = TRUE; - if ( (*itDays).event().hasRepeat() ) - bRepeatAfter = TRUE; } } - int x = cr.width() - 13; - if ( beforeNoon ) { - p->setBrush( blue ); - p->drawRect( x, 2, 10, 10 ); - if ( bRepeatBefore ) - p->fillRect( x + 5, 4, 3, 3, white ); - } - if ( atNoon ) { - p->setBrush( blue ); - p->drawRect( x, 14, 10, 5 ); - if ( bRepeatNoon ) - p->fillRect( x + 5, 16, 3, 2, white ); - } - if ( straddleBefore ) { - p->drawLine( x, 11, x, 14 ); - p->fillRect( x + 1, 11, 8, 4, blue ); - p->drawLine( x + 9, 11, x + 9, 14 ); - } - if ( afterNoon ) { - p->setBrush( blue ); - p->drawRect( x, 21, 10, 10 ); - if ( bRepeatAfter ) - p->fillRect( x + 5, 23, 3, 3, white ); + + // draw the background + if (normalAllDay || repeatAllDay || travelAllDay) { + p->save(); + + if (normalAllDay) + if (repeatAllDay) { + p->fillRect( 0, 0, cr.width(), cr.height() / 2, + colorNormalLight ); + p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2, + colorRepeatLight ); + } else + p->fillRect( 0, 0, cr.width(), cr.height(), + colorNormalLight ); + else if (repeatAllDay) + p->fillRect( 0, 0, cr.width(), cr.height(), + colorRepeatLight ); + } else { + p->fillRect( 0, 0, cr.width(), + cr.height(), selected + ? g.brush( QColorGroup::Highlight ) + : g.brush( QColorGroup::Base ) ); } - if ( straddleAfter ) { - p->drawLine( x, 18, x, 21 ); - p->fillRect( x + 1, 18, 8, 4, blue ); - p->drawLine( x + 9, 18, x + 9, 21 ); + + // The lines + // now for the lines. + int h = 5; + int y = cr.height() / 2 - h; + + while(normalLine.count() >= 2) { + int x2 = normalLine.pop(); + int x1 = normalLine.pop(); + if (x2 < x1 + 2) + x2 = x1 + 2; + p->fillRect(x1, y, x2 - x1, h, colorNormal); } - if ( bAllDay ) { - p->setBrush( green ); - p->drawEllipse( cr.width() / 2 - 7, cr.height() / 2 - 5, 10, 10 ); + + y += h; + + while(repeatLine.count() >= 2) { + int x2 = repeatLine.pop(); + int x1 = repeatLine.pop(); + if (x2 < x1 + 2) + x2 = x1 + 2; + p->fillRect(x1, y, x2 - x1, h, colorRepeat); } + + + // Finally, draw the number. + QFont f = p->font(); + f.setPointSize( ( f.pointSize() / 3 ) * 2 ); + p->setFont( f ); + QFontMetrics fm( f ); + p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) ); + + p->restore(); } void DayItemMonth::setType( Calendar::Day::Type t ) { switch ( t ) { case Calendar::Day::PrevMonth: @@ -706,8 +737,14 @@ void DateButton::setDate( QDate d ) } void DateButton::setDateFormat( DateFormat f ) { df = f; setDate( currDate ); } + +bool DateButton::customWhatsThis() const +{ + return TRUE; +} + diff --git a/library/datebookmonth.h b/library/datebookmonth.h index a7647ae..3c57c19 100644 --- a/library/datebookmonth.h +++ b/library/datebookmonth.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -15,17 +15,17 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef DATEBOOKMONTH #define DATEBOOKMONTH -#include <qpe/event.h> +#include <qtopia/private/event.h> #include <qvbox.h> #include <qhbox.h> #include <qdatetime.h> #include <qvaluelist.h> #include <qtable.h> #include <qpushbutton.h> @@ -182,16 +182,18 @@ private: class DateButton : public QPushButton { Q_OBJECT public: DateButton( bool longDate, QWidget *parent, const char * name = 0 ); QDate date() const { return currDate; } + bool customWhatsThis() const; + signals: void dateSelected( int year, int month, int day ); public slots: void setDate( int y, int m, int d ); void setDate( QDate ); void setWeekStartsMonday( int ); void setDateFormat( DateFormat ); diff --git a/library/fileselector.cpp b/library/fileselector.cpp index 013f43a..382012f 100644 --- a/library/fileselector.cpp +++ b/library/fileselector.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -25,329 +25,539 @@ #include "fileselector.h" #include "fileselector_p.h" #include "global.h" #include "resource.h" #include "config.h" #include "applnk.h" #include "storage.h" #include "qpemenubar.h" +#ifdef QWS #include "qcopchannel_qws.h" +#endif #include "lnkproperties.h" #include "applnk.h" #include "qpeapplication.h" #include "categorymenu.h" +#include "categoryselect.h" +#include "mimetype.h" +#include "categories.h" #include <stdlib.h> #include <qdir.h> #include <qwidget.h> #include <qpopupmenu.h> #include <qtoolbutton.h> #include <qpushbutton.h> #include <qheader.h> #include <qtooltip.h> +#include <qwhatsthis.h> +class TypeCombo : public QComboBox +{ + Q_OBJECT +public: + TypeCombo( QWidget *parent, const char *name=0 ) + : QComboBox( parent, name ) + { + connect( this, SIGNAL(activated(int)), this, SLOT(selectType(int)) ); + } + + void reread( DocLnkSet &files, const QString &filter ); + +signals: + void selected( const QString & ); + +protected slots: + void selectType( int idx ) { + emit selected( typelist[idx] ); + } + +protected: + QStringList typelist; + QString prev; +}; + +void TypeCombo::reread( DocLnkSet &files, const QString &filter ) +{ + typelist.clear(); + QStringList filters = QStringList::split( ';', filter ); + int pos = filter.find( '/' ); + //### do for each filter + if ( filters.count() == 1 && pos >= 0 && filter[pos+1] != '*' ) { + typelist.append( filter ); + clear(); + QString minor = filter.mid( pos+1 ); + minor[0] = minor[0].upper(); + insertItem( tr("%1 files").arg(minor) ); + setCurrentItem(0); + setEnabled( FALSE ); + return; + } + + QListIterator<DocLnk> dit( files.children() ); + for ( ; dit.current(); ++dit ) { + if ( !typelist.contains( (*dit)->type() ) ) + typelist.append( (*dit)->type() ); + } + + QStringList types; + QStringList::ConstIterator it; + for (it = typelist.begin(); it!=typelist.end(); ++it) { + QString t = *it; + if ( t.left(12) == "application/" ) { + MimeType mt(t); + const AppLnk* app = mt.application(); + if ( app ) + t = app->name(); + else + t = t.mid(12); + } else { + QString major, minor; + int pos = t.find( '/' ); + if ( pos >= 0 ) { + major = t.left( pos ); + minor = t.mid( pos+1 ); + } + if ( minor.find( "x-" ) == 0 ) + minor = minor.mid( 2 ); + minor[0] = minor[0].upper(); + major[0] = major[0].upper(); + if ( filters.count() > 1 ) + t = tr("%1 %2", "minor mimetype / major mimetype").arg(minor).arg(major); + else + t = minor; + } + types += tr("%1 files").arg(t); + } + for (it = filters.begin(); it!=filters.end(); ++it) { + typelist.append( *it ); + int pos = (*it).find( '/' ); + if ( pos >= 0 ) { + QString maj = (*it).left( pos ); + maj[0] = maj[0].upper(); + types << tr("All %1 files").arg(maj); + } + } + if ( filters.count() > 1 ) { + typelist.append( filter ); + types << tr("All files"); + } + prev = currentText(); + clear(); + insertStringList(types); + for (int i=0; i<count(); i++) { + if ( text(i) == prev ) { + setCurrentItem(i); + break; + } + } + if ( prev.isNull() ) + setCurrentItem(count()-1); + setEnabled( TRUE ); +} + + +//=========================================================================== FileSelectorItem::FileSelectorItem( QListView *parent, const DocLnk &f ) : QListViewItem( parent ), fl( f ) { setText( 0, f.name() ); setPixmap( 0, f.pixmap() ); } FileSelectorItem::~FileSelectorItem() { } -class FileSelectorViewPrivate -{ -public: - CategoryMenu *cm; - bool m_noItems:1; -}; - -FileSelectorView::FileSelectorView( const QString &f, QWidget *parent, const char *name ) - : QListView( parent, name ), filter( f ), count( 0 ) +FileSelectorView::FileSelectorView( QWidget *parent, const char *name ) + : QListView( parent, name ) { - d = new FileSelectorViewPrivate(); - d->cm = 0; - d->m_noItems = false; setAllColumnsShowFocus( TRUE ); addColumn( tr( "Name" ) ); header()->hide(); - - fileManager = new FileManager; - reread(); - QCopChannel *channel = new QCopChannel( "QPE/Card", this ); - connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); } FileSelectorView::~FileSelectorView() { } -void FileSelectorView::reread() -{ - QString oldFile; - FileSelectorItem *item; - if( !d->m_noItems ) { // there are items - item = (FileSelectorItem *)selectedItem(); - if ( item ) - oldFile = item->file().file(); - } - clear(); - DocLnkSet files; - Global::findDocuments(&files, filter); - count = files.children().count(); - if(count == 0 ){ // No Documents - d->m_noItems = true; - QListViewItem *it = new QListViewItem(this, tr("There are no files in this directory." ), "empty" ); - it->setSelectable(FALSE ); - return; - } - QListIterator<DocLnk> dit( files.children() ); - for ( ; dit.current(); ++dit ) { - if (d->cm) - if (!d->cm->isSelected((**dit).categories())) - continue; - item = new FileSelectorItem( this, **dit ); - if ( item->file().file() == oldFile ) - setCurrentItem( item ); - } - if ( !selectedItem() ) - setCurrentItem( firstChild() ); -} - -void FileSelectorView::setCategoryFilter(CategoryMenu *cm) -{ - d->cm = cm; - connect(cm, SIGNAL(categoryChange()), this, SLOT(categoryChanged()) ); -} - -void FileSelectorView::categoryChanged() { reread(); } - -void FileSelectorView::cardMessage( const QCString &msg, const QByteArray &) -{ - if ( msg == "mtabChanged()" ) - reread(); -} - void FileSelectorView::keyPressEvent( QKeyEvent *e ) { QString txt = e->text(); if (e->key() == Key_Space) emit returnPressed( currentItem() ); else if ( !txt.isNull() && txt[0] > ' ' && e->key() < 0x1000 ) e->ignore(); else QListView::keyPressEvent(e); } +class NewDocItem : public FileSelectorItem +{ +public: + NewDocItem( QListView *parent, const DocLnk &f ) + : FileSelectorItem( parent, f ) { + setText( 0, QObject::tr("New Document") ); + QImage img( Resource::loadImage( "new" ) ); + QPixmap pm; + pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); + setPixmap( 0, pm ); + } + QString key ( int, bool ) const { + return QString("\n"); + } + + void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ) { + QFont oldFont = p->font(); + QFont newFont = p->font(); + newFont.setWeight( QFont::Bold ); + p->setFont( newFont ); + FileSelectorItem::paintCell( p, cg, column, width, alignment ); + p->setFont( oldFont ); + } + + int width( const QFontMetrics &fm, const QListView *v, int c ) const { + return FileSelectorItem::width( fm, v, c )*4/3; // allow for bold font + } +}; + +//=========================================================================== + class FileSelectorPrivate { public: - CategoryMenu *cm; - QMenuBar *mb; + TypeCombo *typeCombo; + CategorySelect *catSelect; + QValueList<QRegExp> mimeFilters; + int catId; + bool showNew; + NewDocItem *newDocItem; + DocLnkSet files; + QHBox *toolbar; }; /*! \class FileSelector fileselector.h \brief The FileSelector widget allows the user to select DocLnk objects. + + This class presents a file selection dialog to the user. This widget + is usually the first widget seen in a \link docwidget.html + document-oriented application\endlink. The developer will most often + create this widget in combination with a <a + href="../qt/qwidgetstack.html"> QWidgetStack</a> and the appropriate + editor and/or viewer widget for their application. This widget + should be shown first and the user can the select which document + they wish to operate on. Please refer to the implementation of + texteditor for an example of how to tie these classes together. + + Use setNewVisible() depending on whether the application can be used + to create new files or not. Use setCloseVisible() depending on + whether the user may leave the dialog without creating or selecting + a document or not. The number of files in the view is available from + fileCount(). To force the view to be updated call reread(). + + If the user presses the 'New Document' button the newSelected() + signal is emitted. If the user selects an existing file the + fileSelected() signal is emitted. The selected file's \link + doclnk.html DocLnk\endlink is available from the selected() + function. If the file selector is no longer necessary the closeMe() + signal is emitted. + + \ingroup qtopiaemb + \sa FileManager */ /*! Constructs a FileSelector with mime filter \a f. The standard Qt \a parent and \a name parameters are passed to the - parent. + parent widget. - If \a newVisible is TRUE, the widget has an button allowing the user - the create "new" documents - editor applications will have this while - viewer applications will not. + If \a newVisible is TRUE, the widget has a button to allow the user + the create "new" documents; this is useful for applications that can + create and edit documents but not suitable for applications that + only provide viewing. - If \a closeVisible is TRUE, the widget has an button allowinf the user - to select "no document". + \a closeVisible is deprecated \sa DocLnkSet::DocLnkSet() */ FileSelector::FileSelector( const QString &f, QWidget *parent, const char *name, bool newVisible, bool closeVisible ) : QVBox( parent, name ), filter( f ) { setMargin( 0 ); setSpacing( 0 ); - QHBox *top = new QHBox( this ); - top->setBackgroundMode( PaletteButton ); // same colour as toolbars - top->setSpacing( 0 ); - - QWidget *spacer = new QWidget( top ); - spacer->setBackgroundMode( PaletteButton ); d = new FileSelectorPrivate(); - d->mb = new QMenuBar(spacer); - d->cm = new CategoryMenu("Document View", this); - QPEMenuToolFocusManager::manager()->addWidget( d->mb ); - d->mb->insertItem(tr("View"), d->cm); + d->newDocItem = 0; + d->showNew = newVisible; + d->catId = -2; // All files + d->toolbar = new QHBox( this ); + d->toolbar->setBackgroundMode( PaletteButton ); // same colour as toolbars + d->toolbar->setSpacing( 0 ); + d->toolbar->hide(); - QToolButton *tb = new QToolButton( top ); - tb->setPixmap( Resource::loadPixmap( "new" ) ); - connect( tb, SIGNAL( clicked() ), this, SLOT( createNew() ) ); - buttonNew = tb; - tb->setFixedSize( 18, 20 ); // tb->sizeHint() ); - tb->setAutoRaise( TRUE ); - QToolTip::add( tb, tr( "Create a new Document" ) ); - QPEMenuToolFocusManager::manager()->addWidget( tb ); + QWidget *spacer = new QWidget( d->toolbar ); + spacer->setBackgroundMode( PaletteButton ); - tb = new QToolButton( top ); + QToolButton *tb = new QToolButton( d->toolbar ); tb->setPixmap( Resource::loadPixmap( "close" ) ); connect( tb, SIGNAL( clicked() ), this, SIGNAL( closeMe() ) ); buttonClose = tb; tb->setFixedSize( 18, 20 ); // tb->sizeHint() ); tb->setAutoRaise( TRUE ); QToolTip::add( tb, tr( "Close the File Selector" ) ); QPEMenuToolFocusManager::manager()->addWidget( tb ); - view = new FileSelectorView( filter, this, "fileview" ); - view->setCategoryFilter(d->cm); + view = new FileSelectorView( this, "fileview" ); QPEApplication::setStylusOperation( view->viewport(), QPEApplication::RightOnHold ); connect( view, SIGNAL( mouseButtonClicked( int, QListViewItem *, const QPoint &, int ) ), this, SLOT( fileClicked( int, QListViewItem *, const QPoint &, int ) ) ); connect( view, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int ) ), this, SLOT( filePressed( int, QListViewItem *, const QPoint &, int ) ) ); connect( view, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( fileClicked( QListViewItem * ) ) ); - setNewVisible( newVisible ); + QHBox *hb = new QHBox( this ); + d->typeCombo = new TypeCombo( hb ); + connect( d->typeCombo, SIGNAL(selected(const QString&)), + this, SLOT(typeSelected(const QString&)) ); + QWhatsThis::add( d->typeCombo, tr("Show documents of this type") ); + + Categories c; + c.load(categoryFileName()); + QArray<int> vl( 0 ); + d->catSelect = new CategorySelect( hb ); + d->catSelect->setRemoveCategoryEdit( TRUE ); + d->catSelect->setCategories( vl, "Document View", tr("Document View") ); + d->catSelect->setAllCategories( TRUE ); + connect( d->catSelect, SIGNAL(signalSelected(int)), this, SLOT(catSelected(int)) ); + QWhatsThis::add( d->catSelect, tr("Show documents in this category") ); + setCloseVisible( closeVisible ); + + QCopChannel *channel = new QCopChannel( "QPE/Card", this ); + connect( channel, SIGNAL(received(const QCString &, const QByteArray &)), + this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); + + reread(); + updateWhatsThis(); } /*! Destroys the widget. */ FileSelector::~FileSelector() { - + delete d; } /*! - Returns the number of files in the view. If this is zero, and editor - application might avoid using the selector and immediately start with + Returns the number of files in the view. If this is zero, an editor + application might bypass the selector and immediately start with a "new" document. */ int FileSelector::fileCount() { - return view->fileCount(); + return d->files.children().count();; } /*! - Causes the file selector to act as if the "new" button was chosen. + Calling this function is the programmatic equivalent of the user + pressing the "new" button. \sa newSelected(), closeMe() */ void FileSelector::createNew() { DocLnk f; emit newSelected( f ); emit closeMe(); } void FileSelector::fileClicked( int button, QListViewItem *i, const QPoint &, int ) { if ( !i ) return; - if(i->text(1) == QString::fromLatin1("empty" ) ) - return; - if ( button == Qt::LeftButton ) { fileClicked( i ); } } void FileSelector::filePressed( int button, QListViewItem *i, const QPoint &, int ) { - if ( !i ) + if ( !i || i == d->newDocItem ) return; - if(i->text(1) == QString::fromLatin1("empty" ) ) - return; - if ( button == Qt::RightButton ) { DocLnk l = ((FileSelectorItem *)i)->file(); LnkProperties prop( &l ); prop.showMaximized(); prop.exec(); - d->cm->reload(); reread(); } } void FileSelector::fileClicked( QListViewItem *i ) { if ( !i ) return; - emit fileSelected( ( (FileSelectorItem*)i )->file() ); - emit closeMe(); + if ( i == d->newDocItem ) { + createNew(); + } else { + emit fileSelected( ( (FileSelectorItem*)i )->file() ); + emit closeMe(); + } +} + +void FileSelector::typeSelected( const QString &type ) +{ + d->mimeFilters.clear(); + QStringList subFilter = QStringList::split(";", type); + for( QStringList::Iterator it = subFilter.begin(); it != subFilter.end(); ++it ) + d->mimeFilters.append( QRegExp(*it, FALSE, TRUE) ); + updateView(); } +void FileSelector::catSelected( int c ) +{ + d->catId = c; + updateView(); +} + +void FileSelector::cardMessage( const QCString &msg, const QByteArray &) +{ + if ( msg == "mtabChanged()" ) + reread(); +} + + /*! - Returns the selected DocLnk. The caller is responsible for deleting - the returned value. + Returns the selected \link doclnk.html DocLnk\endlink. The caller is + responsible for deleting the returned value. */ const DocLnk *FileSelector::selected() { FileSelectorItem *item = (FileSelectorItem *)view->selectedItem(); - if ( item ) + if ( item && item != d->newDocItem ) return new DocLnk( item->file() ); return NULL; } /*! \fn void FileSelector::fileSelected( const DocLnk &f ) - This signal is emitted when the user selects a file. - \a f is the file. + This signal is emitted when the user selects a document. + \a f is the document. */ /*! \fn void FileSelector::newSelected( const DocLnk &f ) - This signal is emitted when the user selects "new" file. - \a f is a DocLnk for the file. You will need to set the type - of the value after copying it. + This signal is emitted when the user selects a "new" document. + \a f is a DocLnk for the document. You will need to set the type + of the document after copying it. */ /*! \fn void FileSelector::closeMe() This signal is emitted when the user no longer needs to view the widget. */ /*! - Sets whether a "new document" button is visible, according to \a b. + If \a b is TRUE a "new document" entry is visible; if \a b is FALSE + this entry is not visible and the user is unable to create new + documents from the dialog. */ void FileSelector::setNewVisible( bool b ) { - if ( b ) - buttonNew->show(); - else - buttonNew->hide(); + if ( d->showNew != b ) { + d->showNew = b; + updateView(); + updateWhatsThis(); + } } /*! - Sets whether a "no document" button is visible, according to \a b. + If \a b is TRUE a "close" or "no document" button is visible; if \a + b is FALSE this button is not visible and the user is unable to + leave the dialog without creating or selecting a document. + + This function is deprecated. */ void FileSelector::setCloseVisible( bool b ) { - if ( b ) - buttonClose->show(); + if ( b ) + d->toolbar->show(); else - buttonClose->hide(); + d->toolbar->hide(); } /*! - Rereads the list of files. + Rereads the list of documents. */ void FileSelector::reread() { - view->reread(); + d->files.clear(); + Global::findDocuments(&d->files, filter); + d->typeCombo->reread( d->files, filter ); + updateView(); } +void FileSelector::updateView() +{ + FileSelectorItem *item = (FileSelectorItem *)view->selectedItem(); + if ( item == d->newDocItem ) + item = 0; + QString oldFile; + if ( item ) + oldFile = item->file().file(); + view->clear(); + QListIterator<DocLnk> dit( d->files.children() ); + for ( ; dit.current(); ++dit ) { + bool mimeMatch = FALSE; + if ( d->mimeFilters.count() ) { + QValueList<QRegExp>::Iterator it; + for ( it = d->mimeFilters.begin(); it != d->mimeFilters.end(); ++it ) { + if ( (*it).match((*dit)->type()) >= 0 ) { + mimeMatch = TRUE; + break; + } + } + } else { + mimeMatch = TRUE; + } + if ( mimeMatch && + (d->catId == -2 || (*dit)->categories().contains(d->catId) || + (d->catId == -1 && (*dit)->categories().isEmpty())) ) { + item = new FileSelectorItem( view, **dit ); + if ( item->file().file() == oldFile ) + view->setCurrentItem( item ); + } + } + + if ( d->showNew ) + d->newDocItem = new NewDocItem( view, DocLnk() ); + else + d->newDocItem = 0; + + if ( !view->selectedItem() || view->childCount() == 1 ) { + view->setCurrentItem( view->firstChild() ); + view->setSelected( view->firstChild(), TRUE ); + } +} + +void FileSelector::updateWhatsThis() +{ + QWhatsThis::remove( this ); + QString text = tr("Click to select a document from the list"); + if ( d->showNew ) + text += tr(", or select <b>New Document</b> to create a new document."); + text += tr("<br><br>Click and hold for document properties."); + QWhatsThis::add( this, text ); +} + +#include "fileselector.moc" + diff --git a/library/fileselector.h b/library/fileselector.h index 8cfdf13..1a6ace2 100644 --- a/library/fileselector.h +++ b/library/fileselector.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -45,36 +45,68 @@ private: }; class FileSelectorPrivate; class FileSelector : public QVBox { Q_OBJECT public: - FileSelector( const QString &mimefilter, QWidget *parent, const char *name, bool newVisible = TRUE, bool closeVisible = TRUE ); + FileSelector( const QString &mimefilter, QWidget *parent, const char *name=0, bool newVisible = TRUE, bool closeVisible = TRUE ); ~FileSelector(); void setNewVisible( bool b ); void setCloseVisible( bool b ); void reread(); int fileCount(); - const DocLnk *selected(); + DocLnk selectedDocument() const + { + const DocLnk* rp = ((FileSelector*)this)->selected(); + if (!rp) { + DocLnk r; + return r; + } + DocLnk r(*rp); + delete rp; + return r; + } + + QValueList<DocLnk> fileList() const + { + ((FileSelector*)this)->fileCount(); // ensure all loaded when this is extended + + QValueList<DocLnk> list; + FileSelectorItem *item = (FileSelectorItem *)((QListView*)view)->firstChild(); + while (item) { + list.append(item->file()); + item = (FileSelectorItem *)item->nextSibling(); + } + + return list; + } signals: void fileSelected( const DocLnk & ); void newSelected( const DocLnk & ); void closeMe(); private slots: void createNew(); void fileClicked( int, QListViewItem *, const QPoint &, int ); // pressed to get 'right down' void filePressed( int, QListViewItem *, const QPoint &, int ); void fileClicked( QListViewItem *); + void typeSelected( const QString &type ); + void catSelected( int ); + void cardMessage( const QCString &, const QByteArray &); + +private: + void updateView(); + void updateWhatsThis(); private: + const DocLnk *selected(); // use selectedDocument() FileSelectorView *view; QString filter; QToolButton *buttonNew, *buttonClose; FileSelectorPrivate *d; }; #endif diff --git a/library/fileselector_p.h b/library/fileselector_p.h index 6bab485..13933ba 100644 --- a/library/fileselector_p.h +++ b/library/fileselector_p.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -17,40 +17,22 @@ ** not clear to you. ** **********************************************************************/ #ifndef FILESELECTOR_P_H #define FILESELECTOR_P_H #include <qlistview.h> -class FileManager; -class CategoryMenu; -class FileSelectorViewPrivate; - class FileSelectorView : public QListView { Q_OBJECT public: - FileSelectorView( const QString &mimefilter, QWidget *parent, const char *name ); + FileSelectorView( QWidget *parent, const char *name ); ~FileSelectorView(); - void reread(); - int fileCount() { return count; } - void setCategoryFilter(CategoryMenu *); protected: void keyPressEvent( QKeyEvent *e ); - -protected slots: - void cardMessage( const QCString &, const QByteArray &); - - void categoryChanged(); - -private: - QString filter; - FileManager *fileManager; - int count; - FileSelectorViewPrivate *d; }; #endif diff --git a/library/finddialog.cpp b/library/finddialog.cpp index 904e952..d9f430a 100644 --- a/library/finddialog.cpp +++ b/library/finddialog.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -27,16 +27,17 @@ #include <qlayout.h> #include <qpushbutton.h> FindDialog::FindDialog( const QString &appName, QWidget *parent, const char *name, bool modal ) : QDialog( parent, name, modal ) { + setCaption( tr("Find") ); QVBoxLayout *vb; vb = new QVBoxLayout( this ); fw = new FindWidget( appName, this, "Find Widget" ); vb->addWidget( fw ); QObject::connect( fw, SIGNAL(signalFindClicked(const QString&, bool,bool,int)), this, SIGNAL(signalFindClicked(const QString&, bool,bool,int)) ); diff --git a/library/finddialog.h b/library/finddialog.h index 00c7b45..2512533 100644 --- a/library/finddialog.h +++ b/library/finddialog.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/library/findwidget_p.cpp b/library/findwidget_p.cpp index 7ed8bca..9ecaa40 100644 --- a/library/findwidget_p.cpp +++ b/library/findwidget_p.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/library/findwidget_p.h b/library/findwidget_p.h index 418242c..e1329da 100644 --- a/library/findwidget_p.h +++ b/library/findwidget_p.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/library/findwidgetbase_p.ui b/library/findwidgetbase_p.ui index 5eceaad..393365e 100644 --- a/library/findwidgetbase_p.ui +++ b/library/findwidgetbase_p.ui @@ -6,18 +6,18 @@ <name>name</name> <cstring>FindWidgetBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>245</width> - <height>183</height> + <width>246</width> + <height>203</height> </rect> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>1</hsizetype> <vsizetype>1</vsizetype> </sizepolicy> @@ -30,21 +30,21 @@ <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <vbox> <property stdset="1"> <name>margin</name> - <number>0</number> + <number>6</number> </property> <property stdset="1"> <name>spacing</name> - <number>0</number> + <number>4</number> </property> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout1</cstring> </property> <hbox> @@ -85,17 +85,17 @@ <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>cmdFind</cstring> </property> <property stdset="1"> <name>text</name> - <string>&Find</string> + <string>Find</string> </property> <property stdset="1"> <name>default</name> <bool>true</bool> </property> </widget> </hbox> </widget> @@ -225,16 +225,24 @@ </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>lblStatus</cstring> </property> <property stdset="1"> + <name>frameShape</name> + <enum>Panel</enum> + </property> + <property stdset="1"> + <name>frameShadow</name> + <enum>Sunken</enum> + </property> + <property stdset="1"> <name>text</name> <string></string> </property> </widget> </vbox> </widget> <customwidgets> <customwidget> diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp index 50dcf3d..c64e645 100644 --- a/library/fontdatabase.cpp +++ b/library/fontdatabase.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -19,17 +19,19 @@ **********************************************************************/ #include "qpeapplication.h" #include "fontfactoryinterface.h" #include "fontdatabase.h" #include <qpe/qlibrary.h> +#ifdef QWS #include <qfontmanager_qws.h> +#endif #include <qdir.h> #include <qdict.h> #include <stdio.h> #include <stdlib.h> static QString fontDir() { QString qtdir = getenv("QTDIR"); @@ -53,46 +55,44 @@ static QString fontFamily( const QString& key ) #endif QValueList<FontFactory> *FontDatabase::factoryList = 0; /*! \class FontDatabase fontdatabase.h \brief The FontDatabase class provides information about available fonts. - Provides information about available fonts. - - FontDatabase provides information about the available fonts of the - underlying window system. + Most often you will simply want to query the database for the + available font families(). - Most often you will simply want to query the database for all font - families(), and their respective pointSizes(), styles() and charSets(). + Use FontDatabase rather than QFontDatabase when you may need access + to fonts that are not normally available. For example, if the + freetype library and the Qtopia freetype plugin are installed, + TrueType fonts will be available to your application. Font renderer + plugins have greater resource requirements than system fonts so they + should be used only when necessary. You can force the loading of + font renderer plugins with loadRenderers(). - Use FontDatabase rather than QFontDatabase when you may need access to - fonts not normally available. For example, if the freetype library and - Qtopia freetype plugin are installed TrueType fonts will be available - to your application. Font renderer plugins have greater resource - requirements than the system fonts so they should be used only when - necessary. + \ingroup qtopiaemb */ /*! - Constructs the FontDatabase class. + Constructs a FontDatabase object. */ FontDatabase::FontDatabase() #ifndef QT_NO_FONTDATABASE : QFontDatabase() #endif { if ( !factoryList ) loadRenderers(); } /*! - Returns a list of names of all available font families. + Returns a list of names of all the available font families. */ QStringList FontDatabase::families() const { #ifndef QT_NO_FONTDATABASE return QFontDatabase::families(); #else QStringList list; QDict<void> familyDict; @@ -136,18 +136,18 @@ QValueList<int> FontDatabase::standardSizes() sList.append( s[i++] ); } return sList; } #endif /*! - Load any font renderer plugins that are available and make fonts that - the plugins can read available. + Load any font renderer plugins that are available and make the fonts + that the plugins can read available. */ void FontDatabase::loadRenderers() { #ifndef QT_NO_COMPONENT if ( !factoryList ) factoryList = new QValueList<FontFactory>; QValueList<FontFactory>::Iterator mit; @@ -183,17 +183,16 @@ void FontDatabase::loadRenderers() #endif } /*! \internal */ void FontDatabase::readFonts( QFontFactory *factory ) { - // Load in font definition file QString fn = fontDir() + "fontdir"; FILE* fontdef=fopen(fn.local8Bit(),"r"); if(!fontdef) { QCString temp=fn.local8Bit(); qWarning("Cannot find font definition file %s - is $QTDIR set correctly?", temp.data()); return; @@ -215,21 +214,19 @@ void FontDatabase::readFonts( QFontFactory *factory ) if ( file[0] != '/' ) filename = fontDir(); filename += file; if ( QFile::exists(filename) ) { if( factory->name() == render ) { QDiskFont * qdf=new QDiskFont(factory,name,isitalic[0]=='y', weight,size,flags,filename); qt_fontmanager->diskfonts.append(qdf); -#ifndef QT_NO_FONTDATABASE #if QT_VERSION >= 232 QFontDatabase::qwsAddDiskFont( qdf ); #endif -#endif } } } fgets(buf,200,fontdef); } fclose(fontdef); } diff --git a/library/fontdatabase.h b/library/fontdatabase.h index 9160ab0..10aec91 100644 --- a/library/fontdatabase.h +++ b/library/fontdatabase.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/library/fontmanager.cpp b/library/fontmanager.cpp index adbe57b..28a5212 100644 --- a/library/fontmanager.cpp +++ b/library/fontmanager.cpp @@ -1,28 +1,29 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ +#ifdef QWS #include "fontmanager.h" #include <qfile.h> #include <stdlib.h> #include <qgfx_qws.h> /* @@ -94,8 +95,9 @@ QFont FontManager::unicodeFont( Spacing sp ) } else { fontName = "Helvetica"; size = 14; } } } return QFont(fontName,size); } +#endif diff --git a/library/fontmanager.h b/library/fontmanager.h index 7498df8..c4d2c78 100644 --- a/library/fontmanager.h +++ b/library/fontmanager.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/library/global.cpp b/library/global.cpp index ab27b3f..7438891 100644 --- a/library/global.cpp +++ b/library/global.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -40,28 +40,30 @@ #include <stdlib.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> +#ifdef QWS #include <qwindowsystem_qws.h> // for qwsServer +#endif #include <qdatetime.h> #include <qfile.h> namespace { // checks if the storage should be searched bool checkStorage(const QString &path ){ // this is a small Config replacement cause config is too limited -zecke QFile file(path ); if(!file.open(IO_ReadOnly ) ) return true; - + QByteArray array = file.readAll(); QStringList list = QStringList::split('\n', QString( array ) ); for(QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ if( (*it).startsWith("autocheck = 0" ) ){ return false; }else if( (*it).startsWith("autocheck = 1" ) ){ return true; } @@ -103,21 +105,23 @@ private: static StartingAppList *appl; }; StartingAppList* StartingAppList::appl = 0; StartingAppList::StartingAppList( QObject *parent, const char* name ) :QObject( parent, name ) { +#ifdef QWS #if QT_VERSION >= 232 && !defined(QT_NO_COP) connect( qwsServer, SIGNAL( newChannel(const QString&)), this, SLOT( handleNewChannel(const QString&)) ); dict.setAutoDelete( TRUE ); #endif +#endif } void StartingAppList::add( const QString& name ) { #if QT_VERSION >= 232 && !defined(QT_NO_COP) if ( !appl ) appl = new StartingAppList; QTime *t = new QTime; @@ -164,17 +168,65 @@ static QString qpeDir() static QString dictDir() { return qpeDir() + "/etc/dict"; } /*! \class Global global.h - \brief The Global class collects application-wide global functions. + \brief The Global class provides application-wide global functions. + + The Global functions are grouped as follows: + \tableofcontents + + \section1 User Interface + + The statusMessage() function provides short-duration messages to the + user. The showInputMethod() function shows the current input method, + and hideInputMethod() hides the input method. + + \section1 Document related + + The findDocuments() function creates a set of \link doclnk.html + DocLnk\endlink objects in a particular folder. + + \section1 Filesystem related + + Global provides an applicationFileName() function that returns the + full path of an application-specific file. + + The execute() function runs an application. + + \section1 Word list related + + A list of words relevant to the current locale is maintained by the + system. The list is held in a \link qdawg.html DAWG\endlink + (implemented by the QDawg class). This list is used, for example, by + the pickboard input method. + + The global QDawg is returned by fixedDawg(); this cannot be updated. + An updatable copy of the global QDawg is returned by addedDawg(). + Applications may have their own word lists stored in \l{QDawg}s + which are returned by dawg(). Use addWords() to add words to the + updateable copy of the global QDawg or to named application + \l{QDawg}s. + + \section1 Quoting + + The shellQuote() function quotes a string suitable for passing to a + shell. The stringQuote() function backslash escapes '\' and '"' + characters. + + \section1 Hardware + + The writeHWClock() function sets the hardware clock to the system + clock's date and time. + + \ingroup qtopiaemb */ /*! \internal */ Global::Global() { } @@ -247,60 +299,70 @@ const QDawg& Global::dawg(const QString& name) { createDocDir(); if ( !named_dawg ) named_dawg = new QDict<QDawg>; QDawg* r = named_dawg->find(name); if ( !r ) { r = new QDawg; named_dawg->insert(name,r); - QString dawgfilename = dictDir() + "/" + name + ".dawg"; + QString dawgfilename = applicationFileName("Dictionary", name ) + ".dawg"; QFile dawgfile(dawgfilename); if ( dawgfile.open(IO_ReadOnly) ) r->readFile(dawgfilename); } return *r; } /*! + \overload Adds \a wordlist to the addedDawg(). + + Note that the addition of words persists between program executions + (they are saved in the dictionary files), so you should confirm the + words with the user before adding them. */ void Global::addWords(const QStringList& wordlist) { addWords("local",wordlist); } /*! - Adds \a wordlist to the dawg() named \a dictname. + \overload + Adds \a wordlist to the addedDawg(). + + Note that the addition of words persists between program executions + (they are saved in the dictionary files), so you should confirm the + words with the user before adding them. */ void Global::addWords(const QString& dictname, const QStringList& wordlist) { QDawg& d = (QDawg&)dawg(dictname); QStringList all = d.allWords() + wordlist; d.createFromWords(all); - QString dawgfilename = dictDir() + "/" + dictname + ".dawg"; + QString dawgfilename = applicationFileName("Dictionary", dictname) + ".dawg"; QFile dawgfile(dawgfilename); if ( dawgfile.open(IO_WriteOnly) ) { d.write(&dawgfile); dawgfile.close(); } // #### Re-read the dawg here if we use mmap(). // #### Signal other processes to re-read. } /*! - Returns a full path for the application named \a appname, with the - given \a filename or QString::null if there was a problem creating - the directory tree for \a appname. - If \a filename contains "/", it is the caller's responsibility to - ensure those directories exist. + Returns the full path for the application called \a appname, with the + given \a filename. Returns QString::null if there was a problem creating + the directory tree for \a appname. + If \a filename contains "/", it is the caller's responsibility to + ensure that those directories exist. */ QString Global::applicationFileName(const QString& appname, const QString& filename) { QDir d; QString r = getenv("HOME"); r += "/Applications/"; if ( !QFile::exists( r ) ) if ( d.mkdir(r) == false ) @@ -321,18 +383,18 @@ void Global::createDocDir() if ( !docDirCreated ) { docDirCreated = TRUE; mkdir( QPEApplication::documentDir().latin1(), 0755 ); } } /*! - Displays a status \a message to the user. This generally appears - in the taskbar for some amount of time, then disappears. + Displays a status \a message to the user. This usually appears + in the taskbar for a short amount of time, then disappears. */ void Global::statusMessage(const QString& message) { #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopEnvelope e( "QPE/TaskBar", "message(QString)" ); e << message; #endif } @@ -368,26 +430,38 @@ QWidget *Global::restart( bool ) #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopChannel::send( "QPE/System", "restart()" ); #endif return 0; } /*! Explicitly show the current input method. + + Input methods are indicated in the taskbar by a small icon. If the + input method is activated (shown) then it takes up some proportion + of the bottom of the screen, to allow the user to interact (input + characters) with it. + + \sa hideInputMethod() */ void Global::showInputMethod() { #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopChannel::send( "QPE/TaskBar", "showInputMethod()" ); #endif } /*! Explicitly hide the current input method. + + The current input method is still indicated in the taskbar, but no + longer takes up screen space, and can no longer be interacted with. + + \sa showInputMethod() */ void Global::hideInputMethod() { #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopChannel::send( "QPE/TaskBar", "hideInputMethod()" ); #endif } @@ -460,40 +534,46 @@ bool Global::terminateBuiltin( const QString& n ) /*! \internal */ void Global::terminate( const AppLnk* app ) { //if ( terminateBuiltin(app->exec()) ) return; // maybe? haven't tried this +#ifndef QT_NO_COP QCString channel = "QPE/Application/" + app->exec().utf8(); if ( QCopChannel::isRegistered(channel) ) { QCopEnvelope e(channel, "quit()"); } +#endif } /*! - Low-level function to run command \a c. Not recommended. + Low-level function to run command \a c. + + \warning Do not use this function. Use execute instead. + + \sa execute() */ -void Global::invoke(const QString &c) +void Global::invoke(const QString &c) { // Convert the command line in to a list of arguments QStringList list = QStringList::split(QRegExp(" *"),c); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QString ap=list[0]; // see if the application is already running - // XXX should lock file /tmp/qcop-msg-ap + // XXX should lock file /tmp/qcop-msg-ap if ( QCopChannel::isRegistered( ("QPE/Application/" + ap).latin1() ) ) { QCopEnvelope e("QPE/System", "notBusy(QString)" ); e << ap; return; } - // XXX should unlock file /tmp/qcop-msg-ap + // XXX should unlock file /tmp/qcop-msg-ap //see if it is being started if ( StartingAppList::isStarting( ap ) ) { QCopEnvelope e("QPE/System", "notBusy(QString)" ); e << ap; return; } #endif @@ -519,38 +599,40 @@ void Global::invoke(const QString &c) #endif #ifdef HAVE_QUICKEXEC QString libexe = qpeDir()+"/binlib/lib"+args[0] + ".so"; qDebug("libfile = %s", libexe.latin1() ); if ( QFile::exists( libexe ) ) { qDebug("calling quickexec %s", libexe.latin1() ); quickexecv( libexe.utf8().data(), (const char **)args ); - } else + } else #endif { if ( !::vfork() ) { for ( int fd = 3; fd < 100; fd++ ) ::close( fd ); ::setpgid( ::getpid(), ::getppid() ); // Try bindir first, so that foo/bar works too ::execv( qpeDir()+"/bin/"+args[0], (char * const *)args ); ::execvp( args[0], (char * const *)args ); _exit( -1 ); } } StartingAppList::add( list[0] ); #endif //QT_NO_QWS_MULTIPROCESS } + /*! - Executes application identfied by \a c, passing \a document. + Executes the application identfied by \a c, passing \a + document if it isn't null. - Note that you might be better off sending a QCop message to - the application's QPE/Application/<i>appname</i> channel. + Note that a better approach might be to send a QCop message to the + application's QPE/Application/\e{appname} channel. */ void Global::execute( const QString &c, const QString& document ) { if ( qApp->type() != QApplication::GuiServer ) { // ask the server to do the work #if defined(Q_WS_QWS) && !defined(QT_NO_COP) if ( document.isNull() ) { QCopEnvelope e( "QPE/System", "execute(QString)" ); @@ -572,50 +654,55 @@ void Global::execute( const QString &c, const QString& document ) if ( !document.isNull() && builtin[i].documentary ) setDocument(running[i], document); running[i]->raise(); running[i]->show(); running[i]->setActiveWindow(); } else { running[i] = builtin[i].func( builtin[i].maximized ); } +#ifndef QT_NO_COP QCopEnvelope e("QPE/System", "notBusy(QString)" ); e << c; // that was quick ;-) +#endif return; } } } //Global::invoke(c, document); // Convert the command line in to a list of arguments QStringList list = QStringList::split(QRegExp(" *"),c); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QString ap=list[0]; qDebug("executing %s", ap.latin1() ); if ( ap == "suspend" ) { - QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE ); + QWSServer::sendKeyEvent( 0xffff, Qt::Key_F34, FALSE, TRUE, FALSE ); return; } - /* if need be, sending a qcop message will result in an invoke, see + /* if need be, sending a qcop message will result in an invoke, see preceeding function */ - { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } + invoke( ap ); + //{ QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "raise()" ); } if ( !document.isEmpty() ) { QCopEnvelope env( ("QPE/Application/" + ap).latin1(), "setDocument(QString)" ); env << document; } #endif } /*! - Returns the string \a s with the characters backslash, ", and $ - quoted by a preceeding backslash. + Returns the string \a s with the characters '\', '"', and '$' quoted + by a preceeding '\'. + + \sa stringQuote() */ QString Global::shellQuote(const QString& s) { QString r="\""; for (int i=0; i<(int)s.length(); i++) { char c = s[i].latin1(); switch (c) { case '\\': case '"': case '$': @@ -623,18 +710,20 @@ QString Global::shellQuote(const QString& s) } r += s[i]; } r += "\""; return r; } /*! - Returns the string \a s with the characters backslash and " - quoted by a preceeding backslash. + Returns the string \a s with the characters '\' and '"' quoted by a + preceeding '\'. + + \sa shellQuote() */ QString Global::stringQuote(const QString& s) { QString r="\""; for (int i=0; i<(int)s.length(); i++) { char c = s[i].latin1(); switch (c) { case '\\': case '"': @@ -656,31 +745,31 @@ void Global::findDocuments(DocLnkSet* folder, const QString &mimefilter) QString homedocs = QString(getenv("HOME")) + "/Documents"; DocLnkSet d(homedocs,mimefilter); folder->appendFrom(d); /** let's do intellegint way of searching these files * a) the user don't want to check mediums global * b) the user wants to check but use the global options for it * c) the user wants to check it but not this medium * d) the user wants to check and this medium as well - * - * In all cases we need to apply a different mimefilter to + * + * In all cases we need to apply a different mimefilter to * the medium. * a) mimefilter.isEmpty() we need to apply the responding filter * either the global or the one on the medium * * b) mimefilter is set to an application we need to find out if the * mimetypes are included in the mime mask of the medium */ StorageInfo storage; const QList<FileSystem> &fs = storage.fileSystems(); QListIterator<FileSystem> it ( fs ); for ( ; it.current(); ++it ) { if ( (*it)->isRemovable() ) { // let's find out if we should search on it - // this is a candidate look at the cf and see if we should search on it + // this is a candidate look at the cf and see if we should search on it QString path = (*it)->path(); if( !checkStorage((*it)->path() + "/.opiestorage.cf" ) ) continue; DocLnkSet ide( path, mimefilter ); folder->appendFrom(ide); } else if ( (*it)->disk() == "/dev/mtdblock6" || (*it)->disk() == "tmpfs" ) { QString path = (*it)->path() + "/Documents"; DocLnkSet ide( path, mimefilter ); @@ -708,23 +797,17 @@ QStringList Global::helpPath() QStringList path; QStringList langs = Global::languageList(); for (QStringList::ConstIterator it = langs.fromLast(); it!=langs.end(); --it) { QString lang = *it; if ( !lang.isEmpty() ) path += QPEApplication::qpeDir() + "/help/" + lang + "/html"; } path += QPEApplication::qpeDir() + "/pics"; - path += QPEApplication::qpeDir() + "/help/en/html"; + path += QPEApplication::qpeDir() + "/help/html"; path += QPEApplication::qpeDir() + "/docs"; - QString dir = QDir::current().canonicalPath(); - if ( dir == "/" ) - dir += "/docs"; - else { - path += dir + "/../pics"; - dir += "/../docs"; - path += dir; - } + + return path; } #include "global.moc" diff --git a/library/global.h b/library/global.h index fdf8754..1136b12 100644 --- a/library/global.h +++ b/library/global.h @@ -1,13 +1,12 @@ /********************************************************************** -** Copyright (C) 2002 Holger 'zecke' Freyther <freyther@kde.org> -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -41,30 +40,27 @@ public: static void addWords(const QStringList& word); static void addWords(const QString& dictname, const QStringList& word); // static void removeWords(const QStringList& word); -- if someone wants it static void createDocDir(); static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null); - // we don't need a mimefilter. Same as above but this is fast as light speed or not ;) - //static void findNewDocuments( DocLnkSet* folder ); static QString applicationFileName(const QString& appname, const QString& filename); struct Command { const char *file; QWidget *(*func)( bool ); bool maximized; bool documentary; }; static void setBuiltinCommands( Command* ); - static void invoke( const QString &exec); static void execute( const QString &exec, const QString &document=QString::null ); static void setDocument( QWidget* receiver, const QString& document ); static bool terminateBuiltin( const QString& ); static void terminate( const AppLnk* ); static bool isBuiltinCommand( const QString &name ); // system messaging @@ -81,13 +77,14 @@ public: static QString stringQuote(const QString& s); #ifdef QTOPIA_INTERNAL_LANGLIST static QStringList languageList(); static QStringList helpPath(); #endif private: + static void invoke( const QString &exec); static Command* builtin; static QGuardedPtr<QWidget> *running; }; #endif diff --git a/library/imagecodecinterface.h b/library/imagecodecinterface.h new file mode 100644 index 0000000..8306b68 --- a/dev/null +++ b/library/imagecodecinterface.h @@ -0,0 +1,39 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of the Qtopia Environment. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#ifndef IMAGECODECINTERFACE_H +#define IMAGECODECINTERFACE_H + +#include <qstringlist.h> +#include <qpe/qcom.h> + +#ifndef QT_NO_COMPONENT +#ifndef IID_QtopiaImageCodec +#define IID_QtopiaImageCodec QUuid(0x09bf6906, 0x1549, 0xbb4a, 0x18, 0xba, 0xb9, 0xe7, 0x0a, 0x6e, 0x4d, 0x1e) +#endif +#endif + +struct ImageCodecInterface : public QUnknownInterface +{ +public: + virtual QStringList keys() const = 0; + virtual bool installIOHandler( const QString &format ) = 0; +}; + +#endif diff --git a/library/imageedit.cpp b/library/imageedit.cpp index 0c22448..caa538a 100644 --- a/library/imageedit.cpp +++ b/library/imageedit.cpp @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -15,17 +15,17 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "imageedit.h" #include <qpainter.h> -ImageEdit::ImageEdit( QWidget *parent, const char *name ) +ImageEdit::ImageEdit( QWidget *parent, const char *name) : QScrollView( parent, name, WNorthWestGravity | WResizeNoErase ), buffer() { buffer.resize( size() ); buffer.fill( colorGroup().color( QColorGroup::Base ) ); } ImageEdit::~ImageEdit() { diff --git a/library/imageedit.h b/library/imageedit.h index ccedbcd..780aac9 100644 --- a/library/imageedit.h +++ b/library/imageedit.h @@ -1,12 +1,12 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/library/inlinepics_p.h b/library/inlinepics_p.h index c3b5ad1..52d184b 100644 --- a/library/inlinepics_p.h +++ b/library/inlinepics_p.h @@ -1,30 +1,30 @@ -#ifndef _1804289383 -#define _1804289383 +/* Generated by qembed */ +#ifndef _1733461185 +#define _1733461185 #include <qimage.h> -#include <qdict.h> +#include <stdlib.h> static const QRgb _to1_data[] = { 0x2000000,0x5000000,0x9000000,0xd000000,0x11000000,0x12000000,0xe000000,0xc000000,0xc000000,0xc000000,0xd000000,0x11000000,0x12000000,0xe000000, 0x6000000,0xf000000,0x1d000000,0x3a000000,0x4c000000,0x39000000,0x21000000,0x1c000000,0x1c000000,0x22000000,0x3a000000,0x4c000000,0x39000000,0x1f000000, - 0x10000000,0x25000000,0x51000000,0xb4595959,0xffffffff,0x76000000,0x42000000,0x3b000000,0x3e000000,0x5b000000,0xb4595959,0xffffffff,0x72000000,0x38000000, - 0x1e000000,0x54000000,0xbc555555,0xffffffff,0xffffffff,0xa6000000,0x6d000000,0x65000000,0x7a000000,0xc4525252,0xffffffff,0xffffffff,0x9d000000,0x57000000, - 0x45000000,0xb5595959,0xffffffff,0xffffffff,0xffffffff,0xcf000000,0xaa000000,0xa3000000,0xce4e4e4e,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x74000000, - 0x88767676,0xffffffff,0xf4999999,0xffffffff,0xffffffff,0xf2424242,0xffffffff,0xdc494949,0xffffffff,0xf7979797,0xffffffff,0xffffffff,0xcd000000,0x8a000000, - 0x48000000,0x84000000,0xc6000000,0xffffffff,0xffffffff,0xfa404040,0xf9c6c6c6,0xd5000000,0xcd000000,0xdd000000,0xffffffff,0xffffffff,0xd9000000,0x97000000, + 0x10000000,0x25000000,0x51000000,0xb46b6b6b,0xffffffff,0x76000000,0x42000000,0x3b000000,0x3e000000,0x5b000000,0xb46b6b6b,0xffffffff,0x72000000,0x38000000, + 0x1e000000,0x54000000,0xbc676767,0xffffffff,0xffffffff,0xa6000000,0x6d000000,0x65000000,0x7a000000,0xc4646464,0xffffffff,0xffffffff,0x9d000000,0x57000000, + 0x45000000,0xb56b6b6b,0xffffffff,0xffffffff,0xffffffff,0xcf000000,0xaa000000,0xa3000000,0xce606060,0xffffffff,0xffffffff,0xffffffff,0xb8000000,0x74000000, + 0x88878787,0xffffffff,0xf4a7a7a7,0xffffffff,0xffffffff,0xf2535353,0xffffffff,0xdc5b5b5b,0xffffffff,0xf7a5a5a5,0xffffffff,0xffffffff,0xcd000000,0x8a000000, + 0x48000000,0x84000000,0xc6000000,0xffffffff,0xffffffff,0xfa515151,0xf9cfcfcf,0xd5000000,0xcd000000,0xdd000000,0xffffffff,0xffffffff,0xd9000000,0x97000000, 0x2c000000,0x5e000000,0xb1000000,0xffffffff,0xffffffff,0xf8000000,0xdc000000,0xcc000000,0xc3000000,0xd3000000,0xffffffff,0xffffffff,0xdb000000,0x9a000000, 0x25000000,0x53000000,0xa7000000,0xffffffff,0xffffffff,0xf0000000,0xd2000000,0xc2000000,0xb6000000,0xc8000000,0xffffffff,0xffffffff,0xd3000000,0x92000000, - 0x1d000000,0x44000000,0x99000000,0xffffffff,0xffffffff,0xf1434343,0xf5c9c9c9,0xbc000000,0xa3000000,0xba000000,0xffffffff,0xffffffff,0xc4000000,0x83000000, - 0x14000000,0x34000000,0x7d000000,0xffffffff,0xffffffff,0xe5464646,0xffffffff,0xab000000,0x8c000000,0x9e000000,0xffffffff,0xffffffff,0xa8000000,0x6e000000, + 0x1d000000,0x44000000,0x99000000,0xffffffff,0xffffffff,0xf1545454,0xf5d1d1d1,0xbc000000,0xa3000000,0xba000000,0xffffffff,0xffffffff,0xc4000000,0x83000000, + 0x14000000,0x34000000,0x7d000000,0xffffffff,0xffffffff,0xe5585858,0xffffffff,0xab000000,0x8c000000,0x9e000000,0xffffffff,0xffffffff,0xa8000000,0x6e000000, 0xc000000,0x25000000,0x4d000000,0x84000000,0xa0000000,0xa2000000,0x92000000,0x7f000000,0x6c000000,0x6f000000,0x88000000,0x94000000,0x79000000,0x56000000, 0x8000000,0x18000000,0x2a000000,0x41000000,0x58000000,0x5e000000,0x55000000,0x50000000,0x4a000000,0x43000000,0x45000000,0x4e000000,0x49000000,0x39000000, 0x5000000,0xf000000,0x19000000,0x28000000,0x36000000,0x3b000000,0x36000000,0x34000000,0x2f000000,0x2a000000,0x2b000000,0x30000000,0x2c000000,0x22000000 }; -/* Generated by qembed */ static const QRgb AddressBook_data[] = { 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000, 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff040437,0xff040437,0xff040437,0xff040434, 0xff04042f,0xff030327,0xff05043c,0xff070565,0xff0a068a,0xff0a068a,0xff080574,0xff07055c,0xff06044c,0xff06044b,0xff05044a,0xff080569,0xff090682,0xff0a068a, 0xff0a068a,0xff080567,0xff03032c,0xff01030b,0xff010309,0xff010307,0xff010303,0xff010300,0xff010300,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000, @@ -173,24 +173,24 @@ static const QRgb Appearance_data[] = { 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000, 0xffffff,0xffffff }; static const QRgb AppsIcon_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0x6c000000,0x5c000000,0xff000000,0xff000000,0xff000000,0xff000000,0x24000000,0xc000000, - 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0x9c000000,0x6c000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x6b000000,0x24000000, - 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x8f000000,0x30000000, - 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000, + 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000, 0xffffff,0xffffff,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x9c000000,0x6c000000,0x6c000000,0x9c000000,0xb4000000,0xb4000000,0x6b000000,0x24000000, 0xffffff,0xffffff,0x5c000000,0x6c000000,0x74000000,0x74000000,0x6c000000,0x5c000000,0x5c000000,0x6c000000,0x74000000,0x74000000,0x24000000,0xc000000, - 0xffffff,0xffffff,0xff000000,0xff99cc00,0xff99cc00,0xff99cc00,0x6c000000,0x5c000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x24000000,0xc000000, - 0xffffff,0xffffff,0xff000000,0xff99cc00,0xff99cc00,0xff99cc00,0x9c000000,0x6c000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x6b000000,0x24000000, - 0xffffff,0xffffff,0xff000000,0xff99cc00,0xff99cc00,0xff99cc00,0xb4000000,0x74000000,0xff99cc00,0xff99cc00,0xff99cc00,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x6c000000,0x5c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x24000000,0xc000000, + 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0x9c000000,0x6c000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x6b000000,0x24000000, + 0xffffff,0xffffff,0xff000000,0xffa7d400,0xffa7d400,0xffa7d400,0xb4000000,0x74000000,0xffa7d400,0xffa7d400,0xffa7d400,0xff000000,0x8f000000,0x30000000, 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xb4000000,0x74000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000, 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x6b000000,0x24000000, 0xffffff,0xffffff,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000,0xc000000,0x24000000,0x30000000,0x30000000,0x24000000,0xc000000 }; static const QRgb Calculator_data[] = { 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 0x1f000000,0x1f000000,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x20080808,0x1d000000,0x1b000000, @@ -496,27 +496,27 @@ static const QRgb Clock_data[] = { 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 0x18000000,0xf000000 }; static const QRgb CloseButton_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0x3ed5d5d5,0x93d4d4d4,0xd5d8d8d8,0xfad5d5d5,0xd8c8c8c8,0x9ebebebe,0x508e8e8e,0xc000000,0x3000000,0xffffff,0xffffff, - 0xffffff,0xffffff,0x60d5d5d5,0xdbdddddd,0xffdcdcdc,0xffcbcbcb,0xffc5c5c5,0xffc4c4c4,0xffd0d0d0,0xe6bbbbbb,0x837d7d7d,0x18000000,0x4000000,0xffffff, - 0xffffff,0x3ed6d5d5,0xdbd3d3d3,0xffc1c1c1,0xff262626,0xff777777,0xffb7b6b7,0xff767576,0xff252525,0xffa4a5a4,0xec8f8e8f,0x75474747,0x18000000,0x3000000, - 0xffffff,0x94cdcecd,0xffc8c7c7,0xff7b7b7b,0xff000000,0xff000000,0xff484848,0xff000000,0xff000000,0xff757675,0xff9d9c9c,0xc84f4f4f,0x3d000000,0xc000000, - 0xffffff,0xd5c2c2c2,0xffafafaf,0xffa0a0a0,0xff686868,0xff000000,0xff000000,0xff000000,0xff656565,0xffa4a4a4,0xffa4a4a4,0xef4f4f4f,0x61000000,0x1a000000, - 0xffffff,0xfab4b4b4,0xff9d9d9d,0xff959595,0xff696969,0xff000000,0xff000000,0xff000000,0xff626262,0xffa1a1a1,0xff939393,0xfd4b4b4b,0x7c000000,0x25000000, - 0xffffff,0xd9a3a3a3,0xff919191,0xff6c6c6c,0xff000000,0xff000000,0xff393939,0xff000000,0xff000000,0xff696969,0xff7b7b7b,0xf2373737,0x85000000,0x2b000000, - 0xffffff,0xa0848484,0xff8c8c8b,0xff858686,0xff292929,0xff585858,0xff929291,0xff5c5c5c,0xff262626,0xff868786,0xff585758,0xdf272727,0x7c000000,0x25000000, - 0xffffff,0x515d5d5d,0xe7707070,0xff7c7c7c,0xff848484,0xff898a8a,0xff8c8c8c,0xff8f8f8f,0xff7f7f7f,0xff616061,0xf5313131,0xbb101010,0x61000000,0x1a000000, - 0xffffff,0xc000000,0x843f3f3f,0xed505050,0xff5d5c5c,0xff6a6a69,0xff6c6c6c,0xff646364,0xff515051,0xf5313130,0xcd141414,0x83000000,0x3d000000,0xc000000, - 0xffffff,0x3000000,0x18000000,0x76212121,0xc92b2b2b,0xf0303030,0xfd353535,0xf32a2a2a,0xdf1d1d1d,0xbb0d0d0d,0x83000000,0x4b000000,0x18000000,0x3000000, + 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff, + 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff, + 0xffffff,0x3edddcdc,0xdbdadada,0xffcbcbcb,0xff353535,0xff888888,0xffc2c1c2,0xff878687,0xff343434,0xffb1b2b1,0xec9e9d9e,0x75595959,0x18000000,0x3000000, + 0xffffff,0x94d5d6d5,0xffd1d0d0,0xff8c8c8c,0xff000000,0xff000000,0xff5a5a5a,0xff000000,0xff000000,0xff868786,0xffabaaaa,0xc8616161,0x3d000000,0xc000000, + 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff777777,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000, + 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xff7a7a7a,0xff000000,0xff000000,0xff000000,0xff747474,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000, + 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xff7d7d7d,0xff000000,0xff000000,0xff4a4a4a,0xff000000,0xff000000,0xff7a7a7a,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000, + 0xffffff,0xa0949494,0xff9b9b9a,0xff959696,0xff383838,0xff6a6a6a,0xffa1a1a0,0xff6e6e6e,0xff353535,0xff969796,0xff6a696a,0xdf363636,0x7c000000,0x25000000, + 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff999a9a,0xff9b9b9b,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000, + 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff7b7b7a,0xff7d7d7d,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000, + 0xffffff,0x3000000,0x18000000,0x762f2f2f,0xc93b3b3b,0xf0404040,0xfd464646,0xf3393939,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000, 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff, 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff }; static const QRgb DateBook_data[] = { 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000, @@ -666,411 +666,411 @@ static const QRgb DateTime_data[] = { 0x16000000,0x23000000,0x33000000,0x45000000,0x56000000,0x67000000,0x75000000,0x81000000,0x89000000,0x8e000000,0x90000000,0x8e000000,0x89000000,0x81000000, 0x75000000,0x67000000,0x56000000,0x45000000,0x33000000,0x23000000,0x16000000,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff, 0xffffff,0x1000000,0x2000000,0x5000000,0xa000000,0x11000000,0x1b000000,0x26000000,0x33000000,0x3f000000,0x4a000000,0x53000000,0x59000000,0x5e000000, 0x5f000000,0x5e000000,0x59000000,0x53000000,0x4a000000,0x3f000000,0x33000000,0x26000000,0x1b000000,0x11000000,0xa000000,0x5000000,0x2000000,0x1000000, 0xffffff,0xffffff }; static const QRgb DocsIcon_data[] = { - 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff555555,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdfdfdf,0xffb3b3b3,0xffffffff,0xff555555,0x3c000000,0xc000000,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffd4d4d4,0xff898989,0xffffffff,0xffffffff,0xff555555,0x3c000000,0xc000000,0xffffff,0xffffff, - 0xffffff,0xffffff,0xff000000,0xfffdfdfd,0xfffdfdfd,0xffd2d2d2,0xff7d7d7d,0xffffffff,0xffffffff,0xffffffff,0xff555555,0x3c000000,0xc000000,0xffffff, - 0xffffff,0xffffff,0xff000000,0xfffbfbfb,0xfffbfbfb,0xffd0d0d0,0xff7b7b7b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff555555,0x3c000000,0xc000000, - 0xffffff,0xffffff,0xff000000,0xfff8f8f8,0xfff6f6f6,0xffd6d6d6,0xff999999,0xff797979,0xff797979,0xff848484,0xffaeaeae,0xff000000,0x77000000,0x24000000, - 0xffffff,0xffffff,0xff000000,0xfff3f3f3,0xfff1f1f1,0xffe5e5e5,0xffd0d0d0,0xffc6c6c6,0xffc7c7c7,0xffc8c8c8,0xffd5d5d5,0xff000000,0x8f000000,0x30000000, - 0xffffff,0xffffff,0xff000000,0xffededed,0xffe9e9e9,0xffe7e7e7,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe9e9e9,0xffededed,0xff000000,0x8f000000,0x30000000, - 0xffffff,0xffffff,0xff000000,0xffe7e7e7,0xffe2e2e2,0xffdedede,0xffdcdcdc,0xffdcdcdc,0xffdedede,0xffe2e2e2,0xffe7e7e7,0xff000000,0x8f000000,0x30000000, - 0xffffff,0xffffff,0xff000000,0xffe0e0e0,0xffdadada,0xffd5d5d5,0xffd3d3d3,0xffd3d3d3,0xffd5d5d5,0xffdadada,0xffe0e0e0,0xff000000,0x8f000000,0x30000000, - 0xffffff,0xffffff,0xff000000,0xffd9d9d9,0xffd1d1d1,0xffcbcbcb,0xffc8c8c8,0xffc8c8c8,0xffcbcbcb,0xffd1d1d1,0xffd9d9d9,0xff000000,0x8f000000,0x30000000, - 0xffffff,0xffffff,0xff000000,0xffd9d9d9,0xffd1d1d1,0xffcbcbcb,0xffc8c8c8,0xffc8c8c8,0xffcbcbcb,0xffd1d1d1,0xffd9d9d9,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff676767,0x24000000,0xc000000,0xffffff,0xffffff,0xffffff,0xffffff, + 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffe4e4e4,0xffbebebe,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff,0xffffff, + 0xffffff,0xffffff,0xff000000,0xffffffff,0xffffffff,0xffdbdbdb,0xff999999,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff,0xffffff, + 0xffffff,0xffffff,0xff000000,0xfffdfdfd,0xfffdfdfd,0xffd9d9d9,0xff8d8d8d,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000,0xffffff, + 0xffffff,0xffffff,0xff000000,0xfffcfcfc,0xfffcfcfc,0xffd7d7d7,0xff8c8c8c,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xff676767,0x3c000000,0xc000000, + 0xffffff,0xffffff,0xff000000,0xfff9f9f9,0xfff8f8f8,0xffdddddd,0xffa7a7a7,0xff8a8a8a,0xff8a8a8a,0xff949494,0xffbababa,0xff000000,0x77000000,0x24000000, + 0xffffff,0xffffff,0xff000000,0xfff5f5f5,0xfff3f3f3,0xffe9e9e9,0xffd7d7d7,0xffcfcfcf,0xffd0d0d0,0xffd1d1d1,0xffdcdcdc,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xfff0f0f0,0xffededed,0xffebebeb,0xffe9e9e9,0xffe9e9e9,0xffebebeb,0xffededed,0xfff0f0f0,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffebebeb,0xffe7e7e7,0xffe3e3e3,0xffe2e2e2,0xffe2e2e2,0xffe3e3e3,0xffe7e7e7,0xffebebeb,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffe5e5e5,0xffe0e0e0,0xffdcdcdc,0xffdadada,0xffdadada,0xffdcdcdc,0xffe0e0e0,0xffe5e5e5,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,0xff000000,0x8f000000,0x30000000, + 0xffffff,0xffffff,0xff000000,0xffdfdfdf,0xffd8d8d8,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffd3d3d3,0xffd8d8d8,0xffdfdfdf,0xff000000,0x8f000000,0x30000000, 0xffffff,0xffffff,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x8f000000,0x30000000, 0xffffff,0xffffff,0x24000000,0x6b000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x8f000000,0x6b000000,0x24000000 }; static const QRgb DocumentTypeExcel_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, - 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, - 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, - 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, - 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, - 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, - 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x2000200,0x6000200,0xd000200,0x18000200,0x29000200, - 0x3f000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, - 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0xffffff,0xffffff,0x1000200,0x2000200, - 0x6000200,0xe000200,0x1b000200,0x2d000200,0x45000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff9f9f9, - 0xfff2f2f2,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, - 0xffffff,0xffffff,0x1000200,0x2000200,0x7000200,0xf000200,0x1d000200,0x30000200,0x4a000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff7f7f7,0xfff0f0f0,0xffe2e2e2,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, - 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200,0x10000200,0x1e000200,0x32000200,0x4d000200,0xff000000, - 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff7f7f7,0xfff0f0f0,0xffe1e1e1,0xffc8c8c8,0xffa6a6a6,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, - 0x27000000,0x3b000000,0x55000300,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff4f4f4,0xffefefef,0xffe4e4e4, - 0xffcccccc,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0x4000000,0x7000000, - 0xd000000,0x16000000,0x1e000000,0x2a000000,0x39000000,0x4d000000,0x65000000,0xff000000,0xffdedede,0xffdedede,0xffe0e0e0,0xffe3e3e3,0xffe3e3e3,0xffe7e7e7, - 0xffececec,0xfff0f0f0,0xffededed,0xffe6e6e6,0xffd7d7d7,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, - 0x6a000200,0x4e000200,0x7000000,0xf000000,0x1b000000,0x2b000000,0x39000000,0x49000000,0x58000000,0x69000000,0x7e000200,0xff000000,0xffb9b9b9,0xffb9b9b9, - 0xffbcbcbc,0xffc3c3c3,0xffcbcbcb,0xffd4d4d4,0xffe1e1e1,0xffe8e8e8,0xffececec,0xffececec,0xffe2e2e2,0xffbbbbbb,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, - 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0xc000000,0x19000000,0xffee5358,0xffe84f53,0xffec8689,0xffe05a5e,0xffd84045,0xffdc5257, - 0xffe47a7d,0xffd43337,0xffde5b60,0xffe16e72,0xffdb3a3f,0xffdc1c21,0xffdd191f,0xffbababa,0xffd0d0d0,0xffe0e0e0,0xffebebeb,0xffefefef,0xffc6c6c6,0xff919191, - 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x12000000,0x26000000,0xffea5054,0xffee9a9c, - 0xffffffff,0xffe9b1b3,0xffc2363a,0xffe6aeaf,0xffffffff,0xffd98689,0xffe9b6b7,0xffffffff,0xffd66669,0xffca171c,0xffce171d,0xff999999,0xffbcbcbc,0xffd5d5d5, - 0xffe8e8e8,0xffd2d2d2,0xff9d9d9d,0xff8b8b8b,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, - 0x17000000,0x2f000000,0xffe84c50,0xffde5b5f,0xfffefafa,0xfffefbfb,0xffbe6366,0xfffdfbfb,0xfffdfafa,0xffad3a3e,0xffe1b3b4,0xffffffff,0xffc66265,0xffb71519, - 0xffbf161a,0xff818181,0xffaaaaaa,0xffcecece,0xffd8d8d8,0xffb1b1b1,0xff9a9a9a,0xffa8a8a8,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, - 0xff909090,0xff000000,0x8b000200,0x6a000200,0x1b000000,0x37000000,0xffe8484d,0xffd63f44,0xffe8b3b4,0xffffffff,0xfff1e2e3,0xffffffff,0xffd3a9aa,0xff8f171a, - 0xffdcb1b2,0xffffffff,0xffbb6163,0xffa71317,0xffb31519,0xff6d6d6d,0xff9e9e9e,0xffc5c5c5,0xffc1c1c1,0xffa6a6a6,0xffa4a4a4,0xffdedede,0xfff9f9f9,0xfff6f6f6, - 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x1d000000,0x3c000000,0xffe84449,0xffd83b3f,0xffca5053,0xfffefcfc, - 0xffffffff,0xfffdfcfc,0xff91383a,0xff851114,0xffd9afb0,0xffffffff,0xffb46062,0xff9c1215,0xffaa1317,0xff616161,0xff979797,0xffbebebe,0xffb5b5b5,0xffa5a5a5, - 0xffbbbbbb,0xfff3f3f3,0xfffafafa,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x1f000000,0x3e000000, - 0xffea3f44,0xffdb373b,0xffc12c30,0xfff4e7e7,0xffffffff,0xfff0e5e5,0xff781012,0xff810f12,0xffd7afb0,0xffffffff,0xffb16062,0xff961115,0xffa41216,0xff5c5c5c, - 0xff939393,0xffbbbbbb,0xffaeaeae,0xffa5a5a5,0xffc5c5c5,0xfffcfcfc,0xfffbfbfb,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, - 0x90000200,0x6e000200,0x1f000000,0x3d000000,0xffec3b40,0xffdb3236,0xffcf5256,0xfffffefe,0xffffffff,0xfffefefe,0xff913e40,0xff7e0e11,0xffd6afb0,0xffffffff, - 0xffad5f62,0xff901114,0xff9d1216,0xff5b5b5b,0xff929292,0xffbbbbbb,0xffb1b1b1,0xffa1a1a1,0xffbcbcbc,0xfff8f8f8,0xffb0b0b0,0xff757575,0xff6d6d6d,0xff656565, - 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3e000000,0xffe9353a,0xffd92c31,0xffecbfc1,0xffffffff,0xfff3e9e9,0xffffffff, - 0xffd6baba,0xff770e11,0xffd4afb0,0xffffffff,0xffa85e60,0xff850f13,0xff931114,0xff595959,0xff909090,0xffbdbdbd,0xffbcbcbc,0xff9a9a9a,0xff9f9f9f,0xffe6e6e6, - 0xffadadad,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3e000000,0xffe82e32,0xffdf575b, - 0xffffffff,0xffffffff,0xffaf6a6c,0xffffffff,0xffffffff,0xff954548,0xffd3afb0,0xffffffff,0xffe0c9ca,0xffd4afb0,0xff8b1013,0xff585858,0xff8e8e8e,0xffbdbdbd, - 0xffcccccc,0xff9a9a9a,0xff848484,0xffa8a8a8,0xffededed,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, - 0x1d000000,0x3c000000,0xffe5262c,0xffe2696d,0xfffcf6f6,0xffe5bfc0,0xff850f12,0xffdcbebf,0xfffaf6f6,0xffa75f61,0xffd3afb0,0xffffffff,0xffffffff,0xffffffff, - 0xff860f12,0xff5b5b5b,0xff919191,0xffbcbcbc,0xffdedede,0xffbbbbbb,0xff7c7c7c,0xff707070,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, - 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000000,0x37000000,0xffe42025,0xffd5181e,0xffc3262b,0xffb13033,0xff941115,0xff9c2d31,0xff8f2024,0xff860f12, - 0xff850f13,0xff7e0e12,0xff7d0e11,0xff820f12,0xff881013,0xff686868,0xff979797,0xffbfbfbf,0xffdfdfdf,0xffebebeb,0xffababab,0xff6c6c6c,0xff646464,0xff676767, - 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x17000000,0x2f000000,0xffe41a20,0xffd4181d,0xffc4161c,0xffb41419, - 0xffa61317,0xffa21217,0xff9b1215,0xff981215,0xff951115,0xff8f1114,0xff8d1013,0xff8e1014,0xff911015,0xff7c7c7c,0xffa5a5a5,0xffc8c8c8,0xffdedede,0xfff0f0f0, - 0xfff3f3f3,0xffbdbdbd,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x12000000,0x26000000, - 0x41000000,0x64000000,0x7f000000,0x98000000,0xa9000000,0xb5000000,0xbf000000,0xff000000,0xff5c5c5c,0xff5b5b5b,0xff616161,0xff6c6c6c,0xff7d7d7d,0xff989898, - 0xffb8b8b8,0xffd0d0d0,0xffe4e4e4,0xffececec,0xfff5f5f5,0xfff8f8f8,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, - 0x8e000200,0x6d000200,0xc000000,0x18000000,0x2b000000,0x41000000,0x55000000,0x68000000,0x78000000,0x88000000,0x98000000,0xff000000,0xff949494,0xff939393, - 0xff979797,0xff9f9f9f,0xffaaaaaa,0xffbababa,0xffcecece,0xffdedede,0xffe9e9e9,0xffefefef,0xfff2f2f2,0xfff3f3f3,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, - 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x43000000,0x52000000,0x63000000, - 0x76000000,0xff000000,0xffc2c2c2,0xffc2c2c2,0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd5d5d5,0xffe1e1e1,0xffe8e8e8,0xffefefef,0xfff3f3f3,0xfff4f4f4,0xfff4f4f4, - 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000000,0x7000000,0xd000000,0x14000000, - 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000300,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8,0xffeeeeee,0xfff1f1f1, - 0xfff3f3f3,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, - 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6, - 0xfff7f7f7,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xffffffff,0xff000000,0x73000200,0x58000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000, + 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500, + 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500, + 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500, + 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, + 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, + 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500, + 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e, + 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500, + 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6, + 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500, + 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa, + 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500, + 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545, + 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000, + 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, + 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8, + 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000, + 0xd000000,0x16000000,0x1e000000,0x2a000000,0x39000000,0x4d000000,0x65000000,0xff000000,0xffe3e3e3,0xffe3e3e3,0xffe5e5e5,0xffe8e8e8,0xffe8e8e8,0xffebebeb, + 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e, + 0x6a000500,0x4e000500,0x7000000,0xf000000,0x1b000000,0x2b000000,0x39000000,0x49000000,0x58000000,0x69000000,0x7e000500,0xff000000,0xffc4c4c4,0xffc4c4c4, + 0xffc6c6c6,0xffcccccc,0xffd3d3d3,0xffdbdbdb,0xffe6e6e6,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b, + 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xfff1656a,0xffec6165,0xffef9699,0xffe56c70,0xffde5157,0xffe26469, + 0xffe88b8d,0xffdb4348,0xffe36d72,0xffe67f83,0xffe14b50,0xffe2292f,0xffe3252d,0xffc4c4c4,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0, + 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xffee6266,0xfff1a8aa, + 0xffffffff,0xffedbdbe,0xffcb474b,0xffeababb,0xffffffff,0xffdf9699,0xffedc1c2,0xffffffff,0xffdd787a,0xffd22329,0xffd6232a,0xffa7a7a7,0xffc6c6c6,0xffdcdcdc, + 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500, + 0x17000000,0x2f000000,0xffec5e62,0xffe36d71,0xfffefbfb,0xfffefcfc,0xffc87578,0xfffdfcfc,0xfffdfbfb,0xffb94b4f,0xffe6bebf,0xffffffff,0xffcf7477,0xffc22025, + 0xffc92227,0xff919191,0xffb6b6b6,0xffd6d6d6,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7, + 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x37000000,0xffec5a5f,0xffdd5056,0xffecbebf,0xffffffff,0xfff3e7e8,0xffffffff,0xffdab6b6,0xff9e2327, + 0xffe2bdbd,0xffffffff,0xffc57375,0xffb41e23,0xffbe2025,0xff7e7e7e,0xffacacac,0xffcecece,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8, + 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3c000000,0xffec565b,0xffde4c50,0xffd26265,0xfffefdfd, + 0xffffffff,0xfffdfdfd,0xffa0494b,0xff951b1f,0xffdfbbbc,0xffffffff,0xffbf7274,0xffaa1d20,0xffb61e23,0xff737373,0xffa5a5a5,0xffc8c8c8,0xffc0c0c0,0xffb2b2b2, + 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3e000000, + 0xffee5056,0xffe1484c,0xffcb3c40,0xfff6ebeb,0xffffffff,0xfff3e9e9,0xff891a1d,0xff91191d,0xffddbbbc,0xffffffff,0xffbd7274,0xffa41b20,0xffb11d22,0xff6e6e6e, + 0xffa2a2a2,0xffc5c5c5,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000, + 0x90000500,0x6e000500,0x1f000000,0x3d000000,0xffef4c51,0xffe14247,0xffd76468,0xfffffefe,0xffffffff,0xfffefefe,0xffa04f51,0xff8e171b,0xffddbbbc,0xffffffff, + 0xffb97174,0xff9f1b1f,0xffab1d22,0xff6d6d6d,0xffa1a1a1,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777, + 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffed464b,0xffdf3c41,0xffefc9cb,0xffffffff,0xfff5eded,0xffffffff, + 0xffddc4c4,0xff88171b,0xffdbbbbc,0xffffffff,0xffb57072,0xff95191e,0xffa21b1f,0xff6b6b6b,0xff9f9f9f,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea, + 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xffec3e42,0xffe4696d, + 0xffffffff,0xffffffff,0xffbb7b7d,0xffffffff,0xffffffff,0xffa4575a,0xffdabbbc,0xffffffff,0xffe5d1d2,0xffdbbbbc,0xff9a1a1e,0xff6a6a6a,0xff9d9d9d,0xffc7c7c7, + 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500, + 0x1d000000,0x3c000000,0xffe9353c,0xffe77a7e,0xfffdf8f8,0xffe9c9ca,0xff95191d,0xffe2c8c9,0xfffbf8f8,0xffb47173,0xffdabbbc,0xffffffff,0xffffffff,0xffffffff, + 0xff96191d,0xff6d6d6d,0xffa0a0a0,0xffc6c6c6,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070, + 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x37000000,0xffe82e34,0xffdc242b,0xffcc353b,0xffbd4043,0xffa31b20,0xffaa3d41,0xff9e2e33,0xff96191d, + 0xff95191e,0xff8e171d,0xff8d171b,0xff92191d,0xff981a1e,0xff7a7a7a,0xffa5a5a5,0xffc9c9c9,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979, + 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2f000000,0xffe8272e,0xffdb242a,0xffcd2229,0xffbf1f25, + 0xffb31e23,0xffaf1d23,0xffa91d20,0xffa61d20,0xffa41b20,0xff9e1b1f,0xff9c1a1e,0xff9d1a1f,0xffa01a20,0xff8d8d8d,0xffb2b2b2,0xffd1d1d1,0xffe3e3e3,0xfff3f3f3, + 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x26000000, + 0x41000000,0x64000000,0x7f000000,0x98000000,0xa9000000,0xb5000000,0xbf000000,0xff000000,0xff6e6e6e,0xff6d6d6d,0xff737373,0xff7d7d7d,0xff8d8d8d,0xffa6a6a6, + 0xffc3c3c3,0xffd7d7d7,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000, + 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2b000000,0x41000000,0x55000000,0x68000000,0x78000000,0x88000000,0x98000000,0xff000000,0xffa3a3a3,0xffa2a2a2, + 0xffa5a5a5,0xffadadad,0xffb6b6b6,0xffc4c4c4,0xffd6d6d6,0xffe3e3e3,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8, + 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x43000000,0x52000000,0x63000000, + 0x76000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6, + 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000, + 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3, + 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500, + 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8, + 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000, 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x1000200,0x4000200,0x9000200, - 0x11000200,0x1d000200,0x2c000200,0x3e000200,0x51000200,0x63000200,0x73000200,0x7f000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, - 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, - 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, - 0x3e000200,0x30000200 + 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500, + 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500, + 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500, + 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500, + 0x3e000500,0x30000500 }; static const QRgb DocumentTypeNone_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, - 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, - 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, - 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, - 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, - 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xfffefefe,0xfffefefe, - 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, - 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x3000200,0x7000200,0xe000200,0x19000200,0x2a000200, - 0x40000200,0xff000000,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, - 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0x1000200,0x1000200,0x3000200,0x4000200, - 0x9000200,0x11000200,0x1e000200,0x2f000200,0x47000200,0xff000000,0xfff8f8f8,0xfff9f9f9,0xfff9f9f9,0xfffafafa,0xfff9f9f9,0xfffafafa,0xfff9f9f9,0xfff8f8f8, - 0xfff1f1f1,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, - 0x2000200,0x3000200,0x5000200,0x7000200,0xd000200,0x16000200,0x23000200,0x36000200,0x50000200,0xff000000,0xfff0f0f0,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4, - 0xfff4f4f4,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xffeeeeee,0xffe1e1e1,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, - 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0x4000200,0x6000200,0x9000200,0xd000200,0x13000200,0x1c000200,0x2a000200,0x3e000200,0x57000200,0xff000000, - 0xffe2e2e2,0xffe4e4e4,0xffe7e7e7,0xffeaeaea,0xffebebeb,0xffeeeeee,0xfff1f1f1,0xfff1f1f1,0xffededed,0xffdfdfdf,0xffc7c7c7,0xffa6a6a6,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x8000200,0xb000200,0xf000200,0x15000200,0x1a000200,0x25000200, - 0x33000200,0x47000200,0x5f000200,0xff000000,0xffcfcfcf,0xffd2d2d2,0xffd6d6d6,0xffdbdbdb,0xffdfe0df,0xffe5e6e5,0xffe9eae9,0xffececec,0xffeaeaea,0xffe1e1e1, - 0xffcbcbcb,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0xc000200,0x11000200, - 0x17000200,0x1e000200,0x25000200,0x30000200,0x3f000200,0x51000200,0x69000200,0xff000100,0xffb5b6b5,0xffbabbba,0xffc0c0c0,0xffc9c9c9,0xffd0d0d0,0xffd9d9d9, - 0xffe1e1e1,0xffe8e8e8,0xffe8e9e8,0xffe2e3e2,0xffd5d5d5,0xffbebebe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, - 0x6a000200,0x4e000200,0x11000200,0x18000200,0x20000200,0x29000200,0x32000200,0x3d000200,0x4c000200,0x5d000200,0x74000200,0xff000100,0xff979897,0xff9e9f9e, - 0xffa7a8a7,0xffb3b4b3,0xffbebebe,0xffcbcbcb,0xffd8d8d8,0xffe1e1e1,0xffe7e7e7,0xffe7e8e7,0xffdfdfdf,0xffbababa,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, - 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0x16000200,0x1f000200,0xf8fefefe,0xf0fbfbfb,0xecf9f9f9,0xecf6f6f6,0xedf5f5f5,0xeff3f3f3, - 0xf1f1f1f1,0xffe4e4e4,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4,0xfff8f8f8,0xfffcfcfc,0xffbdbebd,0xffcecece,0xffdbdbdb,0xffe7e7e7,0xffeaeaea,0xffc3c3c3,0xff909090, - 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x1b000200,0x26000200,0xf0fbfbfb,0xe0f4f4f4, - 0xd8ececec,0xd8e7e7e7,0xdbe3e3e3,0xdfdedede,0xe3dadbda,0xffc2c3c2,0xffd8d8d8,0xffdbdbdb,0xffe1e1e1,0xffececec,0xfff8f8f8,0xffafafaf,0xffc4c5c4,0xffd6d6d6, - 0xffe5e6e5,0xffcecece,0xff9a9a9a,0xff8a8a8a,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, - 0x1f000200,0x2c000200,0xecf9f9f9,0xd8ededed,0xcee0e0e0,0xced9d9d9,0xd3d3d3d3,0xd7cfcfcf,0xddc9cac9,0xffaeafae,0xffc3c3c3,0xffc8c8c8,0xffd0d0d0,0xffe1e1e1, - 0xfff3f4f3,0xffa3a4a3,0xffbbbbbb,0xffd3d3d3,0xffd7d7d7,0xffaeaeae,0xff969696,0xffa7a7a7,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, - 0xff909090,0xff000000,0x8b000200,0x6a000200,0x22000200,0x30000200,0xebf8f8f8,0xd6e9e9e9,0xcddadada,0xced3d3d3,0xd3cdcdcd,0xd8c9c9c9,0xddc4c4c4,0xffaaabaa, - 0xffb9bab9,0xffbebfbe,0xffc8c8c8,0xffdbdbdb,0xfff2f2f2,0xff9a9b9a,0xffb6b6b6,0xffcecece,0xffc1c1c1,0xffa3a3a3,0xffa0a0a0,0xffdcdcdc,0xfff8f8f8,0xfff6f6f6, - 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x25000200,0x33000200,0xebf7f7f7,0xd7e7e8e7,0xced8d8d8,0xd0d0d0d0, - 0xd5cccccc,0xdac7c7c7,0xdfc2c2c2,0xffaaabaa,0xffb5b6b5,0xffb9bab9,0xffc3c4c3,0xffd8d8d8,0xfff0f1f0,0xff949594,0xffb1b1b1,0xffc9c9c9,0xffb5b5b5,0xffa2a2a2, - 0xffb6b6b6,0xfff1f1f1,0xfff9f9f9,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x26000200,0x35000200, - 0xebf7f7f7,0xd7e7e7e7,0xced7d8d7,0xd1cfcfcf,0xd6cbcbcb,0xdbc6c6c6,0xe0c2c2c2,0xffaaabaa,0xffb3b3b3,0xffb7b8b7,0xffc1c2c1,0xffd7d7d7,0xfff0f0f0,0xff919291, - 0xffafafaf,0xffc6c6c6,0xffafafaf,0xffa1a1a1,0xffc0c0c0,0xfff9f9f9,0xfffafafa,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, - 0x90000200,0x6e000200,0x26000200,0x35000200,0xebf7f7f7,0xd7e7e7e7,0xced7d8d7,0xd1cfcfcf,0xd6cbcbcb,0xdbc6c6c6,0xe0c2c2c2,0xffaaabaa,0xffb3b3b3,0xffb7b8b7, - 0xffc1c2c1,0xffd7d7d7,0xfff0f0f0,0xff919291,0xffafafaf,0xffc7c7c7,0xffb2b2b2,0xff9d9e9d,0xffb7b7b7,0xfff5f5f5,0xffafafaf,0xff757575,0xff6d6d6d,0xff656565, - 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x25000200,0x33000200,0xebf7f7f7,0xd7e7e8e7,0xced8d8d8,0xd0d0d0d0,0xd5cccccc,0xdac7c7c7, - 0xdfc2c2c2,0xffaaabaa,0xffb5b6b5,0xffb9bab9,0xffc3c4c3,0xffd8d8d8,0xfff0f1f0,0xff949594,0xffb1b1b1,0xffcbcbcb,0xffbebebe,0xff979797,0xff9b9b9b,0xffe4e4e4, - 0xffacacac,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x22000200,0x30000200,0xebf8f8f8,0xd6e9e9e9, - 0xcddadada,0xced3d3d3,0xd3cdcdcd,0xd8c9c9c9,0xddc4c4c4,0xffaaabaa,0xffb9bab9,0xffbebfbe,0xffc8c8c8,0xffdbdbdb,0xfff2f2f2,0xff9a9b9a,0xffb5b5b5,0xffcfcfcf, - 0xffcfd0cf,0xff979797,0xff818181,0xffa7a7a7,0xffececec,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, - 0x1f000200,0x2c000200,0xecf9f9f9,0xd8ededed,0xcee0e0e0,0xced9d9d9,0xd3d3d3d3,0xd7cfcfcf,0xddc9cac9,0xffaeafae,0xffc3c3c3,0xffc8c8c8,0xffd0d0d0,0xffe1e1e1, - 0xfff3f4f3,0xffa3a4a3,0xffbbbcbb,0xffd0d0d0,0xffe2e3e2,0xffb9b9b9,0xff797979,0xff6f6f6f,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, - 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000200,0x26000200,0xf0fbfbfb,0xe0f4f4f4,0xd8ececec,0xd8e7e7e7,0xdbe3e3e3,0xdfdedede,0xe3dadbda,0xffc2c3c2, - 0xffd8d8d8,0xffdbdbdb,0xffe1e1e1,0xffececec,0xfff8f8f8,0xffafb0af,0xffc3c4c3,0xffd3d4d3,0xffe4e5e4,0xffe9eae9,0xffa8a8a8,0xff6b6b6b,0xff646464,0xff676767, - 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x16000200,0x1f000200,0xf8fefefe,0xf0fbfbfb,0xecf9f9f9,0xecf6f6f6, - 0xedf5f5f5,0xeff3f3f3,0xf1f1f1f1,0xffe4e4e4,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4,0xfff8f8f8,0xfffcfcfc,0xffbcbdbc,0xffcdcecd,0xffdadada,0xffe4e4e4,0xffefefef, - 0xffefefef,0xffbcbcbc,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x11000200,0x18000200, - 0x20000200,0x29000200,0x32000200,0x3d000200,0x4c000200,0x5d000200,0x73000200,0xff000100,0xff979897,0xff9e9f9e,0xffa7a8a7,0xffb3b4b3,0xffbdbebd,0xffcacbca, - 0xffd6d6d6,0xffe1e1e1,0xffe9e9e9,0xffebebeb,0xfff2f2f2,0xfff7f7f7,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, - 0x8e000200,0x6d000200,0xc000200,0x11000200,0x17000200,0x1e000200,0x25000200,0x30000200,0x3f000200,0x51000200,0x68000200,0xff000100,0xffb5b6b5,0xffbabbba, - 0xffc0c0c0,0xffc9c9c9,0xffd0d0d0,0xffd8d8d8,0xffe1e1e1,0xffe7e7e7,0xffececec,0xffeeeeee,0xfff0f0f0,0xfff2f2f2,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, - 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x8000200,0xb000200,0xf000200,0x14000200,0x1a000200,0x24000200,0x32000200,0x44000200, - 0x5c000200,0xff000000,0xffcfcfcf,0xffd2d2d2,0xffd6d6d6,0xffdbdbdb,0xffdedfde,0xffe4e4e4,0xffe8e9e8,0xffededed,0xfff0f0f0,0xfff2f2f2,0xfff3f3f3,0xfff4f4f4, - 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000200,0x6000200,0x9000200,0xc000200, - 0x12000200,0x1a000200,0x28000200,0x39000200,0x50000200,0xff000000,0xffe2e2e2,0xffe4e4e4,0xffe7e7e7,0xffeaeaea,0xffeaeaea,0xffededed,0xfff1f1f1,0xfff2f2f2, - 0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, - 0x2000200,0x3000200,0x4000200,0x7000200,0xc000200,0x14000200,0x1e000200,0x30000200,0x45000200,0xff000000,0xfff0f0f0,0xfff1f1f1,0xfff2f2f2,0xfff4f4f4, - 0xfff6f6f6,0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xffffffff,0xff000000,0x73000200,0x58000200,0x1000200,0x1000200,0x2000200,0x4000200,0x8000200,0xe000200,0x18000200,0x27000200,0x38000200,0xff000000, + 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500, + 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500, + 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500, + 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, + 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, + 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500, + 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xfffefefe,0xfffefefe, + 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e, + 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x3000500,0x7000500,0xe000500,0x19000500,0x2a000500, + 0x40000500,0xff000000,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6, + 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0x1000500,0x1000500,0x3000500,0x4000500, + 0x9000500,0x11000500,0x1e000500,0x2f000500,0x47000500,0xff000000,0xfff9f9f9,0xfffafafa,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfffbfbfb,0xfffafafa,0xfff9f9f9, + 0xfff3f3f3,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500, + 0x2000500,0x3000500,0x5000500,0x7000500,0xd000500,0x16000500,0x23000500,0x36000500,0x50000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6, + 0xfff6f6f6,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff1f1f1,0xffe6e6e6,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545, + 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0x4000500,0x6000500,0x9000500,0xd000500,0x13000500,0x1c000500,0x2a000500,0x3e000500,0x57000500,0xff000000, + 0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff1f1f1,0xfff3f3f3,0xfff3f3f3,0xfff0f0f0,0xffe4e4e4,0xffd0d0d0,0xffb3b3b3,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x8000500,0xb000500,0xf000500,0x15000500,0x1a000500,0x25000500, + 0x33000500,0x47000500,0x5f000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe4e5e4,0xffe9eae9,0xffedeeed,0xffefefef,0xffeeeeee,0xffe6e6e6, + 0xffd3d3d3,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0xc000500,0x11000500, + 0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x69000500,0xff000300,0xffc0c1c0,0xffc4c5c4,0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdfdfdf, + 0xffe6e6e6,0xffececec,0xffecedec,0xffe7e8e7,0xffdcdcdc,0xffc8c8c8,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e, + 0x6a000500,0x4e000500,0x11000500,0x18000500,0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x74000500,0xff000300,0xffa5a6a5,0xffacadac, + 0xffb4b5b4,0xffbebfbe,0xffc8c8c8,0xffd3d3d3,0xffdedede,0xffe6e6e6,0xffebebeb,0xffebeceb,0xffe4e4e4,0xffc4c4c4,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b, + 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8,0xedf7f7f7,0xeff5f5f5, + 0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc7c8c7,0xffd6d6d6,0xffe1e1e1,0xffebebeb,0xffeeeeee,0xffcccccc,0xff9f9f9f, + 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6, + 0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb,0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbbbb,0xffcdcecd,0xffdddddd, + 0xffe9eae9,0xffd6d6d6,0xffa8a8a8,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500, + 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6, + 0xfff5f6f5,0xffb0b1b0,0xffc5c5c5,0xffdadada,0xffdddddd,0xffbababa,0xffa4a4a4,0xffb4b4b4,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7, + 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed,0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6, + 0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc1c1c1,0xffd6d6d6,0xffcbcbcb,0xffb0b0b0,0xffadadad,0xffe2e2e2,0xfff9f9f9,0xfff8f8f8, + 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7, + 0xd5d4d4d4,0xdad0d0d0,0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd1d1d1,0xffc0c0c0,0xffafafaf, + 0xffc1c1c1,0xfff3f3f3,0xfffafafa,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x26000500,0x35000500, + 0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2,0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0, + 0xffbbbbbb,0xffcfcfcf,0xffbbbbbb,0xffaeaeae,0xffcacaca,0xfffafafa,0xfffbfbfb,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000, + 0x90000500,0x6e000500,0x26000500,0x35000500,0xebf8f8f8,0xd7ebebeb,0xcedddedd,0xd1d7d7d7,0xd6d3d3d3,0xdbcfcfcf,0xe0cbcbcb,0xffb6b7b6,0xffbebebe,0xffc2c3c2, + 0xffcbcbcb,0xffdddddd,0xfff3f3f3,0xffa0a1a0,0xffbbbbbb,0xffd0d0d0,0xffbdbdbd,0xffabacab,0xffc2c2c2,0xfff7f7f7,0xffbbbbbb,0xff868686,0xff7e7e7e,0xff777777, + 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x25000500,0x33000500,0xebf8f8f8,0xd7ebeceb,0xcededede,0xd0d7d7d7,0xd5d4d4d4,0xdad0d0d0, + 0xdfcbcbcb,0xffb6b7b6,0xffc0c1c0,0xffc4c4c4,0xffcccdcc,0xffdedede,0xfff3f3f3,0xffa3a4a3,0xffbdbdbd,0xffd3d3d3,0xffc8c8c8,0xffa5a5a5,0xffa9a9a9,0xffe8e8e8, + 0xffb8b8b8,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x22000500,0x30000500,0xebf9f9f9,0xd6ededed, + 0xcde0e0e0,0xcedadada,0xd3d5d5d5,0xd8d1d1d1,0xddcdcdcd,0xffb6b7b6,0xffc4c4c4,0xffc8c9c8,0xffd1d1d1,0xffe1e1e1,0xfff4f4f4,0xffa8a9a8,0xffc0c0c0,0xffd7d7d7, + 0xffd7d7d7,0xffa5a5a5,0xff919191,0xffb4b4b4,0xffefefef,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500, + 0x1f000500,0x2c000500,0xecfafafa,0xd8f0f0f0,0xcee5e5e5,0xcedfdfdf,0xd3dadada,0xd7d7d7d7,0xddd1d2d1,0xffbabbba,0xffcccccc,0xffd1d1d1,0xffd7d7d7,0xffe6e6e6, + 0xfff5f6f5,0xffb0b1b0,0xffc5c6c5,0xffd7d7d7,0xffe7e8e7,0xffc4c4c4,0xff8a8a8a,0xff808080,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070, + 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000500,0x26000500,0xf0fcfcfc,0xe0f6f6f6,0xd8efefef,0xd8ebebeb,0xdbe8e8e8,0xdfe3e3e3,0xe3e0e1e0,0xffcbcccb, + 0xffdedede,0xffe1e1e1,0xffe6e6e6,0xffefefef,0xfff9f9f9,0xffbbbcbb,0xffcccdcc,0xffdadbda,0xffe8e9e8,0xffedeeed,0xffb5b5b5,0xff7c7c7c,0xff767676,0xff797979, + 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x16000500,0x1f000500,0xf8fefefe,0xf0fcfcfc,0xecfafafa,0xecf8f8f8, + 0xedf7f7f7,0xeff5f5f5,0xf1f3f3f3,0xffe8e8e8,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6,0xfff9f9f9,0xfffdfdfd,0xffc6c7c6,0xffd5d6d5,0xffe0e0e0,0xffe8e8e8,0xfff2f2f2, + 0xfff2f2f2,0xffc6c6c6,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x11000500,0x18000500, + 0x20000500,0x29000500,0x32000500,0x3d000500,0x4c000500,0x5d000500,0x73000500,0xff000300,0xffa5a6a5,0xffacadac,0xffb4b5b4,0xffbebfbe,0xffc7c8c7,0xffd2d3d2, + 0xffdddddd,0xffe6e6e6,0xffededed,0xffeeeeee,0xfff4f4f4,0xfff8f8f8,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000, + 0x8e000500,0x6d000500,0xc000500,0x11000500,0x17000500,0x1e000500,0x25000500,0x30000500,0x3f000500,0x51000500,0x68000500,0xff000300,0xffc0c1c0,0xffc4c5c4, + 0xffcacaca,0xffd1d1d1,0xffd7d7d7,0xffdedede,0xffe6e6e6,0xffebebeb,0xffefefef,0xfff1f1f1,0xfff3f3f3,0xfff4f4f4,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8, + 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x8000500,0xb000500,0xf000500,0x14000500,0x1a000500,0x24000500,0x32000500,0x44000500, + 0x5c000500,0xff000000,0xffd7d7d7,0xffd9d9d9,0xffdddddd,0xffe1e1e1,0xffe3e4e3,0xffe8e8e8,0xffecedec,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4,0xfff5f5f5,0xfff6f6f6, + 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000500,0x6000500,0x9000500,0xc000500, + 0x12000500,0x1a000500,0x28000500,0x39000500,0x50000500,0xff000000,0xffe7e7e7,0xffe8e8e8,0xffebebeb,0xffeeeeee,0xffeeeeee,0xfff0f0f0,0xfff3f3f3,0xfff4f4f4, + 0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500, + 0x2000500,0x3000500,0x4000500,0x7000500,0xc000500,0x14000500,0x1e000500,0x30000500,0x45000500,0xff000000,0xfff3f3f3,0xfff3f3f3,0xfff4f4f4,0xfff6f6f6, + 0xfff8f8f8,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xffffffff,0xff000000,0x73000500,0x58000500,0x1000500,0x1000500,0x2000500,0x4000500,0x8000500,0xe000500,0x18000500,0x27000500,0x38000500,0xff000000, 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xa000200, - 0x12000200,0x1e000200,0x2d000200,0x3f000200,0x52000200,0x64000200,0x74000200,0x80000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, - 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, - 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, - 0x3e000200,0x30000200 + 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xa000500, + 0x12000500,0x1e000500,0x2d000500,0x3f000500,0x52000500,0x64000500,0x74000500,0x80000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500, + 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500, + 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500, + 0x3e000500,0x30000500 }; static const QRgb DocumentTypePowerPoint_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, - 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, - 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, - 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, - 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, - 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, - 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x2000200,0x6000200,0xd000200,0x18000200,0x29000200, - 0x3f000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, - 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0xffffff,0xffffff,0x1000200,0x2000200, - 0x6000200,0xe000200,0x1b000200,0x2d000200,0x45000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff9f9f9, - 0xfff2f2f2,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, - 0xffffff,0xffffff,0x1000200,0x2000200,0x7000200,0xf000200,0x1d000200,0x30000200,0x4a000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff7f7f7,0xfff0f0f0,0xffe2e2e2,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, - 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200,0x10000200,0x1e000200,0x32000200,0x4d000200,0xff000000, - 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff7f7f7,0xfff0f0f0,0xffe1e1e1,0xffc8c8c8,0xffa6a6a6,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, - 0x27000000,0x3b000000,0x55000300,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff4f4f4,0xffefefef,0xffe4e4e4, - 0xffcccccc,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0x4000000,0x7000000, - 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8, - 0xffececec,0xfff0f0f0,0xffededed,0xffe6e6e6,0xffd7d7d7,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, - 0x6a000200,0x4e000200,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000200,0xff000000,0xffc2c2c2,0xffc2c2c2, - 0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd6d6d6,0xffe2e2e2,0xffe8e8e8,0xffececec,0xffececec,0xffe2e2e2,0xffbbbbbb,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, - 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0xc000000,0x19000000,0xff66c66a,0xff63c466,0xff5fc163,0xff5cbe60,0xff57bb5b,0xff55bb59, - 0xff50ba54,0xff4cba51,0xff46b64b,0xff40b445,0xff3cb13f,0xff34b039,0xff32ad37,0xffbcbcbc,0xffd0d0d0,0xffe0e0e0,0xffebebeb,0xffefefef,0xffc6c6c6,0xff919191, - 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x12000000,0x27000000,0xff62c265,0xff5dbc61, - 0xff58b65b,0xff52b056,0xff4fae53,0xff4bac4e,0xff47ad4b,0xff42ab45,0xff3ca841,0xff37a53b,0xff31a336,0xff2ea033,0xff2e9f32,0xff999999,0xffb9b9b9,0xffd4d4d4, - 0xffe8e8e8,0xffd2d2d2,0xff9d9d9d,0xff8b8b8b,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, - 0x17000000,0x31000000,0xff5dbc61,0xffffffff,0xffffffff,0xffffffff,0xfff2f8f3,0xff97c899,0xff3b993e,0xffffffff,0xffffffff,0xffffffff,0xfff1f8f1,0xff8bc28d, - 0xff2a8f2d,0xff7c7c7c,0xffa4a4a4,0xffcbcbcb,0xffd7d7d7,0xffb1b1b1,0xff9a9a9a,0xffa8a8a8,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, - 0xff909090,0xff000000,0x8b000200,0x6a000200,0x1b000000,0x3c000000,0xff57b45a,0xffffffff,0xffdaeadb,0xff6ea871,0xffbcd6bd,0xffffffff,0xff66a369,0xffffffff, - 0xffd5e6d6,0xff5d9b60,0xffb5d2b6,0xffffffff,0xff5e9f61,0xff646464,0xff939393,0xffbebebe,0xffc0c0c0,0xffa6a6a6,0xffa4a4a4,0xffdedede,0xfff9f9f9,0xfff6f6f6, - 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x1d000000,0x43000000,0xff50ae54,0xffffffff,0xffc9deca,0xff317833, - 0xff659966,0xffffffff,0xff89b18a,0xffffffff,0xffc2d6c3,0xff1d6520,0xff59905b,0xffffffff,0xff86b088,0xff545454,0xff878787,0xffb4b4b4,0xffb4b4b4,0xffa5a5a5, - 0xffbbbbbb,0xfff3f3f3,0xfffafafa,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x1f000000,0x45000000, - 0xff4caa4f,0xffffffff,0xffc8dcc9,0xff2b6f2d,0xff8ab08b,0xffffffff,0xff77a279,0xffffffff,0xffc1d3c2,0xff1a5a1c,0xff83a785,0xffffffff,0xff77a378,0xff4e4e4e, - 0xff818181,0xffb0b0b0,0xffacacac,0xffa5a5a5,0xffc5c5c5,0xfffcfcfc,0xfffbfbfb,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, - 0x90000200,0x6e000200,0x1f000000,0x46000000,0xff46a64b,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffd4e2d5,0xff2a6d2d,0xffffffff,0xffffffff,0xffffffff, - 0xffffffff,0xffd3e0d4,0xff2b6f2e,0xff4f4f4f,0xff828282,0xffb2b2b2,0xffafafaf,0xffa1a1a1,0xffbcbcbc,0xfff8f8f8,0xffb0b0b0,0xff757575,0xff6d6d6d,0xff656565, - 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x1f000000,0x46000000,0xff42a545,0xffffffff,0xffd6e5d7,0xff5e9561,0xff4b8a4d,0xff1f6c22, - 0xff1e6921,0xffffffff,0xffd3dfd3,0xff568358,0xff457b48,0xff1c601e,0xff1e6921,0xff535353,0xff868686,0xffb7b7b7,0xffbbbbbb,0xff9a9a9a,0xff9f9f9f,0xffe6e6e6, - 0xffadadad,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x1f000000,0x46000000,0xff3da240,0xffffffff, - 0xffc5dbc5,0xff217225,0xff227625,0xff217525,0xff217324,0xffffffff,0xffc1d4c2,0xff1b5d1d,0xff1c611e,0xff1e6821,0xff217124,0xff595959,0xff8c8c8c,0xffbbbbbb, - 0xffcbcbcb,0xff9a9a9a,0xff848484,0xffa8a8a8,0xffededed,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, - 0x1d000000,0x43000000,0xff38a33d,0xffffffff,0xffc4dcc5,0xff237725,0xff247d28,0xff257e28,0xff237b27,0xffffffff,0xffc2d5c3,0xff1c631f,0xff1e6921,0xff206e23, - 0xff237725,0xff636363,0xff959595,0xffbdbdbd,0xffdddddd,0xffbbbbbb,0xff7c7c7c,0xff707070,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, - 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000000,0x3e000000,0xff34a437,0xffffffff,0xffc4ddc5,0xff257f28,0xff26842a,0xff26852a,0xff258129,0xffffffff, - 0xffc2d7c3,0xff1f6a22,0xff206f23,0xff227625,0xff247c28,0xff747474,0xff9f9f9f,0xffc1c1c1,0xffdfdfdf,0xffebebeb,0xffababab,0xff6c6c6c,0xff646464,0xff676767, - 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x17000000,0x34000000,0xff2fa534,0xff2b952f,0xff27892b,0xff27862a, - 0xff278a2c,0xff27892b,0xff26852a,0xff247e28,0xff217324,0xff217223,0xff227525,0xff237926,0xff247e28,0xff878787,0xffacacac,0xffcacaca,0xffdedede,0xfff0f0f0, - 0xfff3f3f3,0xffbdbdbd,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x12000000,0x28000000, - 0x47000000,0x6b000000,0x87000000,0x9a000000,0xa7000000,0xb2000000,0xbc000000,0xff000000,0xff5b5b5b,0xff5c5c5c,0xff646464,0xff737373,0xff868686,0xff9f9f9f, - 0xffbcbcbc,0xffd2d2d2,0xffe4e4e4,0xffececec,0xfff5f5f5,0xfff8f8f8,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, - 0x8e000200,0x6d000200,0xc000000,0x1a000000,0x2f000000,0x47000000,0x5b000000,0x6c000000,0x79000000,0x87000000,0x97000000,0xff000000,0xff919191,0xff919191, - 0xff979797,0xffa2a2a2,0xffaeaeae,0xffbdbdbd,0xffd0d0d0,0xffdfdfdf,0xffe9e9e9,0xffefefef,0xfff2f2f2,0xfff3f3f3,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, - 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x7000000,0x10000000,0x1b000000,0x2a000000,0x37000000,0x45000000,0x53000000,0x63000000, - 0x76000000,0xff000000,0xffbfbfbf,0xffbfbfbf,0xffc2c2c2,0xffc8c8c8,0xffcdcdcd,0xffd5d5d5,0xffe1e1e1,0xffe8e8e8,0xffefefef,0xfff3f3f3,0xfff4f4f4,0xfff4f4f4, - 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000000,0x7000000,0xd000000,0x14000000, - 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000300,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8,0xffeeeeee,0xfff1f1f1, - 0xfff3f3f3,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, - 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6, - 0xfff7f7f7,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xffffffff,0xff000000,0x73000200,0x58000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000, + 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500, + 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500, + 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500, + 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, + 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, + 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500, + 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e, + 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500, + 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6, + 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500, + 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa, + 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500, + 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545, + 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000, + 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, + 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8, + 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000, + 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec, + 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e, + 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb, + 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b, + 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x19000000,0xff78cf7b,0xff75cd78,0xff71cb75,0xff6ec872,0xff69c56d,0xff67c56b, + 0xff62c466,0xff5ec463,0xff58c15d,0xff51bf57,0xff4dbd50,0xff45bc4a,0xff42b948,0xffc6c6c6,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0, + 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x27000000,0xff74cb77,0xff6fc673, + 0xff6ac16d,0xff64bc68,0xff61ba65,0xff5db860,0xff59b95d,0xff53b757,0xff4db552,0xff48b24c,0xff41b047,0xff3ead43,0xff3ead42,0xffa7a7a7,0xffc4c4c4,0xffdbdbdb, + 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500, + 0x17000000,0x31000000,0xff6fc673,0xffffffff,0xffffffff,0xffffffff,0xfff4f9f5,0xffa5d1a7,0xff4ca74f,0xffffffff,0xffffffff,0xffffffff,0xfff3f9f3,0xff9acb9c, + 0xff399e3d,0xff8d8d8d,0xffb1b1b1,0xffd3d3d3,0xffdddddd,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7, + 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x3c000000,0xff69bf6c,0xffffffff,0xffe0eee1,0xff7fb582,0xffc6ddc7,0xffffffff,0xff78b07a,0xffffffff, + 0xffdceadd,0xff6fa972,0xffc0d9c1,0xffffffff,0xff70ad73,0xff767676,0xffa2a2a2,0xffc8c8c8,0xffcacaca,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8, + 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x43000000,0xff62ba66,0xffffffff,0xffd1e3d2,0xff418943, + 0xff77a778,0xffffffff,0xff99bd9a,0xffffffff,0xffcbddcc,0xff2a772e,0xff6b9f6d,0xffffffff,0xff96bc98,0xff666666,0xff979797,0xffbfbfbf,0xffbfbfbf,0xffb2b2b2, + 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x45000000, + 0xff5eb661,0xffffffff,0xffd1e2d1,0xff3b803d,0xff9abc9a,0xffffffff,0xff88af8a,0xffffffff,0xffcbdacb,0xff276c29,0xff93b495,0xffffffff,0xff88b089,0xff606060, + 0xff919191,0xffbcbcbc,0xffb8b8b8,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000, + 0x90000500,0x6e000500,0x1f000000,0x46000000,0xff58b35d,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffdbe7dc,0xff397e3d,0xffffffff,0xffffffff,0xffffffff, + 0xffffffff,0xffdae5db,0xff3b803e,0xff616161,0xff929292,0xffbdbdbd,0xffbbbbbb,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777, + 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff53b257,0xffffffff,0xffdde9dd,0xff70a473,0xff5d9a5f,0xff2d7d30, + 0xff2b7a2f,0xffffffff,0xffdae4da,0xff68936a,0xff578c5a,0xff29722b,0xff2b7a2f,0xff656565,0xff969696,0xffc2c2c2,0xffc5c5c5,0xffa8a8a8,0xffadadad,0xffeaeaea, + 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x46000000,0xff4eaf51,0xffffffff, + 0xffcee1ce,0xff2f8334,0xff308734,0xff2f8634,0xff2f8433,0xffffffff,0xffcbdbcb,0xff286f2a,0xff29732b,0xff2b7a2f,0xff2f8233,0xff6b6b6b,0xff9b9b9b,0xffc5c5c5, + 0xffd3d3d3,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500, + 0x1d000000,0x43000000,0xff49b04e,0xffffffff,0xffcde2ce,0xff318834,0xff338d37,0xff348e37,0xff318c36,0xffffffff,0xffcbdccc,0xff29752d,0xff2b7a2f,0xff2e7f31, + 0xff318834,0xff757575,0xffa4a4a4,0xffc7c7c7,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070, + 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x3e000000,0xff45b148,0xffffffff,0xffcde3ce,0xff348f37,0xff359439,0xff359539,0xff349138,0xffffffff, + 0xffcbddcc,0xff2d7b30,0xff2e8031,0xff308734,0xff338d37,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979, + 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x34000000,0xff3fb245,0xff3ba43f,0xff36993b,0xff369639, + 0xff369a3c,0xff36993b,0xff359539,0xff338e37,0xff2f8433,0xff2f8331,0xff308634,0xff318a35,0xff338e37,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3, + 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x28000000, + 0x47000000,0x6b000000,0x87000000,0x9a000000,0xa7000000,0xb2000000,0xbc000000,0xff000000,0xff6d6d6d,0xff6e6e6e,0xff767676,0xff848484,0xff969696,0xffadadad, + 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000, + 0x8e000500,0x6d000500,0xc000000,0x1a000000,0x2f000000,0x47000000,0x5b000000,0x6c000000,0x79000000,0x87000000,0x97000000,0xff000000,0xffa0a0a0,0xffa0a0a0, + 0xffa5a5a5,0xffafafaf,0xffbababa,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8, + 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0x10000000,0x1b000000,0x2a000000,0x37000000,0x45000000,0x53000000,0x63000000, + 0x76000000,0xff000000,0xffc9c9c9,0xffc9c9c9,0xffcbcbcb,0xffd1d1d1,0xffd5d5d5,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6, + 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000, + 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3, + 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500, + 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8, + 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000, 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x1000200,0x4000200,0x9000200, - 0x11000200,0x1d000200,0x2c000200,0x3e000200,0x51000200,0x63000200,0x73000200,0x7f000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, - 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, - 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, - 0x3e000200,0x30000200 + 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500, + 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500, + 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500, + 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500, + 0x3e000500,0x30000500 }; static const QRgb DocumentTypeWord_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000200,0x2000200,0x5000200,0x9000200,0x10000200,0x18000200,0x22000200, - 0x2c000200,0x36000200,0x3f000200,0x45000200,0x4a000200,0x4d000200,0x4e000200,0x4e000200,0x4e000200,0x4c000200,0x49000200,0x45000200,0x3f000200,0x37000200, - 0x2e000200,0x25000200,0x1c000200,0x13000200,0xd000200,0x8000200,0x4000200,0x2000200,0xffffff,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200, - 0xd000200,0x16000200,0x22000200,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xfd282828,0x72434543,0x44000200,0x37000200,0x2b000200,0x1f000200,0x15000200,0xd000200,0x8000200,0x4000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x4000200,0x9000200,0x11000200,0x1d000200,0x2c000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, - 0xfffefefe,0xfffcfcfc,0xfff9f9f9,0xfff3f3f3,0xffe9e9e9,0xffdedede,0xffc8c8c8,0xfd272727,0x76303230,0x4e000200,0x3d000200,0x2e000200,0x21000200,0x16000200, - 0xe000200,0x8000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfff6f6f6,0xffededed,0xffdedede,0xffcccccc,0xfffefefe,0xffb3b3b3,0xfd292929,0x802e302e, - 0x53000200,0x40000200,0x2f000200,0x21000200,0x16000200,0xd000200,0xffffff,0xffffff,0xffffff,0x2000200,0x6000200,0xd000200,0x18000200,0x29000200, - 0x3f000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffcfcfc,0xfffafafa,0xfff4f4f4,0xffe9e9e9,0xffd4d4d4,0xffbcbcbc, - 0xffffffff,0xfffcfcfc,0xffa1a1a1,0xfd2b2b2b,0x7e262826,0x55000200,0x41000200,0x2f000200,0x20000200,0x15000200,0xffffff,0xffffff,0x1000200,0x2000200, - 0x6000200,0xe000200,0x1b000200,0x2d000200,0x45000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff9f9f9, - 0xfff2f2f2,0xffe4e4e4,0xffcdcdcd,0xffaeaeae,0xffffffff,0xffffffff,0xfffcfcfc,0xff949494,0xfd2e2e2e,0x7a1d1f1d,0x55000200,0x40000200,0x2d000200,0x1e000200, - 0xffffff,0xffffff,0x1000200,0x2000200,0x7000200,0xf000200,0x1d000200,0x30000200,0x4a000200,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff7f7f7,0xfff0f0f0,0xffe2e2e2,0xffc8c8c8,0xffa7a7a7,0xffffffff,0xffffffff,0xffffffff,0xfff9f9f9,0xff8e8e8e,0xfd343434, - 0x781e1e1e,0x52000200,0x3c000200,0x29000200,0xffffff,0xffffff,0x1000200,0x3000200,0x7000200,0x10000200,0x1e000200,0x32000200,0x4d000200,0xff000000, - 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffcfcfc,0xfffbfbfb,0xfffafafa,0xfff7f7f7,0xfff0f0f0,0xffe1e1e1,0xffc8c8c8,0xffa6a6a6,0xffffffff,0xffffffff, - 0xffffffff,0xffffffff,0xfff8f8f8,0xff8f8f8f,0xfc3b3b3b,0x70141714,0x4c000200,0x36000200,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, - 0x27000000,0x3b000000,0x55000300,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6,0xfff4f4f4,0xfff5f5f5,0xfff5f5f5,0xfff4f4f4,0xffefefef,0xffe4e4e4, - 0xffcccccc,0xffadadad,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff929292,0xfb434343,0x5c000200,0x42000200,0x4000000,0x7000000, - 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8, - 0xffececec,0xfff0f0f0,0xffededed,0xffe6e6e6,0xffd7d7d7,0xffbfbfbf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff2e2e2e, - 0x6a000200,0x4e000200,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000200,0xff000000,0xffc2c2c2,0xffc2c2c2, - 0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd6d6d6,0xffe2e2e2,0xffe8e8e8,0xffececec,0xffececec,0xffe2e2e2,0xffbbbbbb,0xff909090,0xff6e6e6e,0xff5d5d5d,0xff595959, - 0xff5f5f5f,0xff7b7b7b,0xffa8a8a8,0xff000000,0x76000200,0x58000200,0xc000000,0x18000000,0xff5356f1,0xff5153f1,0xff4d4ff0,0xff494cef,0xff4547ef,0xff4144ef, - 0xff3d3fef,0xff383aee,0xff3235ee,0xff2b2eed,0xff2528ed,0xff1d20eb,0xff191ce6,0xffbdbdbd,0xffd0d0d0,0xffe0e0e0,0xffebebeb,0xffefefef,0xffc6c6c6,0xff919191, - 0xff7c7c7c,0xff717171,0xff717171,0xff6c6c6c,0xff5f5f5f,0xff5e5e5e,0xff626262,0xff000000,0x80000200,0x60000200,0x12000000,0x26000000,0xff5052ee,0xff4c4eeb, - 0xff474ae9,0xff4345e7,0xff3f42e7,0xff3b3de8,0xff3638e7,0xff2e31e7,0xff292ce6,0xff2426e6,0xff1d20e4,0xff181bde,0xff171ad7,0xff9b9b9b,0xffbababa,0xffd4d4d4, - 0xffe8e8e8,0xffd2d2d2,0xff9d9d9d,0xff8b8b8b,0xff959595,0xffb5b5b5,0xffc5c5c5,0xffc6c6c6,0xffbababa,0xff818181,0xff5c5c5c,0xff000000,0x87000200,0x66000200, - 0x17000000,0x30000000,0xff4c4eeb,0xff9b9df1,0xff9899ed,0xff5454de,0xff3739d7,0xff4c4ddd,0xff8c8eea,0xff4244dc,0xff2124d7,0xff383adb,0xff8183e5,0xff8183e3, - 0xff1618c7,0xff818181,0xffa7a7a7,0xffcccccc,0xffd8d8d8,0xffb1b1b1,0xff9a9a9a,0xffa8a8a8,0xffe1e1e1,0xfff1f1f1,0xfff5f5f5,0xfff0f0f0,0xffc9c9c9,0xffe2e2e2, - 0xff909090,0xff000000,0x8b000200,0x6a000200,0x1b000000,0x38000000,0xff474ae8,0xffa7a8ee,0xffffffff,0xff9091e0,0xff2b2dc1,0xff8a8bdd,0xffffffff,0xff8586dc, - 0xff181abd,0xff8081da,0xffffffff,0xff9293dc,0xff1416b5,0xff6a6a6a,0xff9a9a9a,0xffc3c3c3,0xffc1c1c1,0xffa6a6a6,0xffa4a4a4,0xffdedede,0xfff9f9f9,0xfff6f6f6, - 0xfff5f5f5,0xffa2a2a2,0xff686868,0xffa9a9a9,0xffdbdbdb,0xff000000,0x8e000200,0x6d000200,0x1d000000,0x3d000000,0xff4144e5,0xff5354db,0xffffffff,0xffe3e3f5, - 0xff2224a8,0xffe2e2f3,0xffffffff,0xffe1e1f3,0xff11139d,0xffe0e0f2,0xffffffff,0xff2f31ab,0xff1214a6,0xff5d5d5d,0xff919191,0xffbcbcbc,0xffb5b5b5,0xffa5a5a5, - 0xffbbbbbb,0xfff3f3f3,0xfffafafa,0xfff9f9f9,0xffaaaaaa,0xff6b6b6b,0xff656565,0xff8c8c8c,0xffececec,0xff000000,0x8f000200,0x6e000200,0x1f000000,0x3f000000, - 0xff3e40e6,0xff3436d3,0xffb8b9ea,0xffffffff,0xff8384c6,0xffffffff,0xffffffff,0xffffffff,0xff7d7eba,0xffffffff,0xffafafd7,0xff0f118e,0xff12139e,0xff585858, - 0xff8e8e8e,0xffbababa,0xffaeaeae,0xffa5a5a5,0xffc5c5c5,0xfffcfcfc,0xfffbfbfb,0xffaeaeae,0xff717171,0xff696969,0xff6f6f6f,0xffdfdfdf,0xffffffff,0xff000000, - 0x90000200,0x6e000200,0x1f000000,0x3e000000,0xff393ce7,0xff2f32d7,0xff6161d2,0xffffffff,0xffffffff,0xffffffff,0xff4e4f9b,0xffffffff,0xffffffff,0xffffffff, - 0xff4e4f9d,0xff0f1089,0xff11129a,0xff595959,0xff8f8f8f,0xffbbbbbb,0xffb1b1b1,0xffa1a1a1,0xffbcbcbc,0xfff8f8f8,0xffb0b0b0,0xff757575,0xff6d6d6d,0xff656565, - 0xff626262,0xff959595,0xfff2f2f2,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3e000000,0xff3437ea,0xff2c2edd,0xff2124c7,0xffd3d3ef,0xffffffff,0xff9f9fcc, - 0xff0d0f76,0xff9e9fc7,0xffffffff,0xffe0e0ed,0xff0d0f7b,0xff0f118a,0xff11139b,0xff5c5c5c,0xff919191,0xffbdbdbd,0xffbcbcbc,0xff9a9a9a,0xff9f9f9f,0xffe6e6e6, - 0xffadadad,0xff6d6d6d,0xff8c8c8c,0xff8b8b8b,0xff575757,0xff555555,0xff838383,0xff000000,0x90000200,0x6f000200,0x1f000000,0x3d000000,0xff2e30ed,0xff2629e3, - 0xff1e21d2,0xff7273d5,0xffffffff,0xff5051ad,0xff0e1084,0xff4e50a2,0xffffffff,0xff6d6eb0,0xff0e1084,0xff0f1291,0xff11139f,0xff5f5f5f,0xff949494,0xffbfbfbf, - 0xffcccccc,0xff9a9a9a,0xff848484,0xffa8a8a8,0xffededed,0xffbbbbbb,0xffe7e7e7,0xfffbfbfb,0xff8f8f8f,0xff565656,0xff565656,0xff000000,0x90000200,0x6f000200, - 0x1d000000,0x3b000000,0xff272aee,0xff1f22e7,0xff181bd9,0xff1518c4,0xff5253c4,0xff12139f,0xff111398,0xff101292,0xff5050ad,0xff1e2194,0xff0f1291,0xff111399, - 0xff1113a1,0xff666666,0xff989898,0xffbfbfbf,0xffdedede,0xffbbbbbb,0xff7c7c7c,0xff707070,0xff979797,0xffd6d6d6,0xffe3e3e3,0xffe6e6e6,0xffc2c2c2,0xff5e5e5e, - 0xff575757,0xff000000,0x90000200,0x6f000200,0x1b000000,0x36000000,0xff2023ee,0xff1a1dea,0xff181bdc,0xff1619cc,0xff1517bd,0xff1316b1,0xff1215aa,0xff1214a6, - 0xff1213a1,0xff11139e,0xff11139e,0xff1114a2,0xff1214a6,0xff747474,0xffa0a0a0,0xffc2c2c2,0xffdfdfdf,0xffebebeb,0xffababab,0xff6c6c6c,0xff646464,0xff676767, - 0xff757575,0xff757575,0xff6b6b6b,0xff5b5b5b,0xff5b5b5b,0xff000000,0x90000200,0x6f000200,0x17000000,0x2e000000,0xff1a1deb,0xff191ce2,0xff181ad8,0xff1619cf, - 0xff1618c3,0xff1417bc,0xff1316b5,0xff1315b0,0xff1315ab,0xff1314a8,0xff1214a5,0xff1214a6,0xff1315a7,0xff878787,0xffacacac,0xffcacaca,0xffdedede,0xfff0f0f0, - 0xfff3f3f3,0xffbdbdbd,0xff868686,0xff606060,0xff606060,0xff606060,0xff606060,0xff838383,0xffb3b3b3,0xff000000,0x90000200,0x6e000200,0x12000000,0x25000000, - 0x3e000000,0x5e000000,0x79000000,0x91000000,0xa2000000,0xaf000000,0xba000000,0xff000000,0xff636363,0xff636363,0xff6a6a6a,0xff767676,0xff878787,0xff9e9e9e, - 0xffbcbcbc,0xffd2d2d2,0xffe4e4e4,0xffececec,0xfff5f5f5,0xfff8f8f8,0xffe7e7e7,0xffcfcfcf,0xffbfbfbf,0xffbfbfbf,0xffcecece,0xffe6e6e6,0xfff9f9f9,0xff000000, - 0x8e000200,0x6d000200,0xc000000,0x18000000,0x2a000000,0x3f000000,0x52000000,0x65000000,0x75000000,0x84000000,0x94000000,0xff000000,0xff989898,0xff989898, - 0xff9c9c9c,0xffa4a4a4,0xffafafaf,0xffbdbdbd,0xffd0d0d0,0xffdfdfdf,0xffe9e9e9,0xffefefef,0xfff2f2f2,0xfff3f3f3,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7, - 0xfff7f7f7,0xfff5f5f5,0xfff2f2f2,0xff000000,0x8c000200,0x6b000200,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x42000000,0x51000000,0x62000000, - 0x75000000,0xff000000,0xffc2c2c2,0xffc2c2c2,0xffc4c4c4,0xffc9c9c9,0xffcecece,0xffd5d5d5,0xffe1e1e1,0xffe8e8e8,0xffefefef,0xfff3f3f3,0xfff4f4f4,0xfff4f4f4, - 0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xfff4f4f4,0xff000000,0x87000200,0x68000200,0x4000000,0x7000000,0xd000000,0x14000000, - 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000300,0xff000000,0xffe0e0e0,0xffe0e0e0,0xffe2e2e2,0xffe4e4e4,0xffe4e4e4,0xffe8e8e8,0xffeeeeee,0xfff1f1f1, - 0xfff3f3f3,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x7f000200,0x61000200, - 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff5f5f5,0xfff5f5f5,0xfff5f5f5,0xfff6f6f6, - 0xfff7f7f7,0xfff9f9f9,0xfffbfbfb,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, - 0xffffffff,0xff000000,0x73000200,0x58000200,0xffffff,0xffffff,0xffffff,0x2000200,0x5000200,0xb000200,0x15000200,0x24000200,0x36000200,0xff000000, + 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1000500,0x2000500,0x5000500,0x9000500,0x10000500,0x18000500,0x22000500, + 0x2c000500,0x36000500,0x3f000500,0x45000500,0x4a000500,0x4d000500,0x4e000500,0x4e000500,0x4e000500,0x4c000500,0x49000500,0x45000500,0x3f000500,0x37000500, + 0x2e000500,0x25000500,0x1c000500,0x13000500,0xd000500,0x8000500,0x4000500,0x2000500,0xffffff,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500, + 0xd000500,0x16000500,0x22000500,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, + 0xff000000,0xff000000,0xfd373737,0x72545754,0x44000500,0x37000500,0x2b000500,0x1f000500,0x15000500,0xd000500,0x8000500,0x4000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x4000500,0x9000500,0x11000500,0x1d000500,0x2c000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe, + 0xfffefefe,0xfffdfdfd,0xfffafafa,0xfff5f5f5,0xffededed,0xffe3e3e3,0xffd1d1d1,0xfd363636,0x76404240,0x4e000500,0x3d000500,0x2e000500,0x21000500,0x16000500, + 0xe000500,0x8000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfffefefe,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfff8f8f8,0xfff0f0f0,0xffe3e3e3,0xffd4d4d4,0xfffefefe,0xffbebebe,0xfd383838,0x803e403e, + 0x53000500,0x40000500,0x2f000500,0x21000500,0x16000500,0xd000500,0xffffff,0xffffff,0xffffff,0x2000500,0x6000500,0xd000500,0x18000500,0x29000500, + 0x3f000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffdfdfd,0xfffdfdfd,0xfffbfbfb,0xfff6f6f6,0xffededed,0xffdbdbdb,0xffc6c6c6, + 0xffffffff,0xfffdfdfd,0xffaeaeae,0xfd3b3b3b,0x7e353735,0x55000500,0x41000500,0x2f000500,0x20000500,0x15000500,0xffffff,0xffffff,0x1000500,0x2000500, + 0x6000500,0xe000500,0x1b000500,0x2d000500,0x45000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfffafafa, + 0xfff4f4f4,0xffe8e8e8,0xffd5d5d5,0xffbababa,0xffffffff,0xffffffff,0xfffdfdfd,0xffa3a3a3,0xfd3e3e3e,0x7a2a2d2a,0x55000500,0x40000500,0x2d000500,0x1e000500, + 0xffffff,0xffffff,0x1000500,0x2000500,0x7000500,0xf000500,0x1d000500,0x30000500,0x4a000500,0xff000000,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xfffdfdfd,0xfffdfdfd,0xfffcfcfc,0xfff8f8f8,0xfff3f3f3,0xffe7e7e7,0xffd1d1d1,0xffb4b4b4,0xffffffff,0xffffffff,0xffffffff,0xfffafafa,0xff9d9d9d,0xfd454545, + 0x782b2b2b,0x52000500,0x3c000500,0x29000500,0xffffff,0xffffff,0x1000500,0x3000500,0x7000500,0x10000500,0x1e000500,0x32000500,0x4d000500,0xff000000, + 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffdfdfd,0xfffcfcfc,0xfffbfbfb,0xfff8f8f8,0xfff3f3f3,0xffe6e6e6,0xffd1d1d1,0xffb3b3b3,0xffffffff,0xffffffff, + 0xffffffff,0xffffffff,0xfff9f9f9,0xff9e9e9e,0xfc4c4c4c,0x701f231f,0x4c000500,0x36000500,0x1000000,0x2000000,0x5000000,0x9000000,0xf000000,0x18000000, + 0x27000000,0x3b000000,0x55000600,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8,0xfff6f6f6,0xfff7f7f7,0xfff7f7f7,0xfff6f6f6,0xfff2f2f2,0xffe8e8e8, + 0xffd4d4d4,0xffb9b9b9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xffa1a1a1,0xfb545454,0x5c000500,0x42000500,0x4000000,0x7000000, + 0xd000000,0x15000000,0x1d000000,0x29000000,0x38000000,0x4c000000,0x64000000,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec, + 0xffefefef,0xfff3f3f3,0xfff0f0f0,0xffeaeaea,0xffdddddd,0xffc9c9c9,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffbfbfb,0xff3e3e3e, + 0x6a000500,0x4e000500,0x7000000,0xf000000,0x19000000,0x28000000,0x34000000,0x43000000,0x52000000,0x64000000,0x79000500,0xff000000,0xffcbcbcb,0xffcbcbcb, + 0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdddddd,0xffe7e7e7,0xffececec,0xffefefef,0xffefefef,0xffe7e7e7,0xffc5c5c5,0xff9f9f9f,0xff7f7f7f,0xff6f6f6f,0xff6b6b6b, + 0xff717171,0xff8c8c8c,0xffb5b5b5,0xff000000,0x76000500,0x58000500,0xc000000,0x18000000,0xff6568f3,0xff6365f3,0xff5f61f3,0xff5b5ef2,0xff5759f2,0xff5256f2, + 0xff4e50f2,0xff494bf1,0xff4246f1,0xff3b3ef0,0xff3437f0,0xff2a2eee,0xff2529ea,0xffc7c7c7,0xffd7d7d7,0xffe5e5e5,0xffeeeeee,0xfff2f2f2,0xffcfcfcf,0xffa0a0a0, + 0xff8d8d8d,0xff828282,0xff828282,0xff7d7d7d,0xff717171,0xff707070,0xff747474,0xff000000,0x80000500,0x60000500,0x12000000,0x26000000,0xff6264f1,0xff5e60ee, + 0xff595ced,0xff5457eb,0xff5053eb,0xff4c4eec,0xff4749eb,0xff3e41eb,0xff383cea,0xff3335ea,0xff2a2ee8,0xff2428e3,0xff2327dd,0xffa9a9a9,0xffc4c4c4,0xffdbdbdb, + 0xffececec,0xffd9d9d9,0xffababab,0xff9a9a9a,0xffa4a4a4,0xffc0c0c0,0xffcecece,0xffcfcfcf,0xffc4c4c4,0xff919191,0xff6e6e6e,0xff000000,0x87000500,0x66000500, + 0x17000000,0x30000000,0xff5e60ee,0xffa9abf3,0xffa6a7f0,0xff6666e3,0xff484add,0xff5e5fe3,0xff9b9dee,0xff5356e2,0xff2f33dd,0xff494be1,0xff9193e9,0xff9193e8, + 0xff2224d0,0xff919191,0xffb4b4b4,0xffd4d4d4,0xffdedede,0xffbdbdbd,0xffa8a8a8,0xffb5b5b5,0xffe6e6e6,0xfff3f3f3,0xfff7f7f7,0xfff3f3f3,0xffd1d1d1,0xffe7e7e7, + 0xff9f9f9f,0xff000000,0x8b000500,0x6a000500,0x1b000000,0x38000000,0xff595cec,0xffb4b5f1,0xffffffff,0xff9fa0e5,0xff3b3dcb,0xff9a9ae3,0xffffffff,0xff9596e2, + 0xff2427c7,0xff9091e0,0xffffffff,0xffa1a2e2,0xff1f22c0,0xff7b7b7b,0xffa8a8a8,0xffcccccc,0xffcbcbcb,0xffb3b3b3,0xffb1b1b1,0xffe3e3e3,0xfffafafa,0xfff8f8f8, + 0xfff7f7f7,0xffafafaf,0xff7a7a7a,0xffb6b6b6,0xffe1e1e1,0xff000000,0x8e000500,0x6d000500,0x1d000000,0x3d000000,0xff5256e9,0xff6566e1,0xffffffff,0xffe8e8f7, + 0xff3033b5,0xffe7e7f5,0xffffffff,0xffe6e6f5,0xff1b1eab,0xffe5e5f4,0xffffffff,0xff3f41b7,0xff1d1fb3,0xff6f6f6f,0xffa0a0a0,0xffc6c6c6,0xffc0c0c0,0xffb2b2b2, + 0xffc5c5c5,0xfff5f5f5,0xfffbfbfb,0xfffafafa,0xffb6b6b6,0xff7c7c7c,0xff777777,0xff9b9b9b,0xffefefef,0xff000000,0x8f000500,0x6e000500,0x1f000000,0x3f000000, + 0xff4f51ea,0xff4547da,0xffc3c4ee,0xffffffff,0xff9394cf,0xffffffff,0xffffffff,0xffffffff,0xff8d8ec4,0xffffffff,0xffbbbbdd,0xff191b9d,0xff1d1eac,0xff6a6a6a, + 0xff9d9d9d,0xffc4c4c4,0xffbababa,0xffb2b2b2,0xffcecece,0xfffdfdfd,0xfffcfcfc,0xffbababa,0xff828282,0xff7a7a7a,0xff808080,0xffe4e4e4,0xffffffff,0xff000000, + 0x90000500,0x6e000500,0x1f000000,0x3e000000,0xff4a4deb,0xff3f42dd,0xff7373d9,0xffffffff,0xffffffff,0xffffffff,0xff6061a9,0xffffffff,0xffffffff,0xffffffff, + 0xff6061ab,0xff191a99,0xff1b1da8,0xff6b6b6b,0xff9e9e9e,0xffc5c5c5,0xffbdbdbd,0xffaeaeae,0xffc6c6c6,0xfff9f9f9,0xffbcbcbc,0xff868686,0xff7e7e7e,0xff777777, + 0xff747474,0xffa4a4a4,0xfff4f4f4,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3e000000,0xff4548ee,0xff3c3ee3,0xff2f33d0,0xffdadaf2,0xffffffff,0xffadadd4, + 0xff161987,0xffacadd0,0xffffffff,0xffe5e5f0,0xff16198c,0xff191b9a,0xff1b1ea9,0xff6e6e6e,0xffa0a0a0,0xffc7c7c7,0xffc6c6c6,0xffa8a8a8,0xffadadad,0xffeaeaea, + 0xffb9b9b9,0xff7e7e7e,0xff9b9b9b,0xff9a9a9a,0xff696969,0xff676767,0xff939393,0xff000000,0x90000500,0x6f000500,0x1f000000,0x3d000000,0xff3e40f0,0xff3538e8, + 0xff2b2fd9,0xff8384dc,0xffffffff,0xff6263b9,0xff171a94,0xff6062af,0xffffffff,0xff7e7fbc,0xff171a94,0xff191da0,0xff1b1ead,0xff717171,0xffa3a3a3,0xffc9c9c9, + 0xffd4d4d4,0xffa8a8a8,0xff949494,0xffb5b5b5,0xfff0f0f0,0xffc5c5c5,0xffebebeb,0xfffcfcfc,0xff9e9e9e,0xff686868,0xff686868,0xff000000,0x90000500,0x6f000500, + 0x1d000000,0x3b000000,0xff3639f1,0xff2d30eb,0xff2428df,0xff2024cd,0xff6465cd,0xff1d1ead,0xff1b1ea6,0xff1a1da1,0xff6262b9,0xff2b2fa3,0xff191da0,0xff1b1ea7, + 0xff1b1eae,0xff787878,0xffa6a6a6,0xffc9c9c9,0xffe3e3e3,0xffc5c5c5,0xff8d8d8d,0xff818181,0xffa5a5a5,0xffdddddd,0xffe8e8e8,0xffeaeaea,0xffcbcbcb,0xff707070, + 0xff696969,0xff000000,0x90000500,0x6f000500,0x1b000000,0x36000000,0xff2e31f1,0xff272aee,0xff2428e2,0xff2225d4,0xff2023c7,0xff1e22bd,0xff1d20b6,0xff1d1fb3, + 0xff1d1eae,0xff1b1eac,0xff1b1eac,0xff1b1faf,0xff1d1fb3,0xff858585,0xffadadad,0xffcbcbcb,0xffe4e4e4,0xffeeeeee,0xffb7b7b7,0xff7d7d7d,0xff767676,0xff797979, + 0xff868686,0xff868686,0xff7c7c7c,0xff6d6d6d,0xff6d6d6d,0xff000000,0x90000500,0x6f000500,0x17000000,0x2e000000,0xff272aee,0xff2529e7,0xff2427de,0xff2225d7, + 0xff2224cc,0xff1f23c6,0xff1e22c0,0xff1e20bc,0xff1e20b7,0xff1e1fb5,0xff1d1fb2,0xff1d1fb3,0xff1e20b4,0xff979797,0xffb8b8b8,0xffd2d2d2,0xffe3e3e3,0xfff3f3f3, + 0xfff5f5f5,0xffc7c7c7,0xff969696,0xff727272,0xff727272,0xff727272,0xff727272,0xff939393,0xffbebebe,0xff000000,0x90000500,0x6e000500,0x12000000,0x25000000, + 0x3e000000,0x5e000000,0x79000000,0x91000000,0xa2000000,0xaf000000,0xba000000,0xff000000,0xff757575,0xff757575,0xff7b7b7b,0xff878787,0xff979797,0xffacacac, + 0xffc6c6c6,0xffd9d9d9,0xffe8e8e8,0xffefefef,0xfff7f7f7,0xfff9f9f9,0xffebebeb,0xffd7d7d7,0xffc9c9c9,0xffc9c9c9,0xffd6d6d6,0xffeaeaea,0xfffafafa,0xff000000, + 0x8e000500,0x6d000500,0xc000000,0x18000000,0x2a000000,0x3f000000,0x52000000,0x65000000,0x75000000,0x84000000,0x94000000,0xff000000,0xffa6a6a6,0xffa6a6a6, + 0xffaaaaaa,0xffb1b1b1,0xffbbbbbb,0xffc7c7c7,0xffd7d7d7,0xffe4e4e4,0xffededed,0xfff2f2f2,0xfff4f4f4,0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8, + 0xfff8f8f8,0xfff7f7f7,0xfff4f4f4,0xff000000,0x8c000500,0x6b000500,0x7000000,0xf000000,0x19000000,0x27000000,0x34000000,0x42000000,0x51000000,0x62000000, + 0x75000000,0xff000000,0xffcbcbcb,0xffcbcbcb,0xffcdcdcd,0xffd1d1d1,0xffd6d6d6,0xffdcdcdc,0xffe6e6e6,0xffececec,0xfff2f2f2,0xfff5f5f5,0xfff6f6f6,0xfff6f6f6, + 0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xfff6f6f6,0xff000000,0x87000500,0x68000500,0x4000000,0x7000000,0xd000000,0x14000000, + 0x1c000000,0x28000000,0x35000000,0x47000000,0x5c000600,0xff000000,0xffe5e5e5,0xffe5e5e5,0xffe7e7e7,0xffe8e8e8,0xffe8e8e8,0xffececec,0xfff1f1f1,0xfff3f3f3, + 0xfff5f5f5,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xfff8f8f8,0xff000000,0x7f000500,0x61000500, + 0x1000000,0x2000000,0x4000000,0x8000000,0xe000000,0x16000000,0x21000000,0x31000000,0x47000000,0xff000000,0xfff7f7f7,0xfff7f7f7,0xfff7f7f7,0xfff8f8f8, + 0xfff8f8f8,0xfffafafa,0xfffcfcfc,0xfffdfdfd,0xfffefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff, + 0xffffffff,0xff000000,0x73000500,0x58000500,0xffffff,0xffffff,0xffffff,0x2000500,0x5000500,0xb000500,0x15000500,0x24000500,0x36000500,0xff000000, 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000, - 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000200,0x4c000200,0xffffff,0xffffff,0xffffff,0x1000200,0x4000200,0x9000200, - 0x11000200,0x1d000200,0x2c000200,0x3e000200,0x51000200,0x63000200,0x73000200,0x7f000200,0x87000200,0x8c000200,0x8e000200,0x90000200,0x90000200,0x90000200, - 0x90000200,0x90000200,0x90000200,0x90000200,0x8e000200,0x8c000200,0x87000200,0x7f000200,0x73000200,0x63000200,0x51000200,0x3e000200,0xffffff,0xffffff, - 0xffffff,0x1000200,0x3000200,0x7000200,0xd000200,0x16000200,0x22000200,0x30000200,0x3e000200,0x4c000200,0x58000200,0x61000200,0x68000200,0x6b000200, - 0x6d000200,0x6e000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6f000200,0x6e000200,0x6d000200,0x6b000200,0x68000200,0x61000200,0x58000200,0x4c000200, - 0x3e000200,0x30000200 + 0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0xff000000,0x63000500,0x4c000500,0xffffff,0xffffff,0xffffff,0x1000500,0x4000500,0x9000500, + 0x11000500,0x1d000500,0x2c000500,0x3e000500,0x51000500,0x63000500,0x73000500,0x7f000500,0x87000500,0x8c000500,0x8e000500,0x90000500,0x90000500,0x90000500, + 0x90000500,0x90000500,0x90000500,0x90000500,0x8e000500,0x8c000500,0x87000500,0x7f000500,0x73000500,0x63000500,0x51000500,0x3e000500,0xffffff,0xffffff, + 0xffffff,0x1000500,0x3000500,0x7000500,0xd000500,0x16000500,0x22000500,0x30000500,0x3e000500,0x4c000500,0x58000500,0x61000500,0x68000500,0x6b000500, + 0x6d000500,0x6e000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6f000500,0x6e000500,0x6d000500,0x6b000500,0x68000500,0x61000500,0x58000500,0x4c000500, + 0x3e000500,0x30000500 }; static const QRgb FileBrowser_data[] = { 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xf000000,0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000, 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, - 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff083115,0xff06230f,0xff06230f,0xff06290f, - 0xff06270f,0xff06240f,0xff06230f,0xff06230f,0xff0b471e,0xff0b471e,0xff0b471e,0xff0b461e,0xff0b461e,0xff0b451d,0xff0b451d,0xff0b441d,0xff0b441d,0xff0b431c, - 0xff0a421c,0xff0a421c,0xff0a421c,0xff0a411b,0xff0a411b,0xff0a401b,0xff0a3f1b,0xff0a3e1a,0xff093c19,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000, - 0xff0b431c,0xffc7c7c7,0xff999999,0xff6d6d6d,0xff6d6d6d,0xff778775,0xff768275,0xff727771,0xff6d6d6d,0xff6d6d6d,0xffd9d9d9,0xffd8d8d8,0xffd6d6d6,0xffd5d5d5, - 0xffd3d3d3,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcbcbcb,0xffc9c9c9,0xffc8c8c8,0xffc6c6c6,0xffc5c5c5,0xffc3c3c3,0xffbfbfbf,0xffb8b8b8,0xff093a18,0x5c000000, - 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff0a421c,0xffcdcdcd,0xffcecece,0xffc9c9c9,0xff9f9f9f,0xff6d6d6d,0xff6d6d6d,0xff829480,0xff839481,0xff7a8479, - 0xff6c6c6c,0xff6b6b6b,0xffd5d5d5,0xffd3d3d3,0xff696969,0xff686868,0xff666666,0xffcbcbcb,0xffc9c9c9,0xffc8c8c8,0xffc6c6c6,0xffc4c4c4,0xffc3c3c3,0xffbdbdbd, - 0xffb8b8b8,0xffb1b1b1,0xff093817,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff0a3e1a,0xffc8c7c7,0xffcccbcb,0xffcdcdcd,0xffcecece,0xffc9c9c9, - 0xffa2a2a2,0xff6d6d6d,0xff6d6d6d,0xff8da28b,0xff90a48e,0xff859384,0xff6a6a6a,0xff696969,0xff818f80,0xff808e7f,0xff6d706c,0xff656565,0xff646464,0xffc6c6c6, - 0xffc4c4c4,0xffc3c3c3,0xffbdbdbd,0xffb8b8b8,0xffb1b1b1,0xffababab,0xff083517,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff093617,0xffb8b4b4, - 0xffc2c0c0,0xffc8c7c7,0xffcccbcb,0xffcdcdcd,0xffcecece,0xffcacaca,0xffa5a5a5,0xff6c6c6c,0xff6c6c6c,0xff97ad95,0xff98ae96,0xff96ab94,0xff98af96,0xff96ad94, - 0xff94aa92,0xff829181,0xff6b6e6a,0xff626262,0xff616161,0xffbdbdbd,0xffb8b8b8,0xffb2b2b2,0xffababab,0xffa4a4a4,0xff083316,0x93000000,0x62000000,0x3b000000, - 0x1f000000,0x3d000000,0xff072c13,0xff9d9595,0xffaca6a6,0xffb8b4b4,0xffc2c0c0,0xffc8c7c7,0xffcccbcb,0xffcdcdcd,0xffcdcdcd,0xffcbcbcb,0xffa5a5a5,0xff6a6a6a, - 0xff696969,0xff9eb59c,0xff9fb69d,0xff9eb59d,0xff9db49b,0xff9ab298,0xff97ae95,0xff839282,0xff686c67,0xff5c5c5c,0xffb2b2b2,0xffadadad,0xffa6a6a6,0xff9f9f9f, - 0xff083115,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff062510,0xff877c7c,0xff918787,0xff9d9595,0xffaca6a6,0xffb8b4b4,0xffc1bfbf,0xffc8c7c7, - 0xffcbcaca,0xffcccccc,0xffcbcbcb,0xffcbcbcb,0xffa7a7a7,0xff686868,0xff676767,0xffa5bda3,0xffa5bda3,0xffa3bba1,0xffa0b89e,0xff9cb39a,0xff95ac93,0xffbcdabb, - 0xff565656,0xffa7a7a7,0xffa0a0a0,0xff999999,0xff073014,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff06230f,0xff6d6d6d,0xff7b7272,0xff877c7c, - 0xff918787,0xff9d9595,0xffaba6a6,0xffb7b3b3,0xffc0bebe,0xffc7c6c6,0xffc9c9c9,0xffcacaca,0xffc9c9c9,0xffc8c8c8,0xffa6a6a6,0xff656565,0xff636363,0xffa9c3a8, - 0xffa8c1a6,0xffa3bca1,0xff9cb59b,0xffb9d6b7,0xff535353,0xffa1a1a1,0xff9a9a9a,0xff949494,0xff072e13,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000, - 0xff094319,0xff8d988c,0xff6b6b6b,0xff6b6b6b,0xff766e6e,0xff847979,0xff8e8484,0xff9a9292,0xffa9a4a4,0xffb5b1b1,0xffbfbdbd,0xffc4c3c3,0xffc7c6c6,0xffc7c7c7, - 0xffc6c6c6,0xffc5c5c5,0xffa8a8a8,0xff616161,0xff5d5d5d,0xffa7c1a6,0xffa3bda1,0xffb3cfb1,0xff515151,0xff9b9b9b,0xff969696,0xff8f8f8f,0xff072c13,0x99000000, - 0x66000000,0x3d000000,0x21000000,0x42000000,0xff0a4519,0xffb1cbb0,0xffa3baa2,0xff808a7f,0xff5f5f5f,0xff606060,0xff6b6565,0xff7b7171,0xff887f7f,0xff979090, - 0xffa7a2a2,0xffb3afaf,0xffbcbaba,0xffc1c0c0,0xffc3c3c3,0xffc3c3c3,0xffc2c2c2,0xffc0c0c0,0xffa2a2a2,0xff565656,0xffa1bba0,0xffacc7aa,0xff4d4d4d,0xff969696, - 0xff8f8f8f,0xff888888,0xff072a12,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xff083c16,0xff8ea28d,0xff7f907d,0xff748573,0xff6e7d6d,0xff5c655c, - 0xff494949,0xff515151,0xff625c5c,0xff776d6d,0xff887e7e,0xff968e8e,0xffa59f9f,0xffafacac,0xffb8b6b6,0xffbdbcbc,0xffbebebe,0xffbbbaba,0xffb7b7b7,0xff535353, - 0xff99b298,0xffa3bca1,0xff4a4a4a,0xff8e8e8e,0xff888888,0xff818181,0xff062811,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xff072c10,0xff5c6a5b, - 0xff495348,0xff3e463d,0xff394139,0xff3b443a,0xff434c42,0xff474e47,0xff424242,0xff515151,0xff656060,0xff7a7070,0xff887e7e,0xff948c8c,0xffa19c9c,0xffaca9a9, - 0xffb3b2b2,0xffb4b4b4,0xffb3b3b3,0xff4e4e4e,0xff8ca38b,0xff99b198,0xff464646,0xff878787,0xff818181,0xff7b7b7b,0xff062610,0x99000000,0x66000000,0x3d000000, - 0x64000000,0x91000000,0xff041b0a,0xff646963,0xffa1a3a0,0xffd7d8d7,0xfffafafa,0xffd7d8d7,0xff9fa29f,0xff5f655f,0xff414b41,0xff525b51,0xff4f4f4f,0xff5c5c5c, - 0xff696565,0xff7a6f6f,0xff867c7c,0xff928b8b,0xffa39f9f,0xffadacac,0xffaeaeae,0xff4b4b4b,0xff7f947e,0xff8fa58d,0xff434343,0xff808080,0xff7a7a7a,0xff747474, - 0xff06240f,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff5d6760,0xffc7c9c7,0xffa6a8a6,0xff8d928d,0xff858b84,0xff8c908c,0xffa4a8a4,0xffc6c7c6, - 0xff767a76,0xff3f483e,0xff606e5f,0xff717d6f,0xff5d5d5d,0xff606060,0xff656060,0xff787070,0xff918b8b,0xffa2a0a0,0xffa8a7a7,0xff474747,0xff728671,0xff869a85, - 0xff3f3f3f,0xff797979,0xff747474,0xff707070,0xff05230f,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd454545,0xffbdc0bd,0xff969a96,0xff919890,0xff9ea79d, - 0xffa1aaa1,0xff9ca49b,0xff8d948d,0xff939893,0xffc6c7c5,0xff5d615d,0xff495549,0xff6d7e6b,0xff829681,0xff7a8a79,0xff575757,0xff535353,0xff797272,0xff938f8f, - 0xffa09f9f,0xff434343,0xff677965,0xff7b8e7a,0xff3c3c3c,0xff747474,0xff6f6f6f,0xff6b6b6b,0xff05210e,0x99000000,0x66000000,0x3d000000,0xd9000000,0xf0979797, - 0xff949a95,0xff919890,0xffa8b1a7,0xffb0bcaf,0xffb0bcb0,0xffadb8ac,0xffa2aca1,0xff8c928b,0xffa3a6a3,0xff9d9f9d,0xff394239,0xff606f5f,0xff788c77,0xff7d927b, - 0xff788d76,0xff70846e,0xff494949,0xff837d7d,0xff969494,0xff3f3f3f,0xff5c6e5b,0xff728270,0xff383838,0xff6e6e6e,0xff696969,0xff666666,0xff05200d,0x99000000, - 0x66000000,0x3d000000,0xe7000000,0xf9d5d5d5,0xff6f7a72,0xff9da79d,0xffb0bcaf,0xffb3bfb2,0xffb2beb1,0xffb0bcaf,0xffaab5a9,0xff979f97,0xff888d88,0xffd6d7d6, - 0xff303830,0xff546254,0xff70836e,0xff758973,0xff70856e,0xff697d67,0xff444444,0xff696262,0xff888484,0xff3b3b3b,0xff526351,0xff687768,0xff353535,0xff686868, - 0xff646464,0xff626262,0xff051f0d,0x99000000,0x66000000,0x3d000000,0xec000000,0xfefafafa,0xff636965,0xff989e98,0xffb0bcb0,0xffb2beb1,0xffb0bcaf,0xffaebaad, - 0xffabb5aa,0xff99a399,0xff80847f,0xfffafafa,0xff2a302a,0xff4d5a4c,0xff697b67,0xff6d826b,0xff697d67,0xff627660,0xff5c6f5a,0xff3c3c3c,0xff787272,0xff383838, - 0xff495947,0xff5f6d5f,0xff333333,0xff646464,0xff616161,0xff5e5e5e,0xff051e0c,0x99000000,0x66000000,0x3d000000,0xe7000000,0xf9d5d5d5,0xff707a74,0xff858585, - 0xff909090,0xffa5ada4,0xffaebaad,0xffacb8ab,0xffa6b1a6,0xff949c93,0xff868a85,0xffd2d3d2,0xff252c25,0xff455144,0xff5f715d,0xff657863,0xff637762,0xff5d705b, - 0xff566a54,0xff393939,0xff5b5555,0xff353535,0xff40503e,0xff586357,0xff323232,0xff606060,0xff5f5f5f,0xff5d5d5d,0xff051e0c,0x99000000,0x66000000,0x3d000000, - 0xd9000000,0xf0979797,0xff949a96,0xff989898,0xffb3b3b3,0xff909090,0xff909090,0xff9ea59d,0xff9ba59b,0xff868c86,0xff9d9f9c,0xff919391,0xff20261f,0xff394338, - 0xff4f5f4e,0xff5a6c58,0xff5b6e59,0xff576b56,0xff526550,0xff4d5f4a,0xff353535,0xff343434,0xff3b4b39,0xff515a50,0xff303030,0xff606060,0xff5e5e5e,0xff5d5d5d, - 0xff051e0c,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd454545,0xffbdc0be,0xff9a9a9a,0xff989898,0xffa7a7a7,0xffacacac,0xff838383,0xff7a7a7a,0xff898b89, - 0xffb6b7b6,0xff585958,0xff1f231e,0xff283027,0xff3b4539,0xff475646,0xff4f604d,0xff51644e,0xff4e614c,0xff495b47,0xff343434,0xff333333,0xff364634,0xff495149, - 0xff303030,0xff5f5f5f,0xff5e5e5e,0xff5d5d5d,0xff051e0c,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff5d6760,0xffc8c8c8,0xffa8a8a8,0xff919191, - 0xff898989,0xff8e8e8e,0xffa2a2a2,0xffb5b5b5,0xff6b6b6b,0xffe4e4e4,0xffcacbca,0xff1e231e,0xff232b23,0xff323d31,0xff3f4c3e,0xff455644,0xff475946,0xff445642, - 0xff41533f,0xff323232,0xff334331,0xff424842,0xff2f2f2f,0xff5e5e5e,0xff5d5d5d,0xff5d5d5d,0xff051e0c,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000, - 0xff04190a,0xff676767,0xffa2a2a2,0xffd8d8d8,0xfffafafa,0xffd5d5d5,0xff979797,0xff4e4e4e,0xffe1e1e1,0xffffffff,0xffffffff,0xffc9c9c9,0xff1a1d19,0xff1e241d, - 0xff2b352a,0xff374436,0xff3e4d3c,0xff3f503d,0xff3e4e3c,0xff303030,0xff324230,0xff3c403c,0xff2f2f2f,0xff5e5e5e,0xff5e5e5e,0xff5d5d5d,0xff051e0d,0x99000000, - 0x66000000,0x3d000000,0x40000000,0x6a000000,0xff072911,0xff606060,0xff4b4b4b,0xff3f3f3f,0xff393939,0xff363636,0xff313131,0xff272727,0xff646464,0xfffafafa, - 0xffffffff,0xffffffff,0xffc8c8c8,0xff161716,0xff191f19,0xff273126,0xff323f31,0xff384735,0xff384a37,0xff394936,0xff2f2f2f,0xff363836,0xff2f2f2f,0xff5e5e5e, - 0xff5e5e5e,0xff5e5e5e,0xff051f0d,0x99000000,0x66000000,0x3d000000,0x28000000,0x4e000000,0xff083517,0xff919191,0xff7d7d7d,0xff707070,0xff696969,0xff636363, - 0xff575757,0xff424242,0xff2b2b2b,0xff626262,0xfffafafa,0xffffffff,0xffffffff,0xffc8c8c8,0xff131313,0xff171b17,0xff263024,0xff303e2e,0xff344432,0xff354633, - 0xff2f2f2f,0xff313231,0xff2f2f2f,0xff5e5e5e,0xff5e5e5e,0xff5f5f5f,0xff051f0d,0x93000000,0x62000000,0x3b000000,0x1d000000,0x3b000000,0xff0a3b19,0xffaaaaaa, - 0xffa0a0a0,0xff989898,0xff909090,0xff888888,0xff797979,0xff606060,0xff424242,0xff252525,0xff5e5e5e,0xfffafafa,0xffffffff,0xffffffff,0xffcacaca,0xff161616, - 0xff181818,0xff262e25,0xff303f2f,0xff334331,0xff334330,0xff2e2e2e,0xff2e2e2e,0xff5e5e5e,0xff5f5f5f,0xff606060,0xff05200d,0x87000000,0x5a000000,0x36000000, - 0x17000000,0x2f000000,0xff093c19,0xff093918,0xff093717,0xff083417,0xff083215,0xff083014,0xff072c13,0xff06260f,0xff041c0c,0xff031208,0xff010a04,0xff545654, - 0xfffafafa,0xffffffff,0xffffffff,0xff676a68,0xff020e06,0xff020a04,0xff020d06,0xff020f06,0xff020f06,0xff020f06,0xff051e0d,0xff051f0d,0xff051f0d,0xff05200d, - 0xff05210e,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x9b000000,0xa1000000, - 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8555555,0xfffafafa,0xfa858585,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000, + 0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000,0x18000000,0xf000000,0xc000000,0x18000000,0xff0f4120,0xff0c3119,0xff0c3119,0xff0c3819, + 0xff0c3619,0xff0c3319,0xff0c3119,0xff0c3119,0xff13592b,0xff13592b,0xff13592b,0xff13582b,0xff13582b,0xff13572a,0xff13572a,0xff13562a,0xff13562a,0xff135429, + 0xff125329,0xff125329,0xff125329,0xff125228,0xff125228,0xff125128,0xff125028,0xff124f27,0xff104d25,0x3d000000,0x29000000,0x18000000,0x12000000,0x25000000, + 0xff135429,0xffd0d0d0,0xffa7a7a7,0xff7e7e7e,0xff7e7e7e,0xff889786,0xff879286,0xff838882,0xff7e7e7e,0xff7e7e7e,0xffdfdfdf,0xffdedede,0xffdddddd,0xffdcdcdc, + 0xffdadada,0xffd8d8d8,0xffd7d7d7,0xffd5d5d5,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcecece,0xffcccccc,0xffc9c9c9,0xffc3c3c3,0xff104b24,0x5c000000, + 0x3d000000,0x25000000,0x17000000,0x2e000000,0xff125329,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1,0xffadadad,0xff7e7e7e,0xff7e7e7e,0xff92a390,0xff93a391,0xff8b948a, + 0xff7d7d7d,0xff7c7c7c,0xffdcdcdc,0xffdadada,0xff7a7a7a,0xff7a7a7a,0xff787878,0xffd3d3d3,0xffd1d1d1,0xffd1d1d1,0xffcfcfcf,0xffcdcdcd,0xffcccccc,0xffc7c7c7, + 0xffc3c3c3,0xffbdbdbd,0xff104923,0x74000000,0x4e000000,0x2e000000,0x1b000000,0x36000000,0xff124f27,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd1d1d1, + 0xffafafaf,0xff7e7e7e,0xff7e7e7e,0xff9caf9a,0xff9fb19d,0xff95a294,0xff7b7b7b,0xff7a7a7a,0xff919e90,0xff909d8f,0xff7e817d,0xff777777,0xff767676,0xffcfcfcf, + 0xffcdcdcd,0xffcccccc,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xff0f4623,0x87000000,0x5a000000,0x36000000,0x1d000000,0x3b000000,0xff104723,0xffc3bfbf, + 0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd6d6d6,0xffd2d2d2,0xffb2b2b2,0xff7d7d7d,0xff7d7d7d,0xffa5b9a4,0xffa6baa4,0xffa4b7a3,0xffa6bba4,0xffa4b9a3, + 0xffa3b6a1,0xff92a091,0xff7c7f7b,0xff747474,0xff737373,0xffc7c7c7,0xffc3c3c3,0xffbdbdbd,0xffb7b7b7,0xffb1b1b1,0xff0f4322,0x93000000,0x62000000,0x3b000000, + 0x1f000000,0x3d000000,0xff0d3c1e,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbcaca,0xffd1d0d0,0xffd4d3d3,0xffd5d5d5,0xffd5d5d5,0xffd3d3d3,0xffb2b2b2,0xff7b7b7b, + 0xff7a7a7a,0xffacc0aa,0xffadc1ab,0xffacc0ab,0xffabbfa9,0xffa8bda6,0xffa5baa4,0xff93a192,0xff7a7d79,0xff6e6e6e,0xffbdbdbd,0xffb9b9b9,0xffb3b3b3,0xffadadad, + 0xff0f4120,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c341a,0xff978d8d,0xffa09797,0xffaba4a4,0xffb8b3b3,0xffc3bfbf,0xffcbc9c9,0xffd1d0d0, + 0xffd3d2d2,0xffd4d4d4,0xffd3d3d3,0xffd3d3d3,0xffb4b4b4,0xff7a7a7a,0xff797979,0xffb2c7b0,0xffb2c7b0,0xffb0c5ae,0xffadc3ac,0xffaabea8,0xffa4b8a2,0xffc6e0c5, + 0xff686868,0xffb4b4b4,0xffadadad,0xffa7a7a7,0xff0d401f,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3d000000,0xff0c3119,0xff7e7e7e,0xff8c8383,0xff978d8d, + 0xffa09797,0xffaba4a4,0xffb7b3b3,0xffc2bebe,0xffcac8c8,0xffd0cfcf,0xffd1d1d1,0xffd2d2d2,0xffd1d1d1,0xffd1d1d1,0xffb3b3b3,0xff777777,0xff757575,0xffb6ccb5, + 0xffb5cbb3,0xffb0c6ae,0xffaac0a9,0xffc4ddc2,0xff656565,0xffaeaeae,0xffa8a8a8,0xffa3a3a3,0xff0d3e1e,0x99000000,0x66000000,0x3d000000,0x1f000000,0x3e000000, + 0xff105425,0xff9ca69b,0xff7c7c7c,0xff7c7c7c,0xff877f7f,0xff948a8a,0xff9d9494,0xffa8a1a1,0xffb6b1b1,0xffc0bdbd,0xffc9c7c7,0xffcdcccc,0xffd0cfcf,0xffd0d0d0, + 0xffcfcfcf,0xffcecece,0xffb5b5b5,0xff737373,0xff6f6f6f,0xffb4cbb3,0xffb0c7ae,0xffbed7bd,0xff636363,0xffa9a9a9,0xffa4a4a4,0xff9e9e9e,0xff0d3c1e,0x99000000, + 0x66000000,0x3d000000,0x21000000,0x42000000,0xff125725,0xffbdd3bc,0xffb0c4af,0xff909a8f,0xff717171,0xff727272,0xff7c7777,0xff8c8282,0xff988f8f,0xffa59f9f, + 0xffb4afaf,0xffbebbbb,0xffc6c4c4,0xffcbcaca,0xffcccccc,0xffcccccc,0xffcbcbcb,0xffcacaca,0xffafafaf,0xff686868,0xffaec5ad,0xffb8d0b6,0xff5f5f5f,0xffa4a4a4, + 0xff9e9e9e,0xff989898,0xff0d391d,0x99000000,0x66000000,0x3d000000,0x2a000000,0x4f000000,0xff0f4d22,0xff9daf9c,0xff8f9f8d,0xff859584,0xff7f8d7e,0xff6e776e, + 0xff5b5b5b,0xff636363,0xff746e6e,0xff887e7e,0xff988e8e,0xffa49d9d,0xffb2adad,0xffbbb8b8,0xffc3c1c1,0xffc7c6c6,0xffc8c8c8,0xffc5c4c4,0xffc2c2c2,0xff656565, + 0xffa7bda6,0xffb0c6ae,0xff5c5c5c,0xff9d9d9d,0xff989898,0xff919191,0xff0c371b,0x99000000,0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d3c1a,0xff6e7b6d, + 0xff5b655a,0xff4f584e,0xff4a524a,0xff4c564b,0xff545e53,0xff596059,0xff535353,0xff636363,0xff777272,0xff8b8181,0xff988e8e,0xffa39b9b,0xffaeaaaa,0xffb8b6b6, + 0xffbebdbd,0xffbfbfbf,0xffbebebe,0xff606060,0xff9bb09a,0xffa7bda6,0xff585858,0xff979797,0xff919191,0xff8c8c8c,0xff0c351a,0x99000000,0x66000000,0x3d000000, + 0x64000000,0x91000000,0xff082812,0xff767a75,0xffaeb0ad,0xffdddedd,0xfffbfbfb,0xffdddedd,0xffadafad,0xff717771,0xff525d52,0xff646d63,0xff616161,0xff6e6e6e, + 0xff7a7777,0xff8b8080,0xff968d8d,0xffa19a9a,0xffb0adad,0xffb9b8b8,0xffbababa,0xff5d5d5d,0xff8fa38e,0xff9eb29c,0xff545454,0xff909090,0xff8b8b8b,0xff858585, + 0xff0c3319,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd0d1d0,0xffb3b5b3,0xff9ca19c,0xff959a94,0xff9b9f9b,0xffb1b5b1,0xffcfd0cf, + 0xff878b87,0xff505a4f,0xff727f71,0xff828d80,0xff6f6f6f,0xff727272,0xff777272,0xff898181,0xffa09a9a,0xffafadad,0xffb5b4b4,0xff595959,0xff839682,0xff96a895, + 0xff505050,0xff8a8a8a,0xff858585,0xff818181,0xff0a3119,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac7,0xffa4a8a4,0xffa0a69f,0xffacb4ab, + 0xffaeb6ae,0xffaab1a9,0xff9ca39c,0xffa2a6a2,0xffcfd0ce,0xff6f736f,0xff5b675b,0xff7e8e7c,0xff92a491,0xff8b9a8a,0xff696969,0xff656565,0xff8a8383,0xffa29e9e, + 0xffadadad,0xff545454,0xff798a77,0xff8c9d8b,0xff4d4d4d,0xff858585,0xff808080,0xff7c7c7c,0xff0a2f17,0x99000000,0x66000000,0x3d000000,0xd9000000,0xf0a5a5a5, + 0xffa3a8a4,0xffa0a69f,0xffb5bdb4,0xffbcc6bb,0xffbcc6bc,0xffb9c3b8,0xffafb8ae,0xff9ba19a,0xffb0b3b0,0xffabadab,0xff4a534a,0xff728071,0xff899b88,0xff8da18c, + 0xff899c87,0xff81947f,0xff5b5b5b,0xff938d8d,0xffa4a3a3,0xff505050,0xff6e7f6d,0xff839281,0xff494949,0xff7f7f7f,0xff7a7a7a,0xff787878,0xff0a2e16,0x99000000, + 0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff808b83,0xffabb4ab,0xffbcc6bb,0xffbec9bd,0xffbdc8bd,0xffbcc6bb,0xffb6c0b6,0xffa5ada5,0xff989c98,0xffdddddd, + 0xff404940,0xff667466,0xff81937f,0xff869984,0xff81957f,0xff7a8d79,0xff565656,0xff7a7474,0xff989494,0xff4c4c4c,0xff647563,0xff7a887a,0xff464646,0xff7a7a7a, + 0xff767676,0xff747474,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0xec000000,0xfefbfbfb,0xff757a77,0xffa6aca6,0xffbcc6bc,0xffbdc8bd,0xffbcc6bb,0xffbac4b9, + 0xffb7c0b6,0xffa7b0a7,0xff90948f,0xfffbfbfb,0xff394039,0xff5f6c5e,0xff7a8c79,0xff7e927c,0xff7a8d79,0xff748772,0xff6e806c,0xff4d4d4d,0xff898383,0xff494949, + 0xff5b6b59,0xff717e71,0xff434343,0xff767676,0xff737373,0xff707070,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xe7000000,0xf9dcdcdc,0xff818b85,0xff959595, + 0xff9f9f9f,0xffb2b9b1,0xffbac4b9,0xffb8c3b7,0xffb3bdb3,0xffa3aaa2,0xff969a95,0xffd9dad9,0xff343c34,0xff576356,0xff71826f,0xff778975,0xff758874,0xff6f816d, + 0xff687b66,0xff4a4a4a,0xff6d6767,0xff464646,0xff51624f,0xff6a7569,0xff424242,0xff727272,0xff717171,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000, + 0xd9000000,0xf0a5a5a5,0xffa3a8a4,0xffa6a6a6,0xffbebebe,0xff9f9f9f,0xff9f9f9f,0xffacb2ab,0xffa9b2a9,0xff969b96,0xffabadaa,0xffa0a2a0,0xff2e352d,0xff4a5449, + 0xff617160,0xff6c7d6a,0xff6d7f6b,0xff697c68,0xff647762,0xff5f715c,0xff464646,0xff454545,0xff4c5d4a,0xff636c62,0xff404040,0xff727272,0xff707070,0xff6f6f6f, + 0xff0a2b14,0x99000000,0x66000000,0x3d000000,0xbd000000,0xdd575757,0xffc7cac8,0xffa8a8a8,0xffa6a6a6,0xffb4b4b4,0xffb8b8b8,0xff939393,0xff8b8b8b,0xff999a99, + 0xffc1c2c1,0xff6a6b6a,0xff2d312b,0xff374036,0xff4c574a,0xff596858,0xff61725f,0xff637660,0xff60735e,0xff5b6d59,0xff454545,0xff434343,0xff475845,0xff5b635b, + 0xff404040,0xff717171,0xff707070,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x92000000,0xb8000000,0xff6f7972,0xffd1d1d1,0xffb5b5b5,0xffa0a0a0, + 0xff999999,0xff9d9d9d,0xffafafaf,0xffc0c0c0,0xff7c7c7c,0xffe8e8e8,0xffd2d3d2,0xff2b312b,0xff313b31,0xff424e41,0xff505e4f,0xff576856,0xff596b58,0xff566853, + 0xff526550,0xff424242,0xff435441,0xff535a53,0xff3f3f3f,0xff707070,0xff6f6f6f,0xff6f6f6f,0xff0a2b14,0x99000000,0x66000000,0x3d000000,0x64000000,0x91000000, + 0xff082512,0xff797979,0xffafafaf,0xffdedede,0xfffbfbfb,0xffdcdcdc,0xffa5a5a5,0xff606060,0xffe6e6e6,0xffffffff,0xffffffff,0xffd1d1d1,0xff272a25,0xff2b332a, + 0xff3b4639,0xff485647,0xff4f5f4d,0xff50624e,0xff4f604d,0xff404040,0xff425340,0xff4d514d,0xff3f3f3f,0xff707070,0xff707070,0xff6f6f6f,0xff0a2b16,0x99000000, + 0x66000000,0x3d000000,0x40000000,0x6a000000,0xff0d381b,0xff727272,0xff5d5d5d,0xff505050,0xff4a4a4a,0xff474747,0xff414141,0xff363636,0xff767676,0xfffbfbfb, + 0xffffffff,0xffffffff,0xffd1d1d1,0xff222322,0xff252d25,0xff364135,0xff425041,0xff495946,0xff495c48,0xff4a5b47,0xff3f3f3f,0xff474947,0xff3f3f3f,0xff707070, + 0xff707070,0xff707070,0xff0a2d16,0x99000000,0x66000000,0x3d000000,0x28000000,0x4e000000,0xff0f4623,0xffa0a0a0,0xff8d8d8d,0xff818181,0xff7a7a7a,0xff757575, + 0xff696969,0xff535353,0xff3b3b3b,0xff747474,0xfffbfbfb,0xffffffff,0xffffffff,0xffd1d1d1,0xff1e1e1e,0xff232823,0xff354033,0xff404f3e,0xff455642,0xff465843, + 0xff3f3f3f,0xff414241,0xff3f3f3f,0xff707070,0xff707070,0xff717171,0xff0a2d16,0x93000000,0x62000000,0x3b000000,0x1d000000,0x3b000000,0xff124c25,0xffb6b6b6, + 0xffadadad,0xffa6a6a6,0xff9f9f9f,0xff989898,0xff8a8a8a,0xff727272,0xff535353,0xff343434,0xff707070,0xfffbfbfb,0xffffffff,0xffffffff,0xffd2d2d2,0xff222222, + 0xff242424,0xff353e34,0xff40503f,0xff435441,0xff435440,0xff3e3e3e,0xff3e3e3e,0xff707070,0xff717171,0xff727272,0xff0a2e16,0x87000000,0x5a000000,0x36000000, + 0x17000000,0x2f000000,0xff104d25,0xff104a24,0xff104823,0xff0f4523,0xff0f4220,0xff0f401f,0xff0d3c1e,0xff0c3519,0xff082914,0xff061d0f,0xff031208,0xff666866, + 0xfffbfbfb,0xffffffff,0xffffffff,0xff797b7a,0xff05170c,0xff051208,0xff05160c,0xff05190c,0xff05190c,0xff05190c,0xff0a2b16,0xff0a2d16,0xff0a2d16,0xff0a2e16, + 0xff0a2f17,0x74000000,0x4e000000,0x2e000000,0x12000000,0x25000000,0x3d000000,0x5c000000,0x74000000,0x87000000,0x93000000,0x99000000,0x9b000000,0xa1000000, + 0xad000000,0xc0000000,0xd5000000,0xe9000000,0xf8676767,0xfffbfbfb,0xfa959595,0xe6000000,0xcf000000,0xb7000000,0xa4000000,0x9c000000,0x99000000,0x99000000, 0x99000000,0x99000000,0x93000000,0x87000000,0x74000000,0x5c000000,0x3d000000,0x25000000,0xc000000,0x18000000,0x29000000,0x3d000000,0x4d000000,0x5a000000, - 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4303030,0xeb000000,0xd3000000,0xaf000000,0x8c000000, + 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4404040,0xeb000000,0xd3000000,0xaf000000,0x8c000000, 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000, 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 0x18000000,0xf000000 }; static const QRgb Games_data[] = { 0xffffff,0xffffff,0x0,0x3ceee7c6,0x9dd6ceaa,0xf4cac092,0xfff2e396,0xfff2dd78,0xf4cab549,0x9dd6b92f,0x3ceeca15,0x0,0xffffff,0xffffff, @@ -1282,27 +1282,27 @@ static const QRgb HelpBrowser_data[] = { 0x7b191919,0x6c151515,0x5b141414,0x49111111,0x350e0e0e,0x250e0e0e,0x170b0b0b,0xd000000,0x6000000,0x2000000,0x1000000,0xffffff,0xffffff,0xffffff, 0xffffff,0x1000000,0x2000000,0x62b2b2b,0xb171717,0x120e0e0e,0x1d121212,0x29131313,0x36131313,0x43131313,0x4e141414,0x58141414,0x5f181818,0x64171717, 0x65171717,0x63151515,0x5e161616,0x58141414,0x4e141414,0x420f0f0f,0x350e0e0e,0x280d0d0d,0x1c090909,0x120e0e0e,0xa000000,0x5000000,0x2000000,0x1000000, 0xffffff,0xffffff }; static const QRgb HelpButton_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0x3ed5d5d5,0x93d4d4d4,0xd5d8d8d8,0xfad5d5d5,0xd8c8c8c8,0x9ebebebe,0x508e8e8e,0xc000000,0x3000000,0xffffff,0xffffff, - 0xffffff,0xffffff,0x60d5d5d5,0xdbdddddd,0xffdcdcdc,0xffcbcbcb,0xffc5c5c5,0xffc4c4c4,0xffd0d0d0,0xe6bbbbbb,0x837d7d7d,0x18000000,0x4000000,0xffffff, - 0xffffff,0x3ed6d5d5,0xdbd3d3d3,0xffd1d1d1,0xff9c9b9b,0xff333333,0xff323132,0xff565556,0xffbababa,0xffb1b2b1,0xec8f8e8f,0x75474747,0x18000000,0x3000000, - 0xffffff,0x94cdcecd,0xffc8c7c7,0xffb2b2b2,0xff000000,0xff616161,0xffb2b2b2,0xff000000,0xff5f5f5f,0xffaaabaa,0xff9d9c9c,0xc84f4f4f,0x3d000000,0xc000000, - 0xffffff,0xd5c2c2c2,0xffafafaf,0xffa0a0a0,0xff5b5b5b,0xff757575,0xffa8a8a8,0xff000000,0xff585858,0xffa4a4a4,0xffa4a4a4,0xef4f4f4f,0x61000000,0x1a000000, - 0xffffff,0xfab4b4b4,0xff9d9d9d,0xff959595,0xffa5a5a5,0xff989898,0xff434343,0xff1d1d1d,0xff878787,0xffa1a1a1,0xff939393,0xfd4b4b4b,0x7c000000,0x25000000, - 0xffffff,0xd9a3a3a3,0xff919191,0xff989898,0xff909090,0xff4e4e4e,0xff000000,0xff919191,0xff989898,0xff949494,0xff7b7b7b,0xf2373737,0x85000000,0x2b000000, - 0xffffff,0xa0848484,0xff8c8c8b,0xff8a8b8b,0xff979797,0xff8e8e8e,0xff929291,0xff959595,0xff8c8c8c,0xff8b8c8b,0xff585758,0xdf272727,0x7c000000,0x25000000, - 0xffffff,0x515d5d5d,0xe7707070,0xff7c7c7c,0xff848484,0xff434343,0xff262626,0xff8f8f8f,0xff7f7f7f,0xff616061,0xf5313131,0xbb101010,0x61000000,0x1a000000, - 0xffffff,0xc000000,0x843f3f3f,0xed505050,0xff5d5c5c,0xff535353,0xff262626,0xff646364,0xff515051,0xf5313130,0xcd141414,0x83000000,0x3d000000,0xc000000, - 0xffffff,0x3000000,0x18000000,0x76212121,0xc92b2b2b,0xf0303030,0xfd353535,0xf32a2a2a,0xdf1d1d1d,0xbb0d0d0d,0x83000000,0x4b000000,0x18000000,0x3000000, + 0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dedede,0xfadcdcdc,0xd8d1d1d1,0x9ec8c8c8,0x509d9d9d,0xc000000,0x3000000,0xffffff,0xffffff, + 0xffffff,0xffffff,0x60dcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcdcdcd,0xffd7d7d7,0xe6c5c5c5,0x838d8d8d,0x18000000,0x4000000,0xffffff, + 0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffaaa9a9,0xff434343,0xff424142,0xff686768,0xffc4c4c4,0xffbdbdbd,0xec9e9d9e,0x75595959,0x18000000,0x3000000, + 0xffffff,0x94d5d6d5,0xffd1d0d0,0xffbdbdbd,0xff000000,0xff737373,0xffbdbdbd,0xff000000,0xff717171,0xffb6b7b6,0xffabaaaa,0xc8616161,0x3d000000,0xc000000, + 0xffffff,0xd5cbcbcb,0xffbbbbbb,0xffadadad,0xff6d6d6d,0xff868686,0xffb5b5b5,0xff000000,0xff6a6a6a,0xffb1b1b1,0xffb1b1b1,0xef616161,0x61000000,0x1a000000, + 0xffffff,0xfabfbfbf,0xffababab,0xffa4a4a4,0xffb2b2b2,0xffa6a6a6,0xff545454,0xff2a2a2a,0xff979797,0xffaeaeae,0xffa2a2a2,0xfd5d5d5d,0x7c000000,0x25000000, + 0xffffff,0xd9b0b0b0,0xffa0a0a0,0xffa6a6a6,0xff9f9f9f,0xff606060,0xff000000,0xffa0a0a0,0xffa6a6a6,0xffa3a3a3,0xff8c8c8c,0xf2484848,0x85000000,0x2b000000, + 0xffffff,0xa0949494,0xff9b9b9a,0xff9a9a9a,0xffa5a5a5,0xff9d9d9d,0xffa1a1a0,0xffa4a4a4,0xff9b9b9b,0xff9a9b9a,0xff6a696a,0xdf363636,0x7c000000,0x25000000, + 0xffffff,0x516f6f6f,0xe7818181,0xff8d8d8d,0xff949494,0xff545454,0xff353535,0xff9e9e9e,0xff8f8f8f,0xff737273,0xf5414141,0xbb1a1a1a,0x61000000,0x1a000000, + 0xffffff,0xc000000,0x84505050,0xed626262,0xff6f6e6e,0xff656565,0xff353535,0xff767576,0xff636263,0xf5414140,0xcd1f1f1f,0x83000000,0x3d000000,0xc000000, + 0xffffff,0x3000000,0x18000000,0x762f2f2f,0xc93b3b3b,0xf0404040,0xfd464646,0xf3393939,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000, 0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x85000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff, 0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x25000000,0x2b000000,0x25000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff }; static const QRgb ImageViewer_data[] = { 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, 0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1d000000,0x1b000000, 0x17000000,0x12000000,0xc000000,0x7000000,0x7000000,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0xfff0dc5c,0x3b000000,0x3d000000,0x3d000000,0x3d000000, @@ -1375,89 +1375,89 @@ static const QRgb ImageViewer_data[] = { 0x62000000,0x66000000,0x67000000,0x6a000000,0x74000000,0x89000000,0xab000000,0xce000000,0xe8000000,0xf4303030,0xeb000000,0xd3000000,0xaf000000,0x8c000000, 0x75000000,0x6a000000,0x67000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3e000000,0x3f000000,0x44000000,0x4b000000,0x54000000,0x5d000000,0x63000000, 0x65000000,0x60000000,0x57000000,0x4e000000,0x45000000,0x40000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 0x18000000,0xf000000 }; static const QRgb Ipkg_data[] = { - 0xffffff,0xffffff,0xffffff,0x1181818,0x1181818,0x2181818,0x3181818,0x4000000,0x7242424,0xf111111,0x1e111111,0x30151515,0x44161616,0x51161616, - 0x59141414,0x5b161616,0x5a141414,0x54121212,0x4a151515,0x3e151515,0x2f161616,0x22161616,0x1a141414,0x120e0e0e,0xb171717,0x8202020,0x4181818,0x3181818, - 0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0x1181818,0x2181818,0x3181818,0x5181818,0x7181818,0xb171717,0x10101010,0x1a141414,0x2f161616, - 0x50161616,0x75141414,0x94151515,0xa8151515,0xb2141414,0xb3141414,0xaf141414,0xaa151515,0x9d151515,0x8a141414,0x74161616,0x5d161616,0x48121212,0x36181818, - 0x27141414,0x1b131313,0x131b1b1b,0xc181818,0x7181818,0x5181818,0x2181818,0x1181818,0x1181818,0x3181818,0x6181818,0xc181818,0x13181818,0x1b131313, - 0x24151515,0x30151515,0x47161616,0x6d171717,0x9a161616,0xc0151515,0xe4495e64,0xf36f97a2,0xfb89c0d0,0xfe92d6ec,0xf977bacf,0xf1538d9e,0xe6325560,0xd2131313, - 0xc4151515,0xaf161616,0x96141414,0x7d161616,0x64141414,0x4e171717,0x39161616,0x28191919,0x1a181818,0x10181818,0x8181818,0x3181818,0x3181818,0x7181818, - 0x15181818,0x27181818,0x3c181818,0x4f171717,0x61181818,0x75181818,0x90151515,0xb4151515,0xd9242b2d,0xf4658792,0xffa3deee,0xffa4dff1,0xff9dddf0,0xff91d9ee, - 0xff82d3ec,0xff6ecce9,0xff5cc4e4,0xff3c7586,0xfc413229,0xf23d2417,0xda1d1916,0xc7161616,0xb1161616,0x9b171717,0x81181818,0x66191919,0x4c181818,0x32181818, - 0x18181818,0x9181818,0x6181818,0x14181818,0x33181818,0x5f181818,0x83151515,0x9c191919,0xaf171717,0xc1181818,0xd4171717,0xe71e1414,0xf86a828d,0xffa0def0, - 0xffa2def1,0xffa0def0,0xff99dbef,0xff8bd7ed,0xff78d0ea,0xff62c8e7,0xff4ec1e4,0xff3dbbe1,0xff4c7a83,0xff462617,0xff201915,0xfc3f2518,0xf24c2a19,0xdc342218, - 0xc3161616,0xb2181818,0x96181818,0x6d181818,0x3a181818,0x16181818,0xe181818,0x25181818,0x59181818,0x9c1b1717,0xcb2e1313,0xdf3f0d0d,0xec500a0a,0xf65d0505, - 0xfd680202,0xff75454c,0xff93d6ec,0xff99dbef,0xff9adcf0,0xff99dbef,0xff90d8ee,0xff82d3ec,0xff6acbe8,0xff53c3e5,0xff3dbbe1,0xff2db2da,0xff2ba2c5,0xff89674f, - 0xffc3531f,0xff9f481d,0xff6d361b,0xff342119,0xfe322119,0xf6512d1c,0xe34e2c1b,0xa8221c19,0x5e181818,0x24181818,0x21181818,0x3d181818,0x77181818,0xc52d1313, - 0xfd770101,0xff780000,0xff750000,0xff710000,0xff6c0000,0xff778190,0xff87d5ed,0xff8bd7ed,0xff8cd7ed,0xff8bd7ed,0xff82d3ec,0xff70cde9,0xff58c5e5,0xff3ebbe1, - 0xff2cafd6,0xff289ec2,0xff2591b2,0xff586f6f,0xffc0521e,0xffd15920,0xffe16123,0xffed6625,0xffd55f25,0xff9a4921,0xff482a1c,0xd246291c,0x71181818,0x2f181818, - 0x53181818,0x6c181818,0x99181818,0xcc181818,0xed3f0e0e,0xff780000,0xff740000,0xff6f0000,0xff690000,0xff6eadc4,0xff75cfea,0xff76cfea,0xff76cfea,0xff74ceea, - 0xff69cbe8,0xff55c4e5,0xff3abae1,0xff2ba9cf,0xff2696b8,0xff2287a5,0xff1f7b97,0xff326d7c,0xffb64f1e,0xffcb5821,0xffdb5f24,0xffe96628,0xfff36c2b,0xffa04c25, - 0xf9512e1e,0xc1181818,0x7b181818,0x3a181818,0x9a181818,0xab181818,0xc3181818,0xdd181818,0xea181818,0xf6540808,0xff730000,0xff6e0000,0xff670000,0xff5ec3e1, - 0xff5ec7e6,0xff5bc6e6,0xff58c5e5,0xff51c2e4,0xff44bee2,0xff2eb6df,0xff289ec2,0xff2389a8,0xff1f7995,0xff1c6d86,0xff19657b,0xff1a6176,0xff8e401c,0xffc45723, - 0xffd76028,0xffe6682a,0xffe0672c,0xff36241a,0xe7291f1a,0xcc181818,0x92181818,0x5e181818,0xd9593d1f,0xf48a5824,0xf1714a21,0xf0593d1f,0xf13e2e1c,0xf5542e1b, - 0xfd5d0f07,0xfe54160a,0xff461c0c,0xff47a6c1,0xff44bee2,0xff3dbbe1,0xff34b8e0,0xff2db1d9,0xff29a3c7,0xff248fb0,0xff1f7a96,0xff1b6981,0xff175c71,0xff155568, - 0xff144f61,0xff154756,0xff221712,0xff231913,0xff60321c,0xffa54e25,0xff6c3921,0xf64f2e1e,0xed181818,0xe1181818,0xbd181818,0x93181818,0xbd181818,0xe5553a1e, - 0xffa86927,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffab6124,0xff5c3714,0xff462c10,0xff38808e,0xff2db2da,0xff2ba8ce,0xff289ec1,0xff2591b2,0xff20809d,0xff1c6d86, - 0xff175b70,0xff134d5e,0xff114554,0xff10404f,0xff10404e,0xff0f2f38,0xff101010,0xff131312,0xff271b16,0xfe5e2f19,0xff9a5521,0xffc2812e,0xffd09936,0xfeca9435, - 0xed926d2c,0xbc4b3c20,0x93181818,0xbc181818,0xe24a341d,0xfea66827,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffae6927,0xff8f4f1d,0xff39524d,0xff289dc0,0xff2593b4, - 0xff2286a4,0xff1e7893,0xff1a677e,0xff165669,0xff124656,0xff0f3a47,0xff0d3541,0xff0d333e,0xff0d3540,0xff151a1e,0xff4d2211,0xff91501e,0xffc1802d,0xffd09936, - 0xffd09936,0xffc5822e,0xf26d5426,0xd926221a,0xb5181818,0x91181818,0x57181818,0x8a181818,0xbc181818,0xde402f1c,0xfda36626,0xffaa6a27,0xffaa6a27,0xffaa6a27, - 0xffaa6a27,0xffaf6425,0xff536157,0xff21829f,0xff1d748e,0xff19647a,0xff155466,0xff114453,0xff0e3743,0xff0c2e39,0xff1b2730,0xff502f23,0xff8f5120,0xffbe802e, - 0xffd09936,0xffd09936,0xffce9635,0xffb06825,0xff75290f,0xff3c0101,0xc9181818,0xa3181818,0x76181818,0x53181818,0x28181818,0x52181818,0x8c181818,0xbe181818, - 0xdf37291b,0xffa26525,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffaa6a27,0xffad6a27,0xff976134,0xff1e6478,0xff155568,0xff144555,0xff272a33,0xff5a2b1e,0xff965020, - 0xffbf802d,0xffd09936,0xffd09936,0xffd09936,0xffc38930,0xff8a4c1b,0xff3f1006,0xff310000,0xff390101,0xff400202,0x9b191919,0x6a181818,0x40181818,0x25181818, - 0x10181818,0x29181818,0x56181818,0x93181818,0xc5191919,0xff6c4019,0xff82511e,0xff88551f,0xff905a21,0xffa26327,0xffb66e2e,0xffb26b29,0xffb36727,0xff6a2b1b, - 0xff9c4f1e,0xffc0802d,0xffd09936,0xffd09936,0xffd09936,0xffd09936,0xffa4732a,0xff593515,0xff2a0403,0xff320000,0xff3d0000,0xff490000,0xff510101,0xff550707, - 0x7b171717,0x4a181818,0x26181818,0x12181818,0x8181818,0x15181818,0x33181818,0x65181818,0x9d181818,0xffc86637,0xff9e562b,0xff98552b,0xff894f28,0xff7f4b25, - 0xff7c4a24,0xffb9693d,0xfff77f4a,0xffa04e1d,0xffd09936,0xffd09936,0xffd09936,0xffc48e32,0xff81561f,0xff3a1b0d,0xff230909,0xff2d0606,0xff3c0202,0xff4a0000, - 0xff580000,0xff660101,0xff6a0707,0xff680f0f,0x6d171717,0x3f181818,0x1f181818,0xd181818,0x5181818,0xf181818,0x23181818,0x49181818,0x7d181818,0xffd66d3e, - 0xffef7c49,0xfffc8853,0xffff8e5c,0xfffe9261,0xfffd9262,0xfffb9061,0xfff88c5b,0xff460202,0xff7f4d1c,0xffac792b,0xff653a15,0xff2e0502,0xff2c0202,0xff300606, - 0xff320909,0xff400606,0xff550202,0xff670000,0xff770101,0xff7f0808,0xff7f1010,0xff761616,0x6a181818,0x3d181818,0x1e181818,0xd181818,0x4181818,0xd181818, - 0x1e181818,0x3f181818,0x6c181818,0xffd16c3f,0xffed7d4b,0xfffb8956,0xffff915f,0xffff9666,0xfffe9769,0xfffb9567,0xfff88f61,0xff3a0202,0xff360101,0xff350000, - 0xff370000,0xff3c0000,0xff420202,0xff440606,0xff420909,0xff560606,0xff710202,0xff840303,0xff8f0b0b,0xff951212,0xff8d1818,0xff7d1d1d,0x68181818,0x3c181818, - 0x1d181818,0xc181818,0x4181818,0xc181818,0x1d181818,0x3b181818,0x66181818,0xffcb6b3f,0xffeb7d4b,0xfffb8b59,0xffff9362,0xffff9869,0xfffd996c,0xfffa976c, - 0xfff79366,0xff470303,0xff480101,0xff4c0101,0xff500000,0xff570000,0xff5c0202,0xff5a0606,0xff550909,0xff6c0606,0xff890606,0xff990d0d,0xffa11414,0xffa31c1c, - 0xff942121,0xff7c2121,0x68181818,0x3c181818,0x1d181818,0xc181818,0x4181818,0xb181818,0x1b181818,0x39181818,0x63181818,0xffc7693f,0xffe97c4c,0xfffb8b59, - 0xffff9464,0xffff996b,0xfffd9b6e,0xfffa996e,0xfff69469,0xff530505,0xff5b0202,0xff630101,0xff6b0000,0xff720000,0xff760202,0xff6e0606,0xff650a0a,0xff7b0a0a, - 0xff981010,0xffa81818,0xffae2020,0xffab2323,0xff982626,0xff792525,0x67181818,0x3b181818,0x1d181818,0xc181818,0x3181818,0xa181818,0x19181818,0x35181818, - 0x5d181818,0xffc0673e,0xffe57b4b,0xfffa8a59,0xfffe9363,0xffff996b,0xfffd9b6f,0xfff99a6f,0xfff5966a,0xff5d0606,0xff6b0303,0xff780101,0xff800000,0xff890000, - 0xff8a0202,0xff7d0909,0xff6f1010,0xff861313,0xffa21b1b,0xffb12323,0xffb42929,0xffb02d2d,0xff972c2c,0xff752727,0x65181818,0x3a181818,0x1c181818,0xc181818, - 0x3181818,0x9181818,0x16181818,0x2e181818,0x52181818,0xffb8623c,0xffdc7749,0xfff58756,0xfffd9161,0xfffe996a,0xfffc9b6e,0xfff8996f,0xfff4956b,0xff610808, - 0xff750404,0xff880101,0xff920000,0xff9a0000,0xff980505,0xff871111,0xff761717,0xff8d1c1c,0xffaa2626,0xffb62e2e,0xffb83333,0xffb03434,0xff953030,0xff6e2828, - 0x60181818,0x37181818,0x1b181818,0xb181818,0x2181818,0x7181818,0x11181818,0x25181818,0x43181818,0xc69e5d40,0xffcb6f46,0xffe98153,0xfff88d5e,0xfffd9667, - 0xfffb986c,0xfff7986d,0xfff39469,0xff610909,0xff7b0404,0xff920101,0xff9f0000,0xffa60404,0xffa21111,0xff8c1b1b,0xff791f1f,0xff912727,0xffad3131,0xffb73636, - 0xffb53a3a,0xffa93838,0xff8a3131,0xff652929,0x57181818,0x31181818,0x18181818,0xa181818,0x1181818,0x5181818,0xc181818,0x1a181818,0x32181818,0x5a363636, - 0xc59b6247,0xfed4774e,0xffec8759,0xfff99162,0xfffb9669,0xfff59569,0xfff09267,0xff600a0a,0xff800505,0xff9b0101,0xffa90404,0xffad1010,0xffa71e1e,0xff902424, - 0xff7b2828,0xff912f2f,0xffa73838,0xffab3d3d,0xffa03b3b,0xff8d3737,0xff712e2e,0xff582727,0x48181818,0x29181818,0x13181818,0x8181818,0x1181818,0x3181818, - 0x7181818,0x11181818,0x21181818,0x39181818,0x61373737,0xc19c6851,0xfdd97c54,0xffed895c,0xfff69063,0xfff39165,0xffee8e63,0xff600b0b,0xff830505,0xffa10404, - 0xffad1010,0xffb11e1e,0xffa92929,0xff8f2d2d,0xff762d2d,0xff853333,0xff903939,0xff883838,0xff773333,0xfb682f2f,0xd8632c2c,0x834d2424,0x36181818,0x1e181818, - 0xe181818,0x6181818,0xffffff,0x1181818,0x4181818,0xa181818,0x14181818,0x24181818,0x3b181818,0x62373737,0xb9966a55,0xfed97d54,0xffeb885c,0xffed8b5f, - 0xffe9895e,0xff5e0b0b,0xff850707,0xffa31010,0xffad1e1e,0xffaa2929,0xff9c3030,0xff7e3030,0xff622c2c,0xff673030,0xfe683030,0xee673131,0xba592b2b,0x6a241c1c, - 0x4d181818,0x37181818,0x23181818,0x13181818,0x9181818,0x4181818,0xffffff,0x1181818,0x2181818,0x5181818,0xa181818,0x15181818,0x24181818,0x3a181818, - 0x5f333333,0xb3946957,0xfcd87c53,0xffe18256,0xffe18256,0xff5b0d0d,0xff801010,0xff981b1b,0xff9b2727,0xff902e2e,0xff7b3030,0xff5e2c2c,0xfb4d2929,0xd9582c2c, - 0x8d3d2323,0x5e181818,0x4d181818,0x3d181818,0x2d181818,0x1f181818,0x14181818,0xa181818,0x5181818,0x2181818,0xffffff,0xffffff,0x1181818,0x2181818, - 0x5181818,0xb181818,0x14181818,0x23181818,0x38181818,0x5a303030,0xa9896554,0xfacf754f,0xffd7794f,0xff511212,0xff6b1818,0xff792121,0xff732727,0xfe652a2a, - 0xe8602b2b,0xb44d2828,0x691d1919,0x55181818,0x46181818,0x38181818,0x2b181818,0x21181818,0x17181818,0xf181818,0x9181818,0x5181818,0x2181818,0x1181818, - 0xffffff,0xffffff,0xffffff,0x1181818,0x2181818,0x5181818,0xa181818,0x14181818,0x22181818,0x36181818,0x552a2a2a,0x9a836251,0xf7ca7147,0xff441616, - 0xff4e1b1b,0xf65c2121,0xca5b2525,0x7e321e1e,0x5b181818,0x4c181818,0x3d181818,0x31181818,0x26181818,0x1d181818,0x15181818,0xf181818,0xa181818,0x6181818, - 0x4181818,0x2181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1181818,0x2181818,0x4181818,0xa181818,0x12181818,0x20181818, - 0x31181818,0x48272727,0xa782493f,0xdb571818,0x974b1c1c,0x5a181818,0x4f181818,0x42181818,0x35181818,0x2a181818,0x20181818,0x18181818,0x12181818,0xd181818, - 0x9181818,0x6181818,0x4181818,0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1181818, - 0x2181818,0x4181818,0x9181818,0x10181818,0x1b181818,0x27181818,0x34272727,0x38181818,0x39181818,0x34181818,0x2c181818,0x23181818,0x1b181818,0x14181818, - 0xe181818,0xa181818,0x7181818,0x5181818,0x3181818,0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0xffffff,0x1181818,0x2181818,0x4181818,0x7181818,0xd181818,0x14181818,0x19181818,0x1d181818,0x1d181818,0x1a181818, - 0x15181818,0x10181818,0xc181818,0x8181818,0x5181818,0x4181818,0x2181818,0x1181818,0x1181818,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, + 0xffffff,0xffffff,0xffffff,0x1242424,0x1242424,0x2242424,0x3242424,0x4000000,0x7333333,0xf1b1b1b,0x1e1b1b1b,0x30202020,0x44222222,0x51222222, + 0x591f1f1f,0x5b222222,0x5a1f1f1f,0x541d1d1d,0x4a202020,0x3e202020,0x2f222222,0x22222222,0x1a1f1f1f,0x12171717,0xb232323,0x82e2e2e,0x4242424,0x3242424, + 0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0x1242424,0x2242424,0x3242424,0x5242424,0x7242424,0xb232323,0x101a1a1a,0x1a1f1f1f,0x2f222222, + 0x50222222,0x751f1f1f,0x94202020,0xa8202020,0xb21f1f1f,0xb31f1f1f,0xaf1f1f1f,0xaa202020,0x9d202020,0x8a1f1f1f,0x74222222,0x5d222222,0x481d1d1d,0x36242424, + 0x271f1f1f,0x1b1e1e1e,0x13282828,0xc242424,0x7242424,0x5242424,0x2242424,0x1242424,0x1242424,0x3242424,0x6242424,0xc242424,0x13242424,0x1b1e1e1e, + 0x24202020,0x30202020,0x47222222,0x6d232323,0x9a222222,0xc0202020,0xe45b7076,0xf380a5af,0xfb99cad7,0xfea1ddef,0xf988c4d7,0xf1659cac,0xe6426772,0xd21e1e1e, + 0xc4202020,0xaf222222,0x961f1f1f,0x7d222222,0x641f1f1f,0x4e232323,0x39222222,0x28252525,0x1a242424,0x10242424,0x8242424,0x3242424,0x3242424,0x7242424, + 0x15242424,0x27242424,0x3c242424,0x4f232323,0x61242424,0x75242424,0x90202020,0xb4202020,0xd9333b3d,0xf47797a1,0xffb0e3f1,0xffb1e4f3,0xffabe3f3,0xffa0dff1, + 0xff92daef,0xff7fd4ed,0xff6ecde8,0xff4d8696,0xfc524238,0xf24e3323,0xda2a2522,0xc7222222,0xb1222222,0x9b232323,0x81242424,0x66252525,0x4c242424,0x32242424, + 0x18242424,0x9242424,0x6242424,0x14242424,0x33242424,0x5f242424,0x83202020,0x9c252525,0xaf232323,0xc1242424,0xd4232323,0xe72b1f1f,0xf87b929c,0xffade3f3, + 0xffafe3f3,0xffade3f3,0xffa7e1f2,0xff9addf0,0xff89d7ee,0xff74d1eb,0xff60cbe8,0xff4ec5e6,0xff5e8b93,0xff583523,0xff2e2520,0xfc503424,0xf25e3925,0xdc453024, + 0xc3222222,0xb2242424,0x96242424,0x6d242424,0x3a242424,0x16242424,0xe242424,0x25242424,0x59242424,0x9c282323,0xcb3e1e1e,0xdf501616,0xec621212,0xf66f0a0a, + 0xfd7a0505,0xff86575e,0xffa2ddef,0xffa7e1f2,0xffa8e2f3,0xffa7e1f2,0xff9fdef1,0xff92daef,0xff7bd3ec,0xff65cce9,0xff4ec5e6,0xff3dbde0,0xff3bafce,0xff997961, + 0xffcc652d,0xffad5a2a,0xff7e4728,0xff452f25,0xfe422f25,0xf6633d29,0xe3603c28,0xa8302925,0x5e242424,0x24242424,0x21242424,0x3d242424,0x77242424,0xc53d1e1e, + 0xfd880303,0xff890000,0xff860000,0xff820000,0xff7d0000,0xff88919f,0xff97dcf0,0xff9addf0,0xff9bddf0,0xff9addf0,0xff92daef,0xff81d5ed,0xff6acee9,0xff4fc5e6, + 0xff3cbbdd,0xff37accb,0xff34a0bd,0xff6a8080,0xffca642b,0xffd86b2e,0xffe67331,0xfff07834,0xffdc7134,0xffa85b2f,0xff5a3929,0xd2583829,0x71242424,0x2f242424, + 0x53242424,0x6c242424,0x99242424,0xcc242424,0xed501717,0xff890000,0xff850000,0xff800000,0xff7a0000,0xff7fb9cd,0xff86d7ee,0xff87d7ee,0xff87d7ee,0xff85d6ee, + 0xff7ad3ec,0xff67cde9,0xff4bc4e6,0xff3bb6d7,0xff35a4c3,0xff3097b2,0xff2d8ca5,0xff427e8d,0xffc1612b,0xffd36a2f,0xffe17133,0xffed7837,0xfff57d3b,0xffad5e34, + 0xf9633e2b,0xc1242424,0x7b242424,0x3a242424,0x9a242424,0xab242424,0xc3242424,0xdd242424,0xea242424,0xf6660f0f,0xff840000,0xff7f0000,0xff790000,0xff70cce6, + 0xff70d0ea,0xff6dcfea,0xff6acee9,0xff63cbe8,0xff56c8e7,0xff3ec1e4,0xff37accb,0xff3199b5,0xff2d8aa4,0xff297e96,0xff25778c,0xff277387,0xff9d5129,0xffcd6931, + 0xffdd7237,0xffea7a39,0xffe5793c,0xff473327,0xe7382d27,0xcc242424,0x92242424,0x5e242424,0xd96b4e2d,0xf49a6a33,0xf1825c2f,0xf06b4e2d,0xf14f3e29,0xf5663e28, + 0xfd6f190d,0xfe662212,0xff582914,0xff59b3cb,0xff56c8e7,0xff4ec5e6,0xff45c3e5,0xff3dbddf,0xff38b0d0,0xff339ebc,0xff2d8ba4,0xff287a91,0xff236e82,0xff20677a, + 0xff1f6173,0xff205968,0xff30231d,0xff31251e,0xff724229,0xffb26034,0xff7d4a2f,0xf6613e2b,0xed242424,0xe1242424,0xbd242424,0x93242424,0xbd242424,0xe5674b2b, + 0xffb57a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb77333,0xff6e481f,0xff583c1a,0xff49909d,0xff3dbde0,0xff3bb5d6,0xff37accb,0xff34a0bd,0xff2e90ab,0xff297e96, + 0xff236d81,0xff1e5f70,0xff1b5766,0xff1a5161,0xff1a5160,0xff193f49,0xff1a1a1a,0xff1e1e1d,0xff362822,0xfe703f25,0xffa8672f,0xffcb913e,0xffd7a747,0xfed2a346, + 0xeda17e3c,0xbc5d4d2e,0x93242424,0xbc242424,0xe25c452a,0xfeb37a36,0xffb67b36,0xffb67b36,0xffb67b36,0xffba7a36,0xff9e612a,0xff4a645f,0xff37abca,0xff34a2bf, + 0xff3096b1,0xff2b89a2,0xff27798e,0xff22687a,0xff1d5868,0xff194b59,0xff164652,0xff16434f,0xff164651,0xff20272b,0xff5f301b,0xffa0622b,0xffcb903d,0xffd7a747, + 0xffd7a747,0xffce923e,0xf27e6635,0xd9353027,0xb5242424,0x91242424,0x57242424,0x8a242424,0xbc242424,0xde513f29,0xfdb07835,0xffb67b36,0xffb67b36,0xffb67b36, + 0xffb67b36,0xffbb7634,0xff657369,0xff2f92ad,0xff2a859d,0xff25768b,0xff206678,0xff1b5665,0xff174854,0xff143e4a,0xff283640,0xff623f31,0xff9e632e,0xffc8903e, + 0xffd7a747,0xffd7a747,0xffd6a446,0xffbc7a34,0xff863819,0xff4d0303,0xc9242424,0xa3242424,0x76242424,0x53242424,0x28242424,0x52242424,0x8c242424,0xbe242424, + 0xdf483828,0xffaf7734,0xffb67b36,0xffb67b36,0xffb67b36,0xffb67b36,0xffb97b36,0xffa57345,0xff2b7689,0xff20677a,0xff1f5767,0xff363943,0xff6c3b2b,0xffa4622e, + 0xffc9903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffcc9940,0xff9a5e28,0xff501a0c,0xff410000,0xff4a0303,0xff510505,0x9b252525,0x6a242424,0x40242424,0x25242424, + 0x10242424,0x29242424,0x56242424,0x93242424,0xc5252525,0xff7d5125,0xff92632b,0xff98672d,0xff9f6c2f,0xffaf7536,0xffc17f3e,0xffbd7c38,0xffbe7936,0xff7b3b28, + 0xffaa612b,0xffca903d,0xffd7a747,0xffd7a747,0xffd7a747,0xffd7a747,0xffb18439,0xff6b4620,0xff390806,0xff420000,0xff4e0000,0xff5b0000,0xff630303,0xff670d0d, + 0x7b232323,0x4a242424,0x26242424,0x12242424,0x8242424,0x15242424,0x33242424,0x65242424,0x9d242424,0xffd17848,0xffac683b,0xffa6673b,0xff996137,0xff8f5d34, + 0xff8d5c33,0xffc47a4e,0xfff88f5c,0xffad602a,0xffd7a747,0xffd7a747,0xffd7a747,0xffcd9d42,0xff91682d,0xff4b2816,0xff311010,0xff3d0c0c,0xff4d0505,0xff5c0000, + 0xff6a0000,0xff780303,0xff7b0d0d,0xff7a1919,0x6d232323,0x3f242424,0x1f242424,0xd242424,0x5242424,0xf242424,0x23242424,0x49242424,0x7d242424,0xffdd7e4f, + 0xfff28d5b,0xfffd9865,0xffff9d6e,0xfffea173,0xfffda174,0xfffc9f73,0xfff99b6d,0xff580505,0xff8f5f29,0xffb88a3b,0xff774b20,0xff3e0a05,0xff3c0505,0xff400c0c, + 0xff421010,0xff510c0c,0xff670505,0xff790000,0xff880303,0xff8f0f0f,0xff8f1a1a,0xff872222,0x6a242424,0x3d242424,0x1e242424,0xd242424,0x4242424,0xd242424, + 0x1e242424,0x3f242424,0x6c242424,0xffd87d50,0xfff08d5d,0xfffc9968,0xffffa071,0xffffa478,0xfffea57a,0xfffca479,0xfff99e73,0xff4b0505,0xff470303,0xff460000, + 0xff480000,0xff4d0000,0xff530505,0xff560c0c,0xff531010,0xff680c0c,0xff820505,0xff940606,0xff9e1313,0xffa41d1d,0xff9c2424,0xff8d2a2a,0x68242424,0x3c242424, + 0x1d242424,0xc242424,0x4242424,0xc242424,0x1d242424,0x3b242424,0x66242424,0xffd37c50,0xffee8d5d,0xfffc9a6b,0xffffa274,0xffffa67a,0xfffda77d,0xfffba57d, + 0xfff8a278,0xff590606,0xff5a0303,0xff5e0303,0xff620000,0xff690000,0xff6e0505,0xff6c0c0c,0xff671010,0xff7d0c0c,0xff990c0c,0xffa71616,0xffae1f1f,0xffb02929, + 0xffa32f2f,0xff8d2f2f,0x68242424,0x3c242424,0x1d242424,0xc242424,0x4242424,0xb242424,0x1b242424,0x39242424,0x63242424,0xffd07a50,0xffed8d5e,0xfffc9a6b, + 0xffffa376,0xffffa77c,0xfffda97f,0xfffba77f,0xfff8a37a,0xff650a0a,0xff6d0505,0xff750303,0xff7c0000,0xff830000,0xff870505,0xff7f0c0c,0xff771212,0xff8c1212, + 0xffa61a1a,0xffb52424,0xffba2e2e,0xffb73131,0xffa63535,0xff8a3434,0x67242424,0x3b242424,0x1d242424,0xc242424,0x3242424,0xa242424,0x19242424,0x35242424, + 0x5d242424,0xffca794f,0xffe98c5d,0xfffb9a6b,0xfffea275,0xffffa77c,0xfffda980,0xfffaa880,0xfff7a47b,0xff6f0c0c,0xff7c0606,0xff890303,0xff900000,0xff990000, + 0xff9a0505,0xff8d1010,0xff801a1a,0xff961e1e,0xffaf2828,0xffbd3131,0xffbf3838,0xffbc3d3d,0xffa53c3c,0xff863636,0x65242424,0x3a242424,0x1c242424,0xc242424, + 0x3242424,0x9242424,0x16242424,0x2e242424,0x52242424,0xffc3744d,0xffe2885b,0xfff79768,0xfffda073,0xfffea77b,0xfffda97f,0xfff9a780,0xfff6a47c,0xff730f0f, + 0xff860808,0xff980303,0xffa10000,0xffa80000,0xffa60a0a,0xff971b1b,0xff872323,0xff9c2929,0xffb63535,0xffc13e3e,0xffc34343,0xffbc4545,0xffa44040,0xff7f3737, + 0x60242424,0x37242424,0x1b242424,0xb242424,0x2242424,0x7242424,0x11242424,0x25242424,0x43242424,0xc6ac6f51,0xffd38058,0xffed9165,0xfff99c70,0xfffda479, + 0xfffca67d,0xfff8a67e,0xfff5a37a,0xff731010,0xff8c0808,0xffa10303,0xffad0000,0xffb30808,0xffaf1b1b,0xff9b2828,0xff8a2d2d,0xffa03636,0xffb94141,0xffc24747, + 0xffc04b4b,0xffb64949,0xff9a4141,0xff773838,0x57242424,0x31242424,0x18242424,0xa242424,0x1242424,0x5242424,0xc242424,0x1a242424,0x32242424,0x5a474747, + 0xc5a97459,0xfedb8860,0xffef976b,0xfffaa074,0xfffca47a,0xfff7a47a,0xfff3a179,0xff721212,0xff900a0a,0xffa90303,0xffb60808,0xffb91a1a,0xffb42b2b,0xff9f3333, + 0xff8c3737,0xffa03f3f,0xffb44949,0xffb74e4e,0xffad4c4c,0xff9c4848,0xff823e3e,0xff6a3636,0x48242424,0x29242424,0x13242424,0x8242424,0x1242424,0x3242424, + 0x7242424,0x11242424,0x21242424,0x39242424,0x61484848,0xc1aa7a63,0xfddf8d66,0xfff0996e,0xfff89f75,0xfff5a077,0xfff19d75,0xff721313,0xff930a0a,0xffae0808, + 0xffb91a1a,0xffbd2b2b,0xffb63838,0xff9e3d3d,0xff873d3d,0xff954343,0xff9f4a4a,0xff984949,0xff884343,0xfb7a3f3f,0xd8753c3c,0x835f3333,0x36242424,0x1e242424, + 0xe242424,0x6242424,0xffffff,0x1242424,0x4242424,0xa242424,0x14242424,0x24242424,0x3b242424,0x62484848,0xb9a47b67,0xfedf8d66,0xffee986e,0xfff09a71, + 0xffed9970,0xff701313,0xff950d0d,0xffb01a1a,0xffb92b2b,0xffb63838,0xffaa4040,0xff8e4040,0xff743c3c,0xff794040,0xfe7a4040,0xee794141,0xba6b3b3b,0x6a332929, + 0x4d242424,0x37242424,0x23242424,0x13242424,0x9242424,0x4242424,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x15242424,0x24242424,0x3a242424, + 0x5f434343,0xb3a37a69,0xfcde8d65,0xffe69268,0xffe69268,0xff6d1616,0xff901a1a,0xffa62828,0xffa93636,0xff9f3e3e,0xff8c4040,0xff703c3c,0xfb5f3838,0xd96a3c3c, + 0x8d4e3131,0x5e242424,0x4d242424,0x3d242424,0x2d242424,0x1f242424,0x14242424,0xa242424,0x5242424,0x2242424,0xffffff,0xffffff,0x1242424,0x2242424, + 0x5242424,0xb242424,0x14242424,0x23242424,0x38242424,0x5a404040,0xa9997766,0xfad78661,0xffdd8a61,0xff631d1d,0xff7c2424,0xff8a2f2f,0xff843636,0xfe773939, + 0xe8723b3b,0xb45f3737,0x692a2525,0x55242424,0x46242424,0x38242424,0x2b242424,0x21242424,0x17242424,0xf242424,0x9242424,0x5242424,0x2242424,0x1242424, + 0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x5242424,0xa242424,0x14242424,0x22242424,0x36242424,0x55393939,0x9a937463,0xf7d28259,0xff562222, + 0xff602828,0xf66e2f2f,0xca6d3434,0x7e422b2b,0x5b242424,0x4c242424,0x3d242424,0x31242424,0x26242424,0x1d242424,0x15242424,0xf242424,0xa242424,0x6242424, + 0x4242424,0x2242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0xa242424,0x12242424,0x20242424, + 0x31242424,0x48363636,0xa7925b50,0xdb692424,0x975d2929,0x5a242424,0x4f242424,0x42242424,0x35242424,0x2a242424,0x20242424,0x18242424,0x12242424,0xd242424, + 0x9242424,0x6242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0x1242424, + 0x2242424,0x4242424,0x9242424,0x10242424,0x1b242424,0x27242424,0x34363636,0x38242424,0x39242424,0x34242424,0x2c242424,0x23242424,0x1b242424,0x14242424, + 0xe242424,0xa242424,0x7242424,0x5242424,0x3242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, + 0xffffff,0xffffff,0xffffff,0xffffff,0x1242424,0x2242424,0x4242424,0x7242424,0xd242424,0x14242424,0x19242424,0x1d242424,0x1d242424,0x1a242424, + 0x15242424,0x10242424,0xc242424,0x8242424,0x5242424,0x4242424,0x2242424,0x1242424,0x1242424,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff }; static const QRgb Language_data[] = { 0x1000000,0x4000000,0xb000000,0x17000000,0x27000000,0x39000000,0x49000000,0x58000000,0x805f3131,0x90773939,0x90763434,0x73461b1b,0x50000000,0x3d000000, 0x28000000,0x16000000,0xb000000,0x7000000,0xb000000,0x18000000,0x26000000,0x31000000,0x34000000,0x2e000000,0x21000000,0x13000000,0x8000000,0x2000000, 0xffffff,0xffffff,0xffffff,0xffffff,0x4000000,0xd000000,0x1d000000,0x32000000,0x4b000000,0x8c7b4848,0xc8c17272,0xfffc8b8b,0xfffc7576,0xfffb6666, 0xfffb5e5f,0xfffb5859,0xefe94849,0xa6981a1b,0x4c000000,0x2d000000,0x17000000,0x10000000,0x18000000,0x2b000000,0x82a66d6f,0xdfe98d8f,0xfffb777a,0xc5d83c40, @@ -1916,38 +1916,38 @@ static const QRgb NetHack_data[] = { 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3e000000,0x3e000000, 0x3e000000,0x3e000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 0x18000000,0xf000000 }; static const QRgb OKButton_data[] = { 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0xffffff,0x3ed5d5d5,0x93d4d4d4,0xd5d9d9d9,0xfed8d8d8,0xf8d2d2d2,0xeed5d5d5,0xe1d1d1d1,0xdcd3d3d3,0xe1d3d3d3,0xe6d4d4d4, - 0xecd6d6d6,0xf1d5d5d5,0xf6d5d5d5,0xfbd6d6d6,0xfed7d7d7,0xffd8d8d8,0xffd6d6d6,0xd9cacaca,0xa1bebebe,0x518f8f8f,0xc000000,0x3000000,0xffffff,0xffffff, - 0xffffff,0xffffff,0xffffff,0x5fd5d5d5,0xdbdddddd,0xffdcdcdc,0xffcbcbcb,0xffc5c5c5,0xffc3c3c3,0xffcdcdcd,0xffc7c7c7,0xffc4c4c4,0xffc5c5c5,0xffc5c5c5, - 0xffc4c4c4,0xffc3c3c3,0xffc4c4c4,0xffc5c5c5,0xffc8c8c8,0xffcacaca,0xffcbcbcb,0xffcccccc,0xffd5d5d5,0xe7bdbdbd,0x847e7e7e,0x18000000,0x4000000,0xffffff, - 0xffffff,0xffffff,0x3ed6d5d5,0xdbd3d3d3,0xffd1d1d1,0xffc0bfbf,0xffbcbcbc,0xffb7b6b7,0xffb9b8b9,0xff989898,0xff313131,0xff323232,0xff555555,0xffbababa, - 0xff969696,0xff323232,0xff989798,0xffc1c0c1,0xff797879,0xffa6a5a6,0xffcecdce,0xffcecdce,0xffcbcbcb,0xffbbbcbb,0xed939293,0x76484848,0x18000000,0x3000000, - 0xffffff,0xffffff,0x93cccdcc,0xffc8c7c7,0xffb0b0b0,0xffaeadad,0xffb2b2b2,0xffb0b0b0,0xffafaeae,0xff000000,0xff5b5c5b,0xffb2b1b1,0xff000000,0xff606060, - 0xff828282,0xff000000,0xff878787,0xff6a6a6a,0xff1a1a1a,0xffa4a4a4,0xffc8c8c8,0xffc9c8c8,0xffc7c7c7,0xffbdbebd,0xffa6a5a5,0xc9505050,0x3d000000,0xc000000, - 0xffffff,0xffffff,0xd5c1c1c1,0xffacacac,0xff999999,0xffa1a1a1,0xff9b9a9a,0xffa4a4a4,0xff989898,0xff000000,0xff565656,0xffa9a9a9,0xff000000,0xff565656, - 0xff757575,0xff000000,0xff474747,0xff191919,0xff8e8e8e,0xffbababa,0xffb5b5b5,0xffb0b0b0,0xffbcbcbc,0xffbbbbbb,0xffafafaf,0xf0545454,0x61000000,0x1a000000, - 0xffffff,0xffffff,0xfab3b3b3,0xff969696,0xff878787,0xff9a9a9a,0xff919191,0xff8c8c8c,0xff929292,0xff000000,0xff515151,0xff959595,0xff000000,0xff4d4d4d, - 0xff686868,0xff000000,0xff000000,0xff909090,0xffafafaf,0xff9f9f9f,0xff999999,0xffa5a5a5,0xffb0b0b0,0xffb7b7b7,0xff9f9f9f,0xfd505050,0x7c000000,0x25000000, - 0xffffff,0xffffff,0xd8a0a0a0,0xff888888,0xff858585,0xff7a7a7a,0xff838383,0xff8a8a8a,0xff838383,0xff000000,0xff464646,0xff878787,0xff000000,0xff494949, - 0xff636363,0xff000000,0xff1e1e1e,0xff212121,0xff9b9b9b,0xffa6a6a6,0xff9f9f9f,0xffa0a0a0,0xffacacac,0xffa7a7a7,0xff858585,0xf2393939,0x85000000,0x2b000000, - 0xffffff,0xffffff,0x9e818181,0xff848483,0xff757676,0xff7b7b7b,0xff707070,0xff777776,0xff797979,0xff000000,0xff434443,0xff737273,0xff000000,0xff3e3e3e, - 0xff555554,0xff000000,0xff616160,0xff3d3d3c,0xff2c2c2c,0xff8f8f8f,0xffa1a1a1,0xffa5a5a5,0xff9e9e9e,0xff979897,0xff5e5d5e,0xdf282828,0x7c000000,0x25000000, - 0xffffff,0xffffff,0x505b5b5b,0xe66a6a6a,0xff6c6c6c,0xff686868,0xff656666,0xff656565,0xff6c6d6c,0xff373737,0xff0d0d0d,0xff1c1c1c,0xff131414,0xff585959, - 0xff4a4a4a,0xff000000,0xff4f4f4f,0xff727272,0xff373737,0xff6d6d6d,0xff979797,0xff989998,0xff878787,0xff666566,0xf5333333,0xbb101010,0x61000000,0x1a000000, - 0xffffff,0xffffff,0xc000000,0x833c3c3c,0xec474747,0xff4c4b4b,0xff535352,0xff575757,0xff575657,0xff595859,0xff585857,0xff545453,0xff525251,0xff535352, - 0xff545454,0xff565656,0xff5a5a5a,0xff606060,0xff696969,0xff717171,0xff707070,0xff666566,0xff535253,0xf5323231,0xce161616,0x83000000,0x3d000000,0xc000000, - 0xffffff,0xffffff,0x3000000,0x18000000,0x751f1f1f,0xc8262626,0xef272727,0xff2e2e2e,0xfd282828,0xfa262626,0xf5242424,0xf3232323,0xf5262626,0xf7262626, - 0xf9282828,0xfa292929,0xfc2c2c2c,0xfe2d2d2d,0xff323232,0xff343434,0xff343434,0xf3292929,0xdf1d1d1d,0xbb0d0d0d,0x83000000,0x4b000000,0x18000000,0x3000000, + 0xffffff,0xffffff,0xffffff,0xffffff,0x3edcdcdc,0x93dbdbdb,0xd5dfdfdf,0xfededede,0xf8d9d9d9,0xeedcdcdc,0xe1d8d8d8,0xdcdadada,0xe1dadada,0xe6dbdbdb, + 0xecdddddd,0xf1dcdcdc,0xf6dcdcdc,0xfbdddddd,0xfedddddd,0xffdedede,0xffdddddd,0xd9d2d2d2,0xa1c8c8c8,0x519e9e9e,0xc000000,0x3000000,0xffffff,0xffffff, + 0xffffff,0xffffff,0xffffff,0x5fdcdcdc,0xdbe3e3e3,0xffe2e2e2,0xffd3d3d3,0xffcecece,0xffcccccc,0xffd5d5d5,0xffd0d0d0,0xffcdcdcd,0xffcecece,0xffcecece, + 0xffcdcdcd,0xffcccccc,0xffcdcdcd,0xffcecece,0xffd1d1d1,0xffd2d2d2,0xffd3d3d3,0xffd4d4d4,0xffdcdcdc,0xe7c7c7c7,0x848e8e8e,0x18000000,0x4000000,0xffffff, + 0xffffff,0xffffff,0x3edddcdc,0xdbdadada,0xffd8d8d8,0xffcac9c9,0xffc6c6c6,0xffc2c1c2,0xffc4c3c4,0xffa6a6a6,0xff414141,0xff424242,0xff676767,0xffc4c4c4, + 0xffa4a4a4,0xff424242,0xffa6a5a6,0xffcbcacb,0xff8a898a,0xffb3b2b3,0xffd6d5d6,0xffd6d5d6,0xffd3d3d3,0xffc5c6c5,0xeda2a1a2,0x765a5a5a,0x18000000,0x3000000, + 0xffffff,0xffffff,0x93d4d5d4,0xffd1d0d0,0xffbcbcbc,0xffbab9b9,0xffbdbdbd,0xffbcbcbc,0xffbbbaba,0xff000000,0xff6d6e6d,0xffbdbdbd,0xff000000,0xff727272, + 0xff929292,0xff000000,0xff979797,0xff7b7b7b,0xff272727,0xffb1b1b1,0xffd1d1d1,0xffd1d1d1,0xffd0d0d0,0xffc7c8c7,0xffb3b2b2,0xc9626262,0x3d000000,0xc000000, + 0xffffff,0xffffff,0xd5cbcbcb,0xffb8b8b8,0xffa7a7a7,0xffaeaeae,0xffa9a8a8,0xffb1b1b1,0xffa6a6a6,0xff000000,0xff686868,0xffb6b6b6,0xff000000,0xff686868, + 0xff868686,0xff000000,0xff595959,0xff252525,0xff9d9d9d,0xffc4c4c4,0xffc0c0c0,0xffbcbcbc,0xffc6c6c6,0xffc5c5c5,0xffbbbbbb,0xf0666666,0x61000000,0x1a000000, + 0xffffff,0xffffff,0xfabebebe,0xffa4a4a4,0xff979797,0xffa8a8a8,0xffa0a0a0,0xff9b9b9b,0xffa1a1a1,0xff000000,0xff636363,0xffa4a4a4,0xff000000,0xff5f5f5f, + 0xff7a7a7a,0xff000000,0xff000000,0xff9f9f9f,0xffbbbbbb,0xffadadad,0xffa7a7a7,0xffb2b2b2,0xffbcbcbc,0xffc2c2c2,0xffadadad,0xfd626262,0x7c000000,0x25000000, + 0xffffff,0xffffff,0xd8adadad,0xff989898,0xff959595,0xff8b8b8b,0xff939393,0xff9a9a9a,0xff939393,0xff000000,0xff585858,0xff979797,0xff000000,0xff5b5b5b, + 0xff757575,0xff000000,0xff2b2b2b,0xff2f2f2f,0xffa9a9a9,0xffb3b3b3,0xffadadad,0xffadadad,0xffb8b8b8,0xffb4b4b4,0xff959595,0xf24a4a4a,0x85000000,0x2b000000, + 0xffffff,0xffffff,0x9e919191,0xff949493,0xff868787,0xff8c8c8c,0xff818181,0xff888887,0xff8a8a8a,0xff000000,0xff545654,0xff848384,0xff000000,0xff4f4f4f, + 0xff676766,0xff000000,0xff737372,0xff4e4e4d,0xff3c3c3c,0xff9e9e9e,0xffaeaeae,0xffb2b2b2,0xffacacac,0xffa5a6a5,0xff706f70,0xdf373737,0x7c000000,0x25000000, + 0xffffff,0xffffff,0x506d6d6d,0xe67b7b7b,0xff7d7d7d,0xff7a7a7a,0xff777878,0xff777777,0xff7d7e7d,0xff484848,0xff161616,0xff292929,0xff1e1f1f,0xff6a6b6b, + 0xff5c5c5c,0xff000000,0xff616161,0xff838383,0xff484848,0xff7e7e7e,0xffa5a5a5,0xffa6a7a6,0xff979797,0xff787778,0xf5434343,0xbb1a1a1a,0x61000000,0x1a000000, + 0xffffff,0xffffff,0xc000000,0x834d4d4d,0xec595959,0xff5e5d5d,0xff656564,0xff696969,0xff696869,0xff6b6a6b,0xff6a6a69,0xff666665,0xff646463,0xff656564, + 0xff666666,0xff686868,0xff6c6c6c,0xff727272,0xff7a7a7a,0xff828282,0xff818181,0xff787778,0xff656465,0xf5424241,0xce222222,0x83000000,0x3d000000,0xc000000, + 0xffffff,0xffffff,0x3000000,0x18000000,0x752d2d2d,0xc8353535,0xef363636,0xff3e3e3e,0xfd373737,0xfa353535,0xf5333333,0xf3313131,0xf5353535,0xf7353535, + 0xf9373737,0xfa383838,0xfc3c3c3c,0xfe3d3d3d,0xff424242,0xff454545,0xff454545,0xf3383838,0xdf2a2a2a,0xbb161616,0x83000000,0x4b000000,0x18000000,0x3000000, 0xffffff,0xffffff,0xffffff,0x4000000,0x18000000,0x3d000000,0x61000000,0x7c000000,0x8a000000,0x8b000000,0x87000000,0x82000000,0x81000000,0x82000000, 0x84000000,0x87000000,0x89000000,0x8b000000,0x8e000000,0x8e000000,0x8f000000,0x8b000000,0x7c000000,0x61000000,0x3d000000,0x18000000,0x4000000,0xffffff, 0xffffff,0xffffff,0xffffff,0xffffff,0x3000000,0xc000000,0x1a000000,0x26000000,0x2d000000,0x2e000000,0x2b000000,0x29000000,0x28000000,0x29000000, 0x2a000000,0x2b000000,0x2d000000,0x2e000000,0x2e000000,0x2f000000,0x30000000,0x2e000000,0x26000000,0x1a000000,0xc000000,0x3000000,0xffffff,0xffffff }; static const QRgb Opera_data[] = { 0x4000000,0x7000000,0xc000000,0x12000000,0x17000000,0x1b000000,0x1d000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000,0x1f000000, @@ -2022,92 +2022,169 @@ static const QRgb Opera_data[] = { 0x62000000,0x66000000,0x66000000,0x66000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x67000000,0x66000000, 0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x66000000,0x62000000,0x5a000000,0x4d000000,0x3d000000,0x29000000,0x18000000,0x7000000,0xf000000, 0x18000000,0x25000000,0x2e000000,0x36000000,0x3b000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000, 0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3d000000,0x3b000000,0x36000000,0x2e000000,0x25000000, 0x18000000,0xf000000 }; static const QRgb PPPConnect_data[] = { |