scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

SciDAVis Class Reference

Definition of global constants and enums. More...

#include <globals.h>

Inheritance diagram for SciDAVis:
[legend]
Collaboration diagram for SciDAVis:
[legend]

Public Types

enum  PlotDesignation {
  noDesignation = 0, X = 1, Y = 2, Z = 3,
  xErr = 4, yErr = 5
}
 Types of plot designations. More...
 
enum  ColumnMode {
  Numeric = 0, Text = 1, Month = 4, Day = 5,
  DateTime = 6
}
 The column mode (defines output and input filter for table columns) More...
 
enum  ColumnDataType { TypeDouble = 1, TypeQString = 2, TypeQDateTime = 3 }
 Column data type. More...
 

Public Member Functions

virtual ~SciDAVis ()
 

Static Public Member Functions

static int version ()
 Return the SciDAVis version number. More...
 
static QString enumValueToString (int key, const QString &enum_name)
 
static int enumStringToValue (const QString &string, const QString &enum_name)
 
static QString schemaVersion ()
 Return the SciDAVis version string ("SciDAVis x.y.z" without extra version) used in the project file. More...
 
static QString versionString ()
 the user visible release version string (x.Dy usually) More...
 
static QString extraVersion ()
 Return the extra version as a string. More...
 
static QString copyrightString ()
 Return the copyright string. More...
 
static QString releaseDateString ()
 Return the release date as a string. More...
 
static void about ()
 Show about dialog. More...
 

Private Member Functions

 SciDAVis ()
 

Static Private Attributes

static const int scidavis_versionNo = 131840
 SciDAVis version number. More...
 
static const char * scidavis_version = "2.3.0"
 
static const char * extra_version = ""
 Extra version information string (like "-alpha", "-beta", "-rc1", etc...) More...
 
static const char * copyright_string
 Copyright string containing the author names etc. More...
 
static const char * release_date = "Jun 12, 2020"
 Release date as a string. More...
 

Detailed Description

Definition of global constants and enums.

File : globals.h Project : SciDAVis

Description : Definition of global constants and enums

Copyright : (C) 2006-2009 Tilman Benkert (thzs*gmx.net) Copyright : (C) 2006-2007 Ion Vasilief (ion_vasilief*yahoo.fr) (replace * with @ in the email addresses)

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
    • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
    • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *
    • This class must not be instanced. All members are static.

Definition at line 41 of file globals.h.

Member Enumeration Documentation

◆ ColumnDataType

Column data type.

Enumerator
TypeDouble 
TypeQString 
TypeQDateTime 

Definition at line 76 of file globals.h.

77  {
78  TypeDouble = 1,
79  TypeQString = 2,
80  TypeQDateTime = 3
81  };

◆ ColumnMode

The column mode (defines output and input filter for table columns)

Enumerator
Numeric 

column contains doubles

Text 

column contains strings

Month 

column contains month names

Day 

column containts day of week names

DateTime 

column contains dates and/or times

Definition at line 65 of file globals.h.

66  {
67  Numeric = 0,
68  Text = 1,
69  Month = 4,
70  Day = 5,
71  DateTime = 6,
72  // 2 and 3 are skipped to avoid problems with old obsolete values
73  };

◆ PlotDesignation

Types of plot designations.

Enumerator
noDesignation 

no plot designation

x values

y values

z values

xErr 

x errors

yErr 

y errors

Definition at line 54 of file globals.h.

55  {
56  noDesignation = 0,
57  X = 1,
58  Y = 2,
59  Z = 3,
60  xErr = 4,
61  yErr = 5
62  };

Constructor & Destructor Documentation

◆ SciDAVis()

SciDAVis::SciDAVis ( )
inlineprivate

Definition at line 49 of file globals.h.

49 {} // don't allow instancing

◆ ~SciDAVis()

virtual SciDAVis::~SciDAVis ( )
inlinevirtual

Definition at line 52 of file globals.h.

52 {} // avoid the warning message

Member Function Documentation

◆ about()

void SciDAVis::about ( )
static

Show about dialog.

Definition at line 133 of file globals.cpp.

