~ubuntu-branches/ubuntu/vivid/regina-normal/vivid

« back to all changes in this revision

Viewing changes to qtui/src/packettypes/nsnappeaui.h

  • Committer: Package Import Robot
  • Author(s): Ben Burton
  • Date: 2014-08-29 17:37:46 UTC
  • mfrom: (19.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140829173746-igmqc9b67y366a7u
Tags: 4.96-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/**************************************************************************
 
3
 *                                                                        *
 
4
 *  Regina - A Normal Surface Theory Calculator                           *
 
5
 *  KDE User Interface                                                    *
 
6
 *                                                                        *
 
7
 *  Copyright (c) 1999-2014, Ben Burton                                   *
 
8
 *  For further details contact Ben Burton (bab@debian.org).              *
 
9
 *                                                                        *
 
10
 *  This program is free software; you can redistribute it and/or         *
 
11
 *  modify it under the terms of the GNU General Public License as        *
 
12
 *  published by the Free Software Foundation; either version 2 of the    *
 
13
 *  License, or (at your option) any later version.                       *
 
14
 *                                                                        *
 
15
 *  As an exception, when this program is distributed through (i) the     *
 
16
 *  App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or     *
 
17
 *  (iii) Google Play by Google Inc., then that store may impose any      *
 
18
 *  digital rights management, device limits and/or redistribution        *
 
19
 *  restrictions that are required by its terms of service.               *
 
20
 *                                                                        *
 
21
 *  This program is distributed in the hope that it will be useful, but   *
 
22
 *  WITHOUT ANY WARRANTY; without even the implied warranty of            *
 
23
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
 
24
 *  General Public License for more details.                              *
 
25
 *                                                                        *
 
26
 *  You should have received a copy of the GNU General Public             *
 
27
 *  License along with this program; if not, write to the Free            *
 
28
 *  Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,       *
 
29
 *  MA 02110-1301, USA.                                                   *
 
30
 *                                                                        *
 
31
 **************************************************************************/
 
32
 
 
33
/* end stub */
 
34
 
 
35
/*! \file nsnappeaui.h
 
36
 *  \brief Provides an interface for viewing SnapPea triangulations.
 
37
 */
 
38
 
 
39
#ifndef __NSNAPPEAUI_H
 
40
#define __NSNAPPEAUI_H
 
41
 
 
42
#include "../packettabui.h"
 
43
 
 
44
class QToolBar;
 
45
class NSnapPeaAlgebraUI;
 
46
class NSnapPeaGluingsUI;
 
47
class NSnapPeaShapesUI;
 
48
class NTriSkeletonUI;
 
49
class PacketEditIface;
 
50
class QLabel;
 
51
 
 
52
namespace regina {
 
53
    class NSnapPeaTriangulation;
 
54
};
 
55
 
 
56
/**
 
57
 * A packet interface for viewing 3-manifold triangulations.
 
58
 */
 
59
class NSnapPeaUI : public PacketTabbedUI {
 
60
    Q_OBJECT
 
61
 
 
62
    private:
 
63
        /**
 
64
         * Internal components
 
65
         */
 
66
        NSnapPeaShapesUI* shapes;
 
67
        NSnapPeaGluingsUI* gluings;
 
68
        NTriSkeletonUI* skeleton;
 
69
        NSnapPeaAlgebraUI* algebra;
 
70
 
 
71
        PacketEditIface* editIface;
 
72
 
 
73
    public:
 
74
        /**
 
75
         * Constructor and destructor.
 
76
         */
 
77
        NSnapPeaUI(regina::NSnapPeaTriangulation* packet,
 
78
            PacketPane* newEnclosingPane);
 
79
        ~NSnapPeaUI();
 
80
 
 
81
        /**
 
82
         * PacketUI overrides.
 
83
         */
 
84
        PacketEditIface* getEditIface();
 
85
        const QLinkedList<QAction*>& getPacketTypeActions();
 
86
        QString getPacketMenuText() const;
 
87
};
 
88
 
 
89
/**
 
90
 * A header for the SnapPea triangulation viewer.
 
91
 */
 
92
class NSnapPeaHeaderUI : public PacketViewerTab {
 
93
    private:
 
94
        /**
 
95
         * Packet details
 
96
         */
 
97
        regina::NSnapPeaTriangulation* tri;
 
98
 
 
99
        /**
 
100
         * Internal components
 
101
         */
 
102
        QWidget* ui;
 
103
        QLabel* header;
 
104
        QToolBar* bar;
 
105
 
 
106
    public:
 
107
        /**
 
108
         * Constructor.
 
109
         */
 
110
        NSnapPeaHeaderUI(regina::NSnapPeaTriangulation* packet,
 
111
                PacketTabbedUI* useParentUI);
 
112
 
 
113
        /**
 
114
         * Component queries.
 
115
         */
 
116
        QToolBar* getToolBar();
 
117
 
 
118
        /**
 
119
         * PacketViewerTab overrides.
 
120
         */
 
121
        regina::NPacket* getPacket();
 
122
        QWidget* getInterface();
 
123
        void refresh();
 
124
 
 
125
        /**
 
126
         * Allow other UIs to access the summary information.
 
127
         */
 
128
        static QString summaryInfo(regina::NSnapPeaTriangulation* tri);
 
129
};
 
130
 
 
131
inline PacketEditIface* NSnapPeaUI::getEditIface() {
 
132
    return editIface;
 
133
}
 
134
 
 
135
inline QToolBar* NSnapPeaHeaderUI::getToolBar() {
 
136
    return bar;
 
137
}
 
138
 
 
139
#endif