PSR
CHIVE
Ask a Question
Search
PSR
CHIVE:
powered by
FreeFind
Home
Install
Use
Develop
Support
News
Credits
hosted by
More
rhythm
qt_editParams.h
1
/***************************************************************************
2
*
3
* Copyright (C) 1999 by Willem van Straten
4
* Licensed under the Academic Free License version 2.1
5
*
6
***************************************************************************/
7
/* ///////////////////////////////////////////////////////////////////////
8
The Qt editeph Widget
9
Manipulate Qt psrephem widget with this gui component
10
11
Author: Willem van Straten
13
14
#ifndef __QT_EDITEPH_H
15
#define __QT_EDITEPH_H
16
17
#include <vector>
18
19
#include <qpopupmenu.h>
20
21
#include "qt_psrephem.h"
22
#include "psrephem.h"
23
#include "psrParams.h"
24
25
using Legacy::psrephem;
26
27
class qt_fileParams;
28
29
class qt_editParams : public QWidget
30
{
31
Q_OBJECT
32
33
public:
34
static bool verbose;
35
static int border_width; // size of border around widget frame
36
37
qt_editParams (QWidget* parent=0, const char* name=0);
38
39
// load/unload ephemeris from/to filename
40
void load (const char* filename);
41
void unload (const char* filename);
42
43
// display the ephemeris given / get the epehemeris displayed
44
void set_psrephem (const psrephem& eph);
45
void get_psrephem (psrephem& eph);
46
47
// see fitall() and fitnone() slots
48
49
// returns true if the editor currently contains a set of TEMPO 11 parameters
50
bool hasdata() { return current != -1; };
51
52
signals:
53
// emitted when the user selects 'File/Close'
54
void closed ();
55
// emitted when new data have been loaded/set
56
void newParams ( const psrephem& );
57
58
public slots:
59
// File Menu Callbacks
60
void open();
61
void save();
62
void print();
63
void closeWin();
64
65
void save (std::string filename);
66
67
// Edit Menu Callbacks
68
void forward(); // go forward to newer parameter set
69
void backward(); // go back to last parameter set
70
void select_parms(); // hides/shows the selection grid
71
void fitall();
72
void fitnone();
73
74
// Interface functions
75
int get_hist_length();
76
psrephem get_historic(unsigned which);
77
bool query_fit_for(int ephind);
78
79
// Help Menu Callbacks
80
void about();
81
void aboutQt();
82
83
protected:
84
85
// the psr parameters display widget
86
qt_psrephem display;
87
88
// the parameters kept in the editor display
89
psrephem data;
90
91
// history of parameter sets as the user loads and modifies
92
std::vector<psrParams> data_history;
93
int current;
94
95
void menubarConstruct(); // constructs the menubar
96
QWidget* menu; // the menubar
97
98
void parmboxConstruct(); // constructs a dialog box with qt_toglParams
99
QWidget* eph_select; // the dialog created in parmboxConstruct ();
100
101
// the open/save popup dialog
102
qt_fileParams* io_dialog;
103
104
// performs various book-keeping tasks whenever
105
// a new TEMPO Parameter set is loaded/set
106
void new_data(bool add_to_history = true);
107
108
// ///////////////////////////////////////////////////////////////////
109
// the popup menus
110
QPopupMenu* file;
111
int saveID;
112
113
QPopupMenu* edit; // Pointer to the edit popup menu
114
int selectID; // ID of parameter select menu option
115
int backwardID; // ID of backward menu option
116
int forwardID; // ID of forward menu option
117
118
protected:
119
// Functions that assist the geometry manager
120
QSize sizeHint() const;
121
QSizePolicy sizePolicy() const
122
{ return QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); };
123
QSize minimumSizeHint() const
124
{ return sizeHint(); };
125
};
126
127
#endif
Pulsar::IntegrationManager::verbose
static unsigned verbose
A verbosity flag that can be set for debugging purposes.
Definition:
IntegrationManager.h:38
Generated using
doxygen
1.8.17