134 {
135  QString text = QString(SciDAVis::copyright_string);
136  text.replace(QRegExp("\\[1\\]"), "<sup>1</sup>");
137  text.replace(" text.replace("","&aacute;"); text.replace("", "&ouml;"); text.replace("\n", "<br>"); text.replace("=== ", "<h1>"); text.replace(" ===","</h1>"); text.replace("--- ", "<h2>"); text.replace(" ---","</h2>"); text.replace(" ---","</h2>"); text.replace("</h1><br><br>", "</h1>"); text.replace("</h2><br><br>", "</h2>"); text.replace("<br><h1>", "<h1>"); text.replace("<br><h2>", "<h2>"); Qt::WindowFlags flags = Qt::WindowTitleHint | Qt::WindowSystemMenuHint; #if QT_VERSION >= 0x040500 flags |= Qt::WindowCloseButtonHint; #endif QDialog *dialog = new QDialog(0, flags); Ui::SciDAVisAbout ui; ui.setupUi(dialog); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setWindowTitle(QObject::tr("About SciDAVis")); ui.version_label->setText(versionString() + extraVersion()); ui.release_date_label->setText( QString("Qt: ")+QT_VERSION_STR+". Qwt: "+QWT_VERSION_STR #ifdef SCRIPTING_PYTHON ". Python: "+PY_VERSION #else +". No python" #endif +QObject::tr("\nReleased") + ": " + QString(SciDAVis::release_date)); ui.credits_box->setHtml(text); dialog->exec(); } ","&eacute;");
138  text.replace(" text.replace("", "&ouml;"); text.replace("\n", "<br>"); text.replace("=== ", "<h1>"); text.replace(" ===","</h1>"); text.replace("--- ", "<h2>"); text.replace(" ---","</h2>"); text.replace(" ---","</h2>"); text.replace("</h1><br><br>", "</h1>"); text.replace("</h2><br><br>", "</h2>"); text.replace("<br><h1>", "<h1>"); text.replace("<br><h2>", "<h2>"); Qt::WindowFlags flags = Qt::WindowTitleHint | Qt::WindowSystemMenuHint; #if QT_VERSION >= 0x040500 flags |= Qt::WindowCloseButtonHint; #endif QDialog *dialog = new QDialog(0, flags); Ui::SciDAVisAbout ui; ui.setupUi(dialog); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setWindowTitle(QObject::tr("About SciDAVis")); ui.version_label->setText(versionString() + extraVersion()); ui.release_date_label->setText( QString("Qt: ")+QT_VERSION_STR+". Qwt: "+QWT_VERSION_STR #ifdef SCRIPTING_PYTHON ". Python: "+PY_VERSION #else +". No python" #endif +QObject::tr("\nReleased") + ": " + QString(SciDAVis::release_date)); ui.credits_box->setHtml(text); dialog->exec(); } ","&aacute;");
139  text.replace(" text.replace("\n", "<br>"); text.replace("=== ", "<h1>"); text.replace(" ===","</h1>"); text.replace("--- ", "<h2>"); text.replace(" ---","</h2>"); text.replace(" ---","</h2>"); text.replace("</h1><br><br>", "</h1>"); text.replace("</h2><br><br>", "</h2>"); text.replace("<br><h1>", "<h1>"); text.replace("<br><h2>", "<h2>"); Qt::WindowFlags flags = Qt::WindowTitleHint | Qt::WindowSystemMenuHint; #if QT_VERSION >= 0x040500 flags |= Qt::WindowCloseButtonHint; #endif QDialog *dialog = new QDialog(0, flags); Ui::SciDAVisAbout ui; ui.setupUi(dialog); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setWindowTitle(QObject::tr("About SciDAVis")); ui.version_label->setText(versionString() + extraVersion()); ui.release_date_label->setText( QString("Qt: ")+QT_VERSION_STR+". Qwt: "+QWT_VERSION_STR #ifdef SCRIPTING_PYTHON ". Python: "+PY_VERSION #else +". No python" #endif +QObject::tr("\nReleased") + ": " + QString(SciDAVis::release_date)); ui.credits_box->setHtml(text); dialog->exec(); } ", "&ouml;");
140  text.replace("\n", "<br>");
141  text.replace("=== ", "<h1>");
142  text.replace(" ===","</h1>");
143  text.replace("--- ", "<h2>");
144  text.replace(" ---","</h2>");
145  text.replace(" ---","</h2>");
146  text.replace("</h1><br><br>", "</h1>");
147  text.replace("</h2><br><br>", "</h2>");
148  text.replace("<br><h1>", "<h1>");
149  text.replace("<br><h2>", "<h2>");
150 
151  Qt::WindowFlags flags = Qt::WindowTitleHint | Qt::WindowSystemMenuHint;
152 #if QT_VERSION >= 0x040500
153  flags |= Qt::WindowCloseButtonHint;
154 #endif
155  QDialog *dialog = new QDialog(0, flags);
156  Ui::SciDAVisAbout ui;
157  ui.setupUi(dialog);
158  dialog->setAttribute(Qt::WA_DeleteOnClose);
159  dialog->setWindowTitle(QObject::tr("About SciDAVis"));
160  ui.version_label->setText(versionString() + extraVersion());
161  ui.release_date_label->setText(
162  QString("Qt: ")+QT_VERSION_STR+". Qwt: "+QWT_VERSION_STR
163 #ifdef SCRIPTING_PYTHON
164  ". Python: "+PY_VERSION
165 #else
166  +". No python"
167 #endif
168  +QObject::tr("\nReleased") + ": " + QString(SciDAVis::release_date));
169  ui.credits_box->setHtml(text);
170 
171  dialog->exec();
172 }

