Changeset 1757eb594b in tspsg for src/globals.h


Ignore:
Timestamp:
Jan 12, 2010, 3:11:24 PM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
fcd8c1e4c1
Parents:
64f288c0f8
Message:

+ Added Fractional accuracy (in decimail places) to settings.
+ Created defaults.h file. Moved all default defines there.

  • Replaced all double types with qreal.
  • Replaced all calls to trUtf8() with tr() as we use setCodecForTr() to set UTF-8 encoding as default and tr() is enough.
  • Replaced all 2009 with 2010 in copyrights.
  • Fixed an error when loading .zkt file with less than 5 cities.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/globals.h

    r64f288c0f8 r1757eb594b  
    11/*!
    22 * \file globals.h
    3  * \author Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name>
     3 * \author Copyright (C) 2007-2010 Lёppa <contacts[at]oleksii[dot]name>
    44 *
    55 *  $Id$
     
    3737// OS and ARCH detection
    3838#include "os.h"
     39// TSPSG Defaults
     40#include "defaults.h"
    3941
    4042// DEFINES
    41 // Default values
    42 //! Default minimum for random numbers generation
    43 #define DEF_RAND_MIN 1
    44 //! Default maximum for random numbers generation
    45 #define DEF_RAND_MAX 10
    46 //! Default number of cities
    47 #define DEF_NUM_CITIES 5
    48 /*!
    49  * \def DEF_USE_NATIVE_DIALOGS
    50  * \brief Default for "Use native file dialog".
    51  */
    52 #ifdef Q_OS_WINCE
    53         #define DEF_USE_NATIVE_DIALOGS false
    54 #else
    55         #define DEF_USE_NATIVE_DIALOGS true
    56 #endif // Q_OS_WINCE
    57 //! Default for "Automatically resize rows and columns to their contents"
    58 #define DEF_AUTOSIZE true
    59 //! Default for "Save main window state and position"
    60 #define DEF_SAVEPOS false
    61 //! Default for "Fractional random values"
    62 #define DEF_FRACTIONAL_RANDOM false
    63 //! Default for "Show solution steps' matrices for every solution step"
    64 #define DEF_SHOW_MATRIX true
    65 //! Default for "Show or hide solution steps' matrices based on number of cities in the task"
    66 #define DEF_USE_SHOW_MATRIX_LIMIT true
    67 //! Default for "Maximum number of cities to show solution steps' matrices"
    68 #define DEF_SHOW_MATRIX_LIMIT 15
    69 //! Default for "Scroll to the end of output after solving"
    70 #define DEF_SCROLL_TO_END true
    71 //! Default font name
    72 #define DEF_FONT_FAMILY "Courier New"
    73 //! Default font size
    74 #define DEF_FONT_SIZE 10
    75 //! Default font color
    76 #define DEF_FONT_COLOR Qt::black
    77 
    7843//! Maximum available number of cities
    7944#define MAX_NUM_CITIES 50
     
    13196 * \return \c true if \a x countains an integer, oherwise \c false.
    13297 */
    133 inline bool isInteger(double x)
     98inline bool isInteger(qreal x)
    13499{
    135 double i;
     100qreal i;
    136101        return (modf(x, &i) == 0.0);
    137102}
Note: See TracChangeset for help on using the changeset viewer.