copasi API  0.1
Defines | Functions
copasi/UI/qtUtilities.h File Reference
#include <qstring.h>
#include "utilities/CCopasiParameter.h"

Go to the source code of this file.

Defines

#define FROM_UTF8(__x)   QString::fromUtf8((__x).c_str())
#define TO_UTF8(__x)   (__x).toUtf8().data()

Functions

QString getParameterValue (const CCopasiParameterGroup *group, const unsigned C_INT32 &index, CCopasiParameter::Type *type=NULL)
QString getParameterValue (const CCopasiParameterGroup *group, const std::string &name, CCopasiParameter::Type *type=NULL)
bool setParameterValue (CCopasiParameterGroup *group, const unsigned C_INT32 &index, const QString &value)
bool setParameterValue (CCopasiParameterGroup *group, const std::string &name, const QString &value)
C_INT32 checkSelection (const QString &file)
void vectorOfStrings2QStringList (std::vector< std::string > vs, QStringList &qsl)

Define Documentation

#define FROM_UTF8 (   __x)    QString::fromUtf8((__x).c_str())

Convert a utf8 encoded std::string to a QString

#define TO_UTF8 (   __x)    (__x).toUtf8().data()

Function Documentation

C_INT32 checkSelection ( const QString &  file)

Checks whether the file exists. If the file exist the user is prompted whether to overwrite the file. The return value is one of QMessageBox::Yes, QMessageBox::No, or QMessageBox::Cancel. If the file does not exist QMessageBox::Yes is returned. param const QString & file

Returns:
C_INT32 overwrite
QString getParameterValue ( const CCopasiParameterGroup group,
const unsigned C_INT32 &  index,
CCopasiParameter::Type type = NULL 
)

Retrieve a parameter from a parameter group and convert it to a QString.

Parameters:
constCCopasiParameterGroup * group
constunsigned C_INT32 & index
CCopasiParameter::Type* type (default: NULL)
Returns:
QString value
QString getParameterValue ( const CCopasiParameterGroup group,
const std::string &  name,
CCopasiParameter::Type type = NULL 
)

Retrieve a parameter from a parameter group and convert it to a QString.

Parameters:
constCCopasiParameterGroup * group
conststd::string & name
CCopasiParameter::Type* type (default: NULL)
Returns:
QString value
bool setParameterValue ( CCopasiParameterGroup group,
const unsigned C_INT32 &  index,
const QString &  value 
)

Set a parameter of a parameter group from a value given as a QString. Success = true is returned when the set operation was succesful, i.e., value == getParameterValue.

Parameters:
CCopasiParameterGroup* group
conststd::string & name
constQString & value
Returns:
bool success.
bool setParameterValue ( CCopasiParameterGroup group,
const std::string &  name,
const QString &  value 
)

Set a parameter of a parameter group from a value given as a QString. Success = true is returned when the set operation was succesful, i.e., value == getParameterValue.

Parameters:
CCopasiParameterGroup* group
constunsigned C_INT32 & index
constQString & value
Returns:
bool success.
void vectorOfStrings2QStringList ( std::vector< std::string >  vs,
QStringList &  qsl 
)

This converts a std::vector<std::string> into a QStringList

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines