CAVAPA-GUI  30.5.2014
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
markerdialog.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 MARKERDIALOG_H
31 #define MARKERDIALOG_H
32 
33 #include <QDialog>
34 #include <QDateTime>
35 #include <QEvent>
36 #include <QKeyEvent>
37 
38 namespace Ui {
39  class MarkerDialog;
40 }
41 
42 namespace cavapa_gui{
43 
53 class MarkerDialog : public QDialog
54 {
55  Q_OBJECT
56 
57 public:
58  explicit MarkerDialog(QWidget *parent = 0);
59  ~MarkerDialog();
60 
61  void setMarkerHistoryAndPositionTime(std::vector<std::string> history,
62  QDateTime time);
63 
64 
65 private:
66  Ui::MarkerDialog *ui;
67 
68 signals:
74  void sendMarkerNameAndTime(std::string text, QDateTime time);
79  void sendSelectedText(QString typedtext);
84  void sendMarkerPosition(QDateTime time);
90  void removeFromHistory(int i);
91 
92 private slots:
93 
94  void on_buttonBox_accepted();
95  void on_listWidgetMarkerHistory_clicked(const QModelIndex &index);
96  void on_dateTimeEditMarkerPos_dateTimeChanged(const QDateTime &dateTime);
97 
98  void removeMarkerFromHistory();
99  void on_pushButtonRemove_clicked();
100 };
101 
102 }
103 #endif // MARKERDIALOG_H
void removeFromHistory(int i)
Notifies parent to remove selected text item from marker history.
void setMarkerHistoryAndPositionTime(std::vector< std::string > history, QDateTime time)
Sets marker history and the selected time point for new marker for marker dialog. ...
Definition: markerdialog.cpp:62
void sendMarkerNameAndTime(std::string text, QDateTime time)
Sends new marker text and time position to parent.
MarkerDialog(QWidget *parent=0)
Constructs the marker dialog.
Definition: markerdialog.cpp:42
void sendSelectedText(QString typedtext)
Sends selected text to parent.
Class for marker creation dialog of the graphwidget.
Definition: markerdialog.h:53
void sendMarkerPosition(QDateTime time)
Sends marker position to parent.