forked from ALA-Engineering/RTKLIB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue update of Qt files from JensReimann/rtklib-qt github repo
- Loading branch information
1 parent
232c11d
commit 6d14fbe
Showing
61 changed files
with
4,890 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DEFINES += _RTLDLL NO_STRICT TRACE ENAGLO ENAQZS ENAGAL ENACMP ENAIRN NFREQ=5 NEXOBS=3 SVR_REUSEADDR #IERS_MODEL | ||
|
||
win32{ | ||
DEFINES += WIN32 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
include(../RTKLib.pri) | ||
|
||
# save root directory | ||
ROOT_DIRECTORY = $${PWD}/../ | ||
OUTPUT_DIRECTORY = $${OUT_PWD} | ||
|
||
LIBS += -L$${ROOT_DIRECTORY}/lib/ -lRTKLib | ||
|
||
IERS_MODEL { | ||
LIBS += -liers -lgfortran | ||
} | ||
|
||
win* { | ||
LIBS += -lws2_32 -lwinmm | ||
} | ||
|
||
QMAKE_RPATHDIR *= $${ROOT_DIRECTORY}/lib | ||
|
||
PRE_TARGETDEPS = $${ROOT_DIRECTORY}/src/rtklib.h | ||
|
||
CONFIG += c++11 debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//--------------------------------------------------------------------------- | ||
// ported to Qt by Jens Reimann | ||
|
||
#include "aboutdlg.h" | ||
#include "rtklib.h" | ||
|
||
//--------------------------------------------------------------------------- | ||
AboutDialog::AboutDialog(QWidget *parent) | ||
: QDialog(parent) | ||
{ | ||
setupUi(this); | ||
} | ||
|
||
void AboutDialog::showEvent(QShowEvent *event) | ||
{ | ||
if (event->spontaneous()) return; | ||
|
||
QPixmap icon[] = { QPixmap(":/icons/rtk1.bmp"), | ||
QPixmap(":/icons/rtk2.bmp"), | ||
QPixmap(":/icons/rtk3.bmp"), | ||
QPixmap(":/icons/rtk4.bmp"), | ||
QPixmap(":/icons/rtk5.bmp"), | ||
QPixmap(":/icons/rtk6.bmp"), | ||
QPixmap(":/icons/rtk7.bmp") }; | ||
|
||
if ((IconIndex > 0) && (IconIndex < 7)) wgIcon->setPixmap(icon[IconIndex - 1]); | ||
lbAbout->setText(About); | ||
lbVersion->setText(QString(tr("with RTKLIB ver.%1 %2")).arg(VER_RTKLIB).arg(PATCH_LEVEL)); | ||
lbCopyright->setText(COPYRIGHT_RTKLIB); | ||
|
||
connect(pbOkay, SIGNAL(clicked(bool)), this, SLOT(accept())); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//--------------------------------------------------------------------------- | ||
#ifndef aboutdlgH | ||
#define aboutdlgH | ||
//--------------------------------------------------------------------------- | ||
#include <QDialog> | ||
#include <QLabel> | ||
#include <QPushButton> | ||
#include <QShowEvent> | ||
|
||
#include "ui_aboutdlg.h" | ||
|
||
//--------------------------------------------------------------------------- | ||
class AboutDialog : public QDialog, private Ui::AboutDlg | ||
{ | ||
Q_OBJECT | ||
|
||
protected: | ||
void showEvent(QShowEvent *); | ||
|
||
public: | ||
int IconIndex; | ||
QString About; | ||
|
||
explicit AboutDialog(QWidget*); | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>AboutDlg</class> | ||
<widget class="QWidget" name="AboutDlg"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>300</width> | ||
<height>179</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>About</string> | ||
</property> | ||
<layout class="QGridLayout" name="gridLayout"> | ||
<item row="3" column="1"> | ||
<widget class="QPushButton" name="pbOkay"> | ||
<property name="text"> | ||
<string>&Okay</string> | ||
</property> | ||
<property name="autoDefault"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="default"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="QLabel" name="lbAbout"> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="1"> | ||
<widget class="QLabel" name="lbVersion"> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="2" column="1"> | ||
<widget class="QLabel" name="lbCopyright"> | ||
<property name="text"> | ||
<string>TextLabel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="0" rowspan="3"> | ||
<widget class="QLabel" name="wgIcon"> | ||
<property name="text"> | ||
<string/> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
//--------------------------------------------------------------------------- | ||
// ported to Qt by Jens Reimann | ||
|
||
#include <stdio.h> | ||
|
||
#include <QFileDialog> | ||
#include <QFile> | ||
|
||
#include "cmdoptdlg.h" | ||
|
||
//--------------------------------------------------------------------------- | ||
CmdOptDialog::CmdOptDialog(QWidget *parent) | ||
: QDialog(parent) | ||
{ | ||
setupUi(this); | ||
|
||
CmdEna[0] = CmdEna[1] = 1; | ||
|
||
connect(BtnOk, SIGNAL(clicked()), this, SLOT(BtnOkClick())); | ||
connect(BtnCancel, SIGNAL(clicked()), this, SLOT(reject())); | ||
connect(BtnLoad, SIGNAL(clicked()), this, SLOT(BtnLoadClick())); | ||
connect(BtnSave, SIGNAL(clicked()), this, SLOT(BtnSaveClick())); | ||
connect(ChkCloseCmd, SIGNAL(clicked(bool)), this, SLOT(ChkCloseCmdClick())); | ||
connect(ChkOpenCmd, SIGNAL(clicked(bool)), this, SLOT(ChkOpenCmdClick())); | ||
connect(ChkPeriodicCmd, SIGNAL(clicked(bool)), this, SLOT(ChkPeriodicCmdClick())); | ||
} | ||
|
||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::showEvent(QShowEvent *event) | ||
{ | ||
if (event->spontaneous()) return; | ||
|
||
OpenCmd->clear(); | ||
CloseCmd->clear(); | ||
|
||
OpenCmd->appendPlainText(Cmds[0]); | ||
CloseCmd->appendPlainText(Cmds[1]); | ||
PeriodicCmd->appendPlainText(Cmds[2]); | ||
ChkOpenCmd->setChecked(CmdEna[0]); | ||
ChkCloseCmd->setChecked(CmdEna[1]); | ||
ChkPeriodicCmd->setChecked(CmdEna[2]); | ||
|
||
UpdateEnable(); | ||
} | ||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::BtnOkClick() | ||
{ | ||
Cmds[0] = OpenCmd->toPlainText(); | ||
Cmds[1] = CloseCmd->toPlainText(); | ||
Cmds[2] = PeriodicCmd->toPlainText(); | ||
CmdEna[0] = ChkOpenCmd->isChecked(); | ||
CmdEna[1] = ChkCloseCmd->isChecked(); | ||
CmdEna[2] = ChkPeriodicCmd->isChecked(); | ||
|
||
accept(); | ||
} | ||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::BtnLoadClick() | ||
{ | ||
QString OpenDialog_FileName; | ||
QPlainTextEdit *cmd[] = { OpenCmd, CloseCmd , PeriodicCmd }; | ||
QByteArray buff; | ||
int n = 0; | ||
|
||
OpenDialog_FileName = QDir::toNativeSeparators(QFileDialog::getOpenFileName(this)); | ||
QFile f(OpenDialog_FileName); | ||
|
||
f.open(QIODevice::ReadOnly); | ||
|
||
cmd[0]->clear(); | ||
cmd[1]->clear(); | ||
cmd[2]->clear(); | ||
|
||
while (!f.atEnd() && n < 3) { | ||
buff = f.readLine(0); | ||
if (buff.at(0) == '@') { | ||
n ++; continue; | ||
} | ||
if (buff[buff.length() - 1] == '\n') buff[buff.length() - 1] = '\0'; | ||
cmd[n]->appendPlainText(buff); | ||
} | ||
} | ||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::BtnSaveClick() | ||
{ | ||
QString SaveDialog_FileName; | ||
QByteArray OpenCmd_Text = OpenCmd->toPlainText().toLatin1(), CloseCmd_Text = CloseCmd->toPlainText().toLatin1(), PeriodicCmd_Text = PeriodicCmd->toPlainText().toLatin1(); | ||
|
||
SaveDialog_FileName = QDir::toNativeSeparators(QFileDialog::getSaveFileName(this)); | ||
QFile fp(SaveDialog_FileName); | ||
|
||
if (!fp.open(QIODevice::WriteOnly)) return; | ||
|
||
fp.write(OpenCmd_Text); | ||
fp.write("\n@\n"); | ||
fp.write(CloseCmd_Text); | ||
fp.write("\n@\n"); | ||
fp.write(PeriodicCmd_Text); | ||
} | ||
|
||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::ChkCloseCmdClick() | ||
{ | ||
UpdateEnable(); | ||
} | ||
|
||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::ChkOpenCmdClick() | ||
{ | ||
UpdateEnable(); | ||
} | ||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::ChkPeriodicCmdClick() | ||
{ | ||
UpdateEnable(); | ||
} | ||
//--------------------------------------------------------------------------- | ||
void CmdOptDialog::UpdateEnable() | ||
{ | ||
OpenCmd->setEnabled(ChkOpenCmd->isChecked()); | ||
CloseCmd->setEnabled(ChkCloseCmd->isChecked()); | ||
PeriodicCmd->setEnabled(ChkPeriodicCmd->isChecked()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//--------------------------------------------------------------------------- | ||
#ifndef cmdoptdlgH | ||
#define cmdoptdlgH | ||
//--------------------------------------------------------------------------- | ||
#include <QDialog> | ||
|
||
#include "ui_cmdoptdlg.h" | ||
|
||
//--------------------------------------------------------------------------- | ||
class CmdOptDialog : public QDialog, private Ui_CmdOptDialog | ||
{ | ||
Q_OBJECT | ||
|
||
protected: | ||
void showEvent(QShowEvent *); | ||
void UpdateEnable(); | ||
|
||
public slots: | ||
void BtnOkClick(); | ||
void ChkCloseCmdClick(); | ||
void ChkOpenCmdClick(); | ||
void ChkPeriodicCmdClick(); | ||
void BtnLoadClick(); | ||
void BtnSaveClick(); | ||
|
||
public: | ||
QString Cmds[3]; | ||
bool CmdEna[3]; | ||
explicit CmdOptDialog(QWidget* parent); | ||
}; | ||
#endif |
Oops, something went wrong.