References copyright_string, extraVersion(), python-sipcmd::flags, release_date, and versionString().

Referenced by ApplicationWindow::about().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyrightString()

QString SciDAVis::copyrightString ( )
static

Return the copyright string.

Definition at line 174 of file globals.cpp.

175 {
176  return copyright_string;
177 }

References copyright_string.

Referenced by ApplicationWindow::parseCommandLineArguments().

Here is the caller graph for this function:

◆ enumStringToValue()

int SciDAVis::enumStringToValue ( const QString &  string,
const QString &  enum_name 
)
static

Definition at line 192 of file globals.cpp.

193 {
194  int index = staticMetaObject.indexOfEnumerator(enum_name.toUtf8());
195  if(index == -1) return -1;
196  QMetaEnum meta_enum = staticMetaObject.enumerator(index);
197  return meta_enum.keyToValue(string.toUtf8());
198 }

Referenced by Column::load(), and Column::XmlReadRow().

Here is the caller graph for this function:

◆ enumValueToString()

QString SciDAVis::enumValueToString ( int  key,
const QString &  enum_name 
)
static

Definition at line 184 of file globals.cpp.

185 {
186  int index = staticMetaObject.indexOfEnumerator(enum_name.toUtf8());
187  if(index == -1) return QString("invalid");
188  QMetaEnum meta_enum = staticMetaObject.enumerator(index);
189  return QString(meta_enum.valueToKey(key));
190 }

Referenced by Column::save().

Here is the caller graph for this function:

◆ extraVersion()

QString SciDAVis::extraVersion ( )
static

Return the extra version as a string.

Definition at line 128 of file globals.cpp.

129 {
130  return QString(extra_version);
131 }

References extra_version.

Referenced by about(), and ApplicationWindow::parseCommandLineArguments().

Here is the caller graph for this function:

◆ releaseDateString()

QString SciDAVis::releaseDateString ( )
static

Return the release date as a string.

Definition at line 179 of file globals.cpp.

180 {
181  return release_date;
182 }

References release_date.

Referenced by ApplicationWindow::parseCommandLineArguments().

Here is the caller graph for this function:

◆ schemaVersion()

QString SciDAVis::schemaVersion ( )
static

Return the SciDAVis version string ("SciDAVis x.y.z" without extra version) used in the project file.

Definition at line 115 of file globals.cpp.

116 {
117  return "SciDAVis " +
118  QString::number((version() & 0xFF0000) >> 16)+"."+
119  QString::number((version() & 0x00FF00) >> 8)+"."+
120  QString::number(version() & 0x0000FF);
121 }

References version().

Referenced by ApplicationWindow::saveAsTemplate(), and ApplicationWindow::saveFolder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ version()

int SciDAVis::version ( )
static

Return the SciDAVis version number.

Definition at line 110 of file globals.cpp.

