Skip to content

Commit

Permalink
clang-formated everything to fix all indentation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronErhardt committed Feb 11, 2020
1 parent 0d4551e commit 17ca225
Show file tree
Hide file tree
Showing 212 changed files with 20,578 additions and 23,653 deletions.
30 changes: 13 additions & 17 deletions src/AppInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2000,2001 Stefan Duffner
Copyright (C) 2000,2001 Stefan Duffner
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand All @@ -16,20 +16,17 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include <qmessagebox.h>
#include <QIcon>
#include <qmessagebox.h>

#include "AppInfo.h"


/**
* Constructor.
* Initialises the AppInfo object by setting version und author.
* @param par parent widget.
*/
AppInfo::AppInfo(QWidget* par)
:QObject(par)
{
AppInfo::AppInfo(QWidget *par) : QObject(par) {
parent_widget = par;
version_major = 0;

Expand All @@ -38,34 +35,33 @@ AppInfo::AppInfo(QWidget* par)
author = "Stefan Duffner, Rainer Strobel";
}

double AppInfo::getVersionDouble()
{
double AppInfo::getVersionDouble() {
double dec;
double res;

dec = version_minor;
while (dec>1)
while (dec > 1)
dec /= 10;

res = dec + version_major;

return res;
}

/**
* Display about-dialogbox.
*/
void AppInfo::about()
{
void AppInfo::about() {
QString text;
text = tr("Qfsm - A graphical tool for designing and simulating "
"finite state machines")+"\n";
text += tr("Version %1.%2").arg(version_major).arg(version_minor)+"\n";
text += tr("Development version %1").arg(date)+"\n";
text += tr("Copyright 2000-2015 by ")+ author+"\n";
"finite state machines") +
"\n";
text += tr("Version %1.%2").arg(version_major).arg(version_minor) + "\n";
text += tr("Development version %1").arg(date) + "\n";
text += tr("Copyright 2000-2015 by ") + author + "\n";
text += tr("email: [email protected]");

//QMessageBox::about(parent_widget, tr("Qfsm"), text);
// QMessageBox::about(parent_widget, tr("Qfsm"), text);

QMessageBox mbox(parent_widget);

Expand Down
70 changes: 40 additions & 30 deletions src/AppInfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2000,2001 Stefan Duffner
Copyright (C) 2000,2001 Stefan Duffner
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand All @@ -24,46 +24,56 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

class MainWindow;

/**
/**
* @class AppInfo
* @brief Provides general information about the application.
*
* Stores version and author of the application and a method to
* display a info dialogbox.
*/

class AppInfo : public QObject
{
class AppInfo : public QObject {
Q_OBJECT
public:
AppInfo(QWidget*);
public:
AppInfo(QWidget *);

int getVersionMajor() /// returns major version number.
{ return version_major; };
int getVersionMinor() /// returns minor version number.
{ return version_minor; };
/// Returns the version number as a single double value
double getVersionDouble();
QString getVersion() /// returns version string.
{ return QString::number(version_major)+"."+QString::number(version_minor); };
QString getDate() /// returns date string.
{ return date; };
QString getAuthor() /// returns author of application
{ return author; };
int getVersionMajor() /// returns major version number.
{
return version_major;
};
int getVersionMinor() /// returns minor version number.
{
return version_minor;
};
/// Returns the version number as a single double value
double getVersionDouble();
QString getVersion() /// returns version string.
{
return QString::number(version_major) + "." +
QString::number(version_minor);
};
QString getDate() /// returns date string.
{
return date;
};
QString getAuthor() /// returns author of application
{
return author;
};

void about();
void about();

private:
/// Parent widget (used as parent of the about dialog)
QWidget* parent_widget;
/// Major version number
int version_major;
/// Minor version number
int version_minor;
/// Author
QString author;
/// Date
QString date;
private:
/// Parent widget (used as parent of the about dialog)
QWidget *parent_widget;
/// Major version number
int version_major;
/// Minor version number
int version_minor;
/// Author
QString author;
/// Date
QString date;
};

#endif
50 changes: 25 additions & 25 deletions src/Const.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (C) 2000,2001 Stefan Duffner
Copyright (C) 2000,2001 Stefan Duffner
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand All @@ -16,36 +16,36 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#define CONT_WIDTH 640
#define CONT_HEIGHT 480
#define CONT_WIDTH 640
#define CONT_HEIGHT 480

#define ZOOM_FACTOR 1.2
#define MAX_ZOOM 50.0
#define MIN_ZOOM 0.05
#define ZOOM_FACTOR 1.2
#define MAX_ZOOM 50.0
#define MIN_ZOOM 0.05

#define PI 3.1415926536
#define PI 3.1415926536

#define CPOINT_SIZE 4
#define CPOINT_SIZE 4

#define ARROW_ANGLE 20.0
#define ARROW_LENGTH 15
#define ARROW_ANGLE 20.0
#define ARROW_LENGTH 15

#define START_DISTANCE 20
#define ITRANS_DEFAULT_LENGTH 60
#define START_DISTANCE 20
#define ITRANS_DEFAULT_LENGTH 60

#define CANVAS_MARGIN 100
#define CANVAS_MINX 100
#define CANVAS_MINY 100
#define CANVAS_MARGIN 100
#define CANVAS_MINX 100
#define CANVAS_MINY 100

#define MAX_MRUENTRIES 10
#define MAX_MRUENTRIES 10

#define MAX_BIN_INPUTLENGTH 1024
#define MAX_ASCII_INPUTLENGTH 256
#define MAX_ASCII_OUTPUTLENGTH 4
#define MAX_TEXT_INPUTLENGTH 1024
#define MAX_TEXT_OUTPUTLENGTH 1024
#define MAX_CHARARRAY_LENGTH 1024
#define MAX_BIN_INPUTLENGTH 1024
#define MAX_ASCII_INPUTLENGTH 256
#define MAX_ASCII_OUTPUTLENGTH 4
#define MAX_TEXT_INPUTLENGTH 1024
#define MAX_TEXT_OUTPUTLENGTH 1024
#define MAX_CHARARRAY_LENGTH 1024

#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define ROUND(a) ((a)<0?int((a)+0.5):(-1)*int((-a)+0.5))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ROUND(a) ((a) < 0 ? int((a) + 0.5) : (-1) * int((-a) + 0.5))
Loading

0 comments on commit 17ca225

Please sign in to comment.