blob: f09c77adbb2a3b177d43d5347fa71210fe6ccd5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
/*
* Copyright (c) 2014, Red Hat.
* Copyright (c) 2007, Aconex. All Rights Reserved.
* Copyright (c) 2006, Ken McDonell. All Rights Reserved.
*
* 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.
*/
#ifndef MAIN_H
#define MAIN_H
#include <stdio.h>
#include <pcp/pmapi.h>
#include <pcp/impl.h>
#include "tab.h"
#include "colorscheme.h"
#include "qed_console.h"
#include "timecontrol.h"
#include "qed_fileiconprovider.h"
#include "pmchart.h"
typedef struct {
// Sampling
double chartDelta;
bool chartDeltaModified;
double loggerDelta;
bool loggerDeltaModified;
int sampleHistory;
bool sampleHistoryModified;
int visibleHistory;
bool visibleHistoryModified;
// Default Colors
QColor chartBackground;
QString chartBackgroundName;
bool chartBackgroundModified;
QColor chartHighlight;
QString chartHighlightName;
bool chartHighlightModified;
// Color Schemes
ColorScheme defaultScheme;
bool defaultSchemeModified;
QList<ColorScheme> colorSchemes;
bool colorSchemesModified;
// Toolbar
int initialToolbar;
bool initialToolbarModified;
int nativeToolbar;
bool nativeToolbarModified;
int toolbarLocation;
int toolbarLocationModified;
QStringList toolbarActions;
bool toolbarActionsModified;
// Font
QString fontFamily;
bool fontFamilyModified;
QString fontStyle;
bool fontStyleModified;
int fontSize;
bool fontSizeModified;
// Saved Hosts
QStringList savedHosts;
bool savedHostsModified;
} Settings;
extern Settings globalSettings;
extern void writeSettings();
extern QColor nextColor(QString, int *);
extern int Cflag;
extern int Lflag;
extern int Wflag;
extern char *outfile;
extern char *outgeometry;
extern QFont *globalFont;
extern GroupControl *activeGroup;
extern GroupControl *liveGroup;
extern GroupControl *archiveGroup;
class PmChart;
extern PmChart *pmchart;
class TimeControl;
extern TimeControl *pmtime;
extern double tosec(struct timeval);
extern double torange(struct timeval, int);
extern void fromsec(double, struct timeval *);
extern char *timeString(double);
extern char *timeHiResString(double);
extern void nomem(void);
/*
* number of Y pixels to move the time axis up when exporting to
* an image or printing
*/
#define TIMEAXISFUDGE 0
#endif // MAIN_H
|