kexiutils/utils.h File Reference
#include "kexiutils_export.h"
#include <qguardedptr.h>
#include <qobjectlist.h>
#include <kmimetype.h>
Go to the source code of this file.
Namespaces | |
| namespace | KexiUtils |
Defines | |
| #define | GLUE_WIDGET(what, where) |
| sometimes we leave a space in the form of empty QFrame and want to insert here a widget that must be instantiated by hand. | |
Functions | |
| bool | hasParent (QObject *par, QObject *o) |
| template<class type> | |
| type * | findParent (QObject *o, const char *className) |
| template<class type> | |
| type * | findParentConst (const QObject *const o, const char *className) |
| Const version of findParent(). | |
| template<class type> | |
| type * | findFirstChild (QObject *o, const char *className, const char *objName=0) |
| QDateTime | stringToHackedQTime (const QString &s) |
| QDateTime - a hack needed because QVariant(QTime) has broken isNull(). | |
| KEXIUTILS_EXPORT void | setWaitCursor (bool noDelay=false) |
| KEXIUTILS_EXPORT void | removeWaitCursor () |
| KEXIUTILS_EXPORT QString | fileDialogFilterString (const KMimeType::Ptr &mime, bool kdeFormat=true) |
| KEXIUTILS_EXPORT QString | fileDialogFilterString (const QString &mimeString, bool kdeFormat=true) |
| KEXIUTILS_EXPORT QString | fileDialogFilterStrings (const QStringList &mimeStrings, bool kdeFormat) |
| KEXIUTILS_EXPORT QColor | blendedColors (const QColor &c1, const QColor &c2, int factor1=1, int factor2=1) |
| KEXIUTILS_EXPORT QColor | contrastColor (const QColor &c) |
| KEXIUTILS_EXPORT QColor | bleachedColor (const QColor &c, int factor) |
| KEXIUTILS_EXPORT QIconSet | colorizeIconToTextColor (const QPixmap &icon, const QPalette &palette) |
| KEXIUTILS_EXPORT QPixmap | emptyIcon (KIcon::Group iconGroup) |
| KEXIUTILS_EXPORT void | serializeMap (const QMap< QString, QString > &map, const QByteArray &array) |
| KEXIUTILS_EXPORT void | serializeMap (const QMap< QString, QString > &map, QString &string) |
| KEXIUTILS_EXPORT QMap< QString, QString > | deserializeMap (const QByteArray &array) |
| KEXIUTILS_EXPORT QMap< QString, QString > | deserializeMap (const QString &string) |
| KEXIUTILS_EXPORT QString | stringToFileName (const QString &string) |
| KEXIUTILS_EXPORT void | simpleCrypt (QString &string) |
| KEXIUTILS_EXPORT void | simpleDecrypt (QString &string) |
| KEXIUTILS_EXPORT void | drawPixmap (QPainter &p, int lineWidth, const QRect &rect, const QPixmap &pixmap, int alignment, bool scaledContents, bool keepAspectRatio) |
| Draws pixmap on painter p using predefined parameters. | |
| KEXIUTILS_EXPORT QString | ptrToStringInternal (void *ptr, uint size) |
| KEXIUTILS_EXPORT void * | stringToPtrInternal (const QString &str, uint size) |
| template<class type> | |
| QString | ptrToString (type *ptr) |
| template<class type> | |
| type * | stringToPtr (const QString &str) |
Define Documentation
|
|
Value: { QVBoxLayout *lyr = new QVBoxLayout(where); \
lyr->addWidget(what); }
This macro inserts a widget what into a frame where. Definition at line 244 of file kexiutils/utils.h. Referenced by KexiNewProjectWizard::KexiNewProjectWizard(). |
Function Documentation
|
||||||||||||
|
|
|
||||||||||||||||||||
|
Referenced by KexiTableView::Appearance::Appearance(), KexiScrollView::KexiScrollView(), lighterGrayBackgroundColor(), KexiDBTextWidgetInterface::paint(), KexiRecordMarker::paintEvent(), and KexiTableViewHeader::paintSection(). |
|
||||||||||||
|
Referenced by KexiTableDesignerView::KexiTableDesignerView(). |
|
|
Referenced by KexiDBImageBox::paintEvent(). |
|
|
|
|
|
|
|
||||||||||||||||||||||||||||||||
|
Draws pixmap on painter p using predefined parameters. Used in KexiDBImageBox and KexiBlobTableEdit. Referenced by KexiDBImageBox::paintEvent(), and KexiBlobTableEdit::setupContents(). |
|
|
Referenced by KActionsListViewBase::init(). |
|
||||||||||||
|
|
|
||||||||||||
|
Referenced by KexiUtils::fileDialogFilterString(), and KexiUtils::fileDialogFilterStrings(). |
|
||||||||||||
|
Like QString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true) but returns a list of filter strings. Referenced by KexiCSVImportDialog::KexiCSVImportDialog(). |
|
||||||||||||||||||||
|
Definition at line 75 of file kexiutils/utils.h. |
|
||||||||||||||||
|
Definition at line 46 of file kexiutils/utils.h. |
|
||||||||||||||||
|
Const version of findParent().
Definition at line 57 of file kexiutils/utils.h. |
|
||||||||||||
|
Definition at line 35 of file kexiutils/utils.h. Referenced by KexiDialogBase::activate(), KexiViewBase::eventFilter(), KexiMainWindowImpl::eventFilter(), KexiDialogBase::eventFilter(), KexiFieldComboBox::focusOutEvent(), and KexiTableView::keyPressEvent(). |
|
||||||||||
|
Definition at line 228 of file kexiutils/utils.h. References KexiUtils::ptrToStringInternal(). |
|
||||||||||||
|
Referenced by KexiUtils::ptrToString(). |
|
|
Remove "wait" cursor previously set with setWaitCursor(), even if it's not yet visible. Does nothing if the application has no GUI enabled. (see KApplication::guiEnabled()) Referenced by KexiTextMessageHandler::showMessage(), KexiGUIMessageHandler::showMessage(), KexiDialogBase::switchToViewMode(), and KexiUtils::WaitCursor::~WaitCursor(). |
|
||||||||||||
|
|
|
||||||||||||
|
Serializes map to array. KexiUtils::deserializeMap() can be used to deserialize this array back to map. Referenced by KexiMainWindowImpl::showProjectMigrationWizard(). |
|
|
Sets "wait" cursor with 1 second delay (or 0 seconds if noDelay is true). Does nothing if the application has no GUI enabled. (see KApplication::guiEnabled()) Referenced by KexiDialogBase::switchToViewMode(), and KexiUtils::WaitCursor::WaitCursor(). |
|
|
Performs a simple string encryption using rot47-like algorithm. Each character's unicode value is increased by 47 + i (where i is index of the character). The resulting string still contains redable characters. Do not use this for data that can be accessed by attackers! Referenced by KexiDBShortcutFile::saveProjectData(). |
|
|
Performs a simple string decryption using rot47-like algorithm, using opposite operations to KexiUtils::simpleCrypt(). Referenced by KexiDBShortcutFile::loadProjectData(). |
|
|
Referenced by KexiCSVExportWizard::KexiCSVExportWizard(). |
|
|
QDateTime - a hack needed because QVariant(QTime) has broken isNull().
Definition at line 85 of file kexiutils/utils.h. Referenced by KexiDB::SQLiteCursor::storeCurrentRow(). |
|
||||||||||
|
Definition at line 235 of file kexiutils/utils.h. References KexiUtils::stringToPtrInternal(). |
|
||||||||||||
|
Referenced by KexiUtils::stringToPtr(). |
