[SOLVED]Need help with combining GUI
-
Depending on where the files are located, you might need to add paths to the .PRO file
like
INCLUDEPATH += ../../Common/CONET
../../Common/Exception
../../Common/FileStream
../../Common/HALHEADERS += AppStyle.h
../../Common/Types/AbstractTypes.h
../../Common/Types/PedaxTypes.h
../../Common/Types/Variant.h
../../Common/XML/pugixml-1.5/src/pugiconfig.hpp
../../Common/XML/pugixml-1.5/src/pugixml.hpp -
This is a part of the header file:
class StatusWindow : public QMainWindow {
Q_OBJECTpublic:
explicit StatusWindow(QWidget *parent = 0);
~StatusWindow();
SolTrack soltrack;
SolTrack::Position oldPosition;typedef struct { double hhRefVel, decRefVel; double azVel, altRefVel; double gimbalNS1Vel,gimbalNS2Vel, gimbalEW1Vel,gimbalEW2Vel; } AngularVelocities;
AngularVelocities angVels;
private:
Ui::StatusWindow *ui;void updateStatusScreen();
void computeAngularVelocities(SolTrack::Position sunPos, SolTrack::Position oldPos, AngularVelocities* angVels);private slots:
void updateStatusScreenCurrent();
void on_actionAbout_Qt_triggered();
void on_actionAbout_SolTraQ_triggered();
void on_actionClose_triggered();
void on_actionHelp_triggered();
};I need to get the data from the gimbals
-
ahh I see
when you say
double freq = StatusWindow::AngularVelocities.gimbalNS1Vel;
you try to access AngularVelocities as it was a static struct.
But its not - so you need an instance of StatusWindow for it to work.like
StatusWindow *MyInst = new StatusWindow (); double freq =MyInst->AngularVelocities.gimbalNS1Vel; delete MyInst ;
So if StatusWindow was the mainwindow in the other project, then you
might not have an instance in the "this" project and you would need to create one.Have you considered to move the data to its own file so its easier to use both places ?
-
one note:
I suspect you need to call
void computeAngularVelocities(SolTrack::Position sunPos, SolTrack::Position oldPos, AngularVelocities* angVels);for angVels to have anything but zero.
-
I am trying to add new features to a GUI. The files for new features such as camera output, video output etc exists on a different location.
What would be the best way to do agile Qt development.
With best regards,
Karan
-
@KaranBehar
Well agile is not different with Qt.
Just make sure project is under code revision control and go ahead :)