111 {
112  return scidavis_versionNo;
113 }

References scidavis_versionNo.

Referenced by Project::save(), and schemaVersion().

Here is the caller graph for this function:

◆ versionString()

QString SciDAVis::versionString ( )
static

the user visible release version string (x.Dy usually)

Definition at line 123 of file globals.cpp.

124 {
125  return QString("SciDAVis ") + scidavis_version;
126 }

References scidavis_version.

Referenced by about(), ApplicationWindow::parseCommandLineArguments(), and ApplicationWindow::versionString().

Here is the caller graph for this function:

Member Data Documentation

◆ copyright_string

const char * SciDAVis::copyright_string
staticprivate

Copyright string containing the author names etc.

File : globals.cpp

Description : Definition of global constants and enums

Copyright : (C) 2006-2009 Tilman Benkert (thzs*gmx.net) Copyright : (C) 2006-2007 Ion Vasilief (ion_vasilief*yahoo.fr) (replace * with @ in the email addresses)

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
    • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
    • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 120 of file globals.h.

Referenced by about(), and copyrightString().

◆ extra_version

const char * SciDAVis::extra_version = ""
staticprivate

Extra version information string (like "-alpha", "-beta", "-rc1", etc...)

Definition at line 118 of file globals.h.

Referenced by extraVersion().

◆ release_date

const char * SciDAVis::release_date = "Jun 12, 2020"
staticprivate

Release date as a string.

Definition at line 122 of file globals.h.

Referenced by about(), and releaseDateString().

◆ scidavis_version

const char * SciDAVis::scidavis_version = "2.3.0"
staticprivate

Definition at line 116 of file globals.h.

Referenced by versionString().

◆ scidavis_versionNo

const int SciDAVis::scidavis_versionNo = 131840
staticprivate

SciDAVis version number.

0xMMmmbb means MM.mm.bb with
MM = major version mm = minor version bb = bugfix version

Definition at line 115 of file globals.h.

Referenced by version().


The documentation for this class was generated from the following files:
SciDAVis::versionString
static QString versionString()
the user visible release version string (x.Dy usually)
Definition: globals.cpp:123
SciDAVis::version
static int version()
Return the SciDAVis version number.
Definition: globals.cpp:110
SciDAVis::yErr
@ yErr
y errors
Definition: globals.h:61
SciDAVis::TypeQString
@ TypeQString
Definition: globals.h:79
SciDAVis::xErr
@ xErr
x errors
Definition: globals.h:60
SciDAVis::Y
@ Y
y values
Definition: globals.h:58
SciDAVis::noDesignation
@ noDesignation
no plot designation
Definition: globals.h:56
SciDAVis::copyright_string
static const char * copyright_string
Copyright string containing the author names etc.
Definition: globals.h:120
SciDAVis::extraVersion
static QString extraVersion()
Return the extra version as a string.
Definition: globals.cpp:128
SciDAVis::extra_version
static const char * extra_version
Extra version information string (like "-alpha", "-beta", "-rc1", etc...)
Definition: globals.h:118
SciDAVis::release_date
static const char * release_date
Release date as a string.
Definition: globals.h:122
SciDAVis::scidavis_versionNo
static const int scidavis_versionNo
SciDAVis version number.
Definition: globals.h:115
python-sipcmd.flags
list flags
Definition: python-sipcmd.py:61
SciDAVis::Month
@ Month
column contains month names
Definition: globals.h:69
SciDAVis::Text
@ Text
column contains strings
Definition: globals.h:68
SciDAVis::DateTime
@ DateTime
column contains dates and/or times
Definition: globals.h:71
SciDAVis::TypeDouble
@ TypeDouble
Definition: globals.h:78
SciDAVis::scidavis_version
static const char * scidavis_version
Definition: globals.h:116
SciDAVis::Z
@ Z
z values
Definition: globals.h:59
SciDAVis::X
@ X
x values
Definition: globals.h:57
SciDAVis::Day
@ Day
column containts day of week names
Definition: globals.h:70
SciDAVis::TypeQDateTime
@ TypeQDateTime
Definition: globals.h:80
SciDAVis::Numeric
@ Numeric
column contains doubles
Definition: globals.h:67