~ubuntu-branches/ubuntu/maverick/knemo/maverick

« back to all changes in this revision

Viewing changes to src/common/data.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-04-07 21:42:37 UTC
  • mfrom: (1.1.8 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090407214237-0i2plyb3z1xmjpv1
Tags: 0.5.2-1
* New upstream release
  - Closes: #466025, #482591, #433061

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DATA_H
22
22
#define DATA_H
23
23
 
 
24
#include <algorithm>
24
25
#include <QString>
25
26
#include <QList>
26
27
 
33
34
 * @author Percy Leonhardt <percy@eris23.de>
34
35
 */
35
36
 
 
37
using namespace std;
 
38
 
 
39
/* This is for clamping min/max values read from the settings file */
 
40
template <class T> inline T clamp(T x, T a, T b)
 
41
{
 
42
        return min(max(x,a),b);
 
43
}
 
44
 
36
45
struct InterfaceCommand
37
46
{
38
47
    bool runAsRoot;
43
52
struct InterfaceSettings
44
53
{
45
54
    InterfaceSettings()
46
 
      : iconSet( 0 ),
47
 
        numCommands( 0 ),
 
55
      : numCommands( 0 ),
48
56
        trafficThreshold( 0 ),
49
57
        hideWhenNotExisting( false ),
50
58
        hideWhenNotAvailable( false ),
52
60
        customCommands( false )
53
61
    {}
54
62
 
55
 
    int iconSet;
 
63
    QString iconSet;
56
64
    int numCommands;
57
65
    int trafficThreshold;
58
66
    bool hideWhenNotExisting;