Kexi API Documentation (2.0 alpha)

identifier.h File Reference

#include "validator.h"
#include <qstring.h>

Go to the source code of this file.

Namespaces

namespace  KexiUtils

Functions

KEXIUTILS_EXPORT bool isIdentifier (const QString &s)
KEXIUTILS_EXPORT QString string2Identifier (const QString &s)
KEXIUTILS_EXPORT QString identifierExpectedMessage (const QString &valueName, const QVariant &v)
KEXIUTILS_EXPORT QString string2FileName (const QString &s)


Function Documentation

KEXIUTILS_EXPORT QString KexiUtils::identifierExpectedMessage const QString valueName,
const QVariant &  v
 

Returns:
useful message "Value of "valueName" column must be an identifier. "v" is not a valid identifier.". It is also used by IdentifierValidator.

Referenced by KexiUtils::IdentifierValidator::internalCheck(), and KexiQueryDesignerGuiEditor::slotPropertyChanged().

KEXIUTILS_EXPORT bool KexiUtils::isIdentifier const QString s  ) 
 

Returns:
true if s is a valid identifier, ie. starts with a letter or '_' character and contains only letters, numbers and '_' character.

Referenced by KexiDB::Connection::alterTableName(), KexiUtils::IdentifierValidator::internalCheck(), KFormDesigner::WidgetPropertySet::isNameValid(), KexiProject::items(), KexiDB::Connection::objectIds(), KexiDB::Connection::objectNames(), KexiQueryDesignerGuiEditor::parseExpressionString(), KexiDB::Connection::setupField(), KexiDB::Connection::setupObjectSchemaData(), KexiQueryDesignerGuiEditor::slotBeforeCellChanged(), and KexiQueryDesignerGuiEditor::slotPropertyChanged().

KEXIUTILS_EXPORT QString KexiUtils::string2FileName const QString s  ) 
 

Returns:
Valid filename based on s

Referenced by KexiNewProjectWizard::showPage().

KEXIUTILS_EXPORT QString KexiUtils::string2Identifier const QString s  ) 
 

Returns:
valid identifier based on s. Non-alphanumeric characters (or spaces) are replaced with '_'. If a number is at the beginning, '_' is added at start. Empty strings are not changed. Case remains unchanged.

Referenced by KexiCSVImportDialog::accept(), KexiProject::createPartItem(), KexiMigration::PqxxMigrate::drv_readTableSchema(), KexiMigration::MySQLMigrate::drv_readTableSchema(), KexiPart::Part::instanceName(), KexiMigration::KexiMigrate::performImport(), KexiIdentifierPropertyEdit::setValue(), KexiNameWidget::slotCaptionTxtChanged(), KexiTableDesignerView::slotRowUpdated(), KexiNewProjectWizard::slotServerDBCaptionTxtChanged(), and KexiUtils::IdentifierValidator::validate().

KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:02 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003