CAVAPA-GUI  30.5.2014
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
graphsettingsdialog.h
1 /****************************************************************************
2  * Copyright (c) 2014, Joel Kivelä, Erkki Koskenkorva, Oskari Leppäaho,
3  * Mika Lehtinen and Petri Partanen.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  * * Neither the name of the copyright holders nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 ****************************************************************************/
30 #ifndef GRAPHSETTINGSDIALOG_H
31 #define GRAPHSETTINGSDIALOG_H
32 
33 #include <QDialog>
34 #include "activitygraph.h"
35 
36 
37 namespace Ui {
38  class GraphSettingsDialog;
39 }
40 
41 
42 namespace cavapa_gui{
43 
44 
53 class GraphSettingsDialog : public QDialog
54 {
55  Q_OBJECT
56 
57 public:
58  explicit GraphSettingsDialog(QWidget *parent = 0);
60 
61  void getSettings(GraphSettings settings);
63 
64 
65 signals:
70  void sendSettings(GraphSettings settings);
75  void sendfinalSettings(GraphSettings settings);
84 
85 
86 private slots:
87  void on_pushButton_clicked();
88 
89  void on_pushButton_2_clicked();
90 
91  void on_pushButton_3_clicked();
92 
93  void on_pushButton_4_clicked();
94 
95  void on_pushButton_5_clicked();
96 
97  void on_pushButton_6_clicked();
98 
99  void on_pushButton_7_clicked();
100 
101  void on_pushButton_8_clicked();
102 
103  void createSettings();
104 
105  void saveSettings();
106 
107  void cancelSettings();
108 
109  void on_pushButtonDefaults_clicked();
110 
111  void on_spinBoxWidth_valueChanged(int arg1);
112 
113 private:
114  Ui::GraphSettingsDialog *ui;
115 
116  GraphSettings oldsettings;
117  GraphSettings newsettings;
118 
119  QFont graphfont;
120  QColor fontcolor;
121  QColor fontbackground;
122  QColor selectedfontcolor;
123  QColor selectioncolor;
124  QColor linecolor;
125  QColor activitycolor;
126  QColor countcolor;
127 
128  int linewidth;
129 
130 };
131 
132 }
133 #endif // GRAPHSETTINGSDIALOG_H
Class for settings dialog of graphwidget.
Definition: graphsettingsdialog.h:53
GraphSettings sendCurrent()
Sends current settings to the parent.
Definition: graphsettingsdialog.cpp:161
void sendSettings(GraphSettings settings)
Sends newly edited graph settings to the parent.
void requestPreviousSettings()
Requests previous settings from the parent.
void requestDefaultSettings()
Requests default settings from the parent.
Graph settings type for font/colors/line widths.
Definition: activitygraph.h:75
void sendfinalSettings(GraphSettings settings)
Sends and saves the graph settings to the parent.
void getSettings(GraphSettings settings)
Gets graph settings from the parent.
Definition: graphsettingsdialog.cpp:57
GraphSettingsDialog(QWidget *parent=0)
Constructor for the graph settings dialog.
Definition: graphsettingsdialog.cpp:41