annotate libgui/graphics/annotation-dialog.h @ 20631:69270256b879

Qt Figure: allow displaying coordinates when hovered axes parent is a uipanel. * Canvas/cc (Canvas::canvasMouseMoveEvent): call "select_object" with the actual Canvas object which may also be a uipanel.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sat, 10 Oct 2015 13:07:51 +0200
parents aa36fb998a4d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20130
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
1 /*
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
2
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
3 Copyright (C) 2015 John Donoghue
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
4
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
5 This file is part of Octave.
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
6
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
10 option) any later version.
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
11
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
15 for more details.
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
16
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, see
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
19 <http://www.gnu.org/licenses/>.
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
20
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
21 */
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
22
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
23 #ifndef ANNOTATIONDIALOG_H
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
24 #define ANNOTATIONDIALOG_H
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
25
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
26 #include <QDialog>
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
27 #include <QLineEdit>
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
28 #include <QAbstractButton>
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
29
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
30 #include "oct-obj.h"
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
31
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
32 namespace Ui
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
33 {
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
34 class annotation_dialog;
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
35 }
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
36
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
37 class annotation_dialog : public QDialog
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
38 {
20216
aa36fb998a4d maint: Remove unnecessary whitespace at end of lines.
Rik <rik@octave.org>
parents: 20130
diff changeset
39 Q_OBJECT
20130
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
40 public:
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
41 explicit annotation_dialog (QWidget * parent, const octave_value_list &pr);
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
42 ~annotation_dialog ();
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
43
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
44 octave_value_list get_properties() const;
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
45
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
46 private slots:
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
47 // slots for dialog's buttons
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
48 void button_clicked (QAbstractButton *button);
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
49 void edit_string_changed (const QString &str);
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
50 void prompt_for_color ();
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
51
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
52 private:
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
53 void init();
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
54
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
55 void get_gui_props ();
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
56 void set_gui_props ();
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
57
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
58 Ui::annotation_dialog * ui;
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
59 octave_value_list props;
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
60 };
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
61
c164cfc24bdd QtHandles: add annotations dialog
John Donoghue <john.donoghue@ieee.org>
parents:
diff changeset
62 #endif // ANNOTATIONDIALOG_H