TSP Solver and Generator
Macros | Functions
globals.h File Reference

Contains TSPSG global defines. More...

#include <QtGlobal>
#include "defaults.h"
+ Include dependency graph for globals.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_NUM_CITIES   50
 Maximum available number of cities.
 
#define MAX_RAND_VALUE   1000
 Maximum allowed value for random generation limits.
 
#define PATH_L10N   "l10n"
 Path to internationalization files.
 
#define PATH_DOCS   "help"
 Path to documentation files.
 
#define TSPT   quint32(0x54535054)
 TSPSG Task file signature - letters TSPT.
 
#define TSPT_VERSION   quint8(1)
 TSPSG Task file version.
 
#define TSPT_META_VERSION   quint8(1)
 TSPSG Task file metadata version.
 
#define TSPT_META_SIZE   2
 TSPSG Task file metadata size in bytes (incl. version)
 
#define ZKT   quint16(0x5A4B)
 ZKomModRd Task file signature - letters ZK.
 
#define ZKT_VERSION   quint8(1)
 ZKomModRd Task file version.
 
#define INFSTR   "---"
 This string represents infinite value in the table.
 
#define CM_IN_INCH   2.54
 Number of centimeters in 1 inch.
 
#define HQ_FACTOR   2
 Factor for high quality graph generation.
 

Functions

bool hasUpdater ()
 Checks whether the updater app is installed/available. More...
 
QSettingsinitSettings (QObject *parent)
 Creates QSettings instance with TSPSG-specific options. More...
 
void toggleStyle (QWidget *widget, bool enable)
 Enables or disables a mask for the widget. More...
 

Detailed Description

Contains TSPSG global defines.

Author
Copyright © 2007-2016 Oleksii Serdiuk <contacts[at]oleksii[dot]name>
Id
0c8813f 2016-04-18 23:45:08 +0200 Oleksii Serdiuk
URL
http://tspsg.info/

TSPSG: TSP Solver and Generator

This file is part of TSPSG.

TSPSG 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.

TSPSG 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 TSPSG. If not, see http://www.gnu.org/licenses/.

Function Documentation

bool hasUpdater ( )

Checks whether the updater app is installed/available.

Returns
true if updater app is available, oherwise false.
Note
The updater app is only available under Windows at this moment. On other systems this function always returns false.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QSettings* initSettings ( QObject parent)

Creates QSettings instance with TSPSG-specific options.

Parameters
parentA QObject which will become parent for new QSetting instance.
Returns
A pointer to new QSettings instance.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void toggleStyle ( QWidget widget,
bool  enable 
)

Enables or disables a mask for the widget.

Parameters
widgetA widget to toggle mask on.
enableSet to true to enable mask or false to disable it.

This function is used to enable an outlined font effect for QLabel with a static text.

+ Here is the call graph for this function: