TelescopeConfigurationDialog.cpp   TelescopeConfigurationDialog.cpp 
skipping to change at line 44 skipping to change at line 44
#include <QCompleter> #include <QCompleter>
#include <QFrame> #include <QFrame>
#include <QTimer> #include <QTimer>
#include <QtSerialPort/QSerialPortInfo> #include <QtSerialPort/QSerialPortInfo>
#include <QFile> #include <QFile>
#include <QDir> #include <QDir>
TelescopeConfigurationDialog::TelescopeConfigurationDialog() TelescopeConfigurationDialog::TelescopeConfigurationDialog()
: configuredSlot(0) : configuredSlot(0)
{ {
ui = new Ui_telescopeConfigurationDialog; ui = new Ui_telescopeConfigurationDialog();
dialogName = "TelescopeControlConfiguration";
telescopeManager = GETSTELMODULE(TelescopeControl); telescopeManager = GETSTELMODULE(TelescopeControl);
telescopeNameValidator = new QRegExpValidator (QRegExp("[^:\"]+"), t his);//Test the update for JSON telescopeNameValidator = new QRegExpValidator (QRegExp("[^:\"]+"), t his);//Test the update for JSON
hostNameValidator = new QRegExpValidator (QRegExp("[a-zA-Z0-9\\-\\.] +"), this);//TODO: Write a proper host/IP regexp? hostNameValidator = new QRegExpValidator (QRegExp("[a-zA-Z0-9\\-\\.] +"), this);//TODO: Write a proper host/IP regexp?
circleListValidator = new QRegExpValidator (QRegExp("[0-9,\\.\\s]+") , this); circleListValidator = new QRegExpValidator (QRegExp("[0-9,\\.\\s]+") , this);
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
serialPortValidator = new QRegExpValidator (QRegExp("COM[0-9]+"), th is); serialPortValidator = new QRegExpValidator (QRegExp("COM[0-9]+"), th is);
#else #else
serialPortValidator = new QRegExpValidator (QRegExp("/.*"), this); serialPortValidator = new QRegExpValidator (QRegExp("/.*"), this);
skipping to change at line 72 skipping to change at line 73
delete telescopeNameValidator; delete telescopeNameValidator;
delete hostNameValidator; delete hostNameValidator;
delete circleListValidator; delete circleListValidator;
delete serialPortValidator; delete serialPortValidator;
} }
QStringList* TelescopeConfigurationDialog::listSerialPorts() QStringList* TelescopeConfigurationDialog::listSerialPorts()
{ {
// list real serial ports // list real serial ports
QStringList *plist = new QStringList(); QStringList *plist = new QStringList();
foreach (const QSerialPortInfo &serialPortInfo, QSerialPortInfo::ava foreach (const QSerialPortInfo &serialPortInfo, QSerialPortInfo::ava
ilablePorts()) { ilablePorts())
{
#ifdef Q_OS_WIN
plist->append(serialPortInfo.portName()); // Use COM1 in the
GUI instead \\.\COM1 naming
#else
plist->append(serialPortInfo.systemLocation()); plist->append(serialPortInfo.systemLocation());
#endif
qDebug() << "[TelescopeControl] port name:" << serialPortInf
o.portName()
<< "; vendor identifier:" << serialPortInfo.vendorI
dentifier()
<< "; product identifier:" << serialPortInfo.produc
tIdentifier();
} }
// on linux find some virtual ports // on linux find some virtual ports
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
QStringList filters; QStringList filters;
filters << "ttyNET*" << "ttynet*" << "Telescope*"; filters << "ttyNET*" << "ttynet*" << "Telescope*";
// look in /dev/* // look in /dev/*
QDir dev("/dev"); QDir dev("/dev");
dev.setFilter(QDir::System); dev.setFilter(QDir::System);
dev.setSorting(QDir::Reversed); dev.setSorting(QDir::Reversed);
skipping to change at line 120 skipping to change at line 129
} }
// Initialize the dialog widgets and connect the signals/slots // Initialize the dialog widgets and connect the signals/slots
void TelescopeConfigurationDialog::createDialogContent() void TelescopeConfigurationDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
//Inherited connect //Inherited connect
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(buttonDis cardPressed())); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(buttonDis cardPressed()));
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint)));
connect(dialog, SIGNAL(rejected()), this, SLOT(buttonDiscardPressed( ))); connect(dialog, SIGNAL(rejected()), this, SLOT(buttonDiscardPressed( )));
//Connect: sender, signal, receiver, member //Connect: sender, signal, receiver, member
connect(ui->radioButtonTelescopeLocal, SIGNAL(toggled(bool)), this, SLOT(toggleTypeLocal(bool))); connect(ui->radioButtonTelescopeLocal, SIGNAL(toggled(bool)), this, SLOT(toggleTypeLocal(bool)));
connect(ui->radioButtonTelescopeConnection, SIGNAL(toggled(bool)), t his, SLOT(toggleTypeConnection(bool))); connect(ui->radioButtonTelescopeConnection, SIGNAL(toggled(bool)), t his, SLOT(toggleTypeConnection(bool)));
connect(ui->radioButtonTelescopeVirtual, SIGNAL(toggled(bool)), this , SLOT(toggleTypeVirtual(bool))); connect(ui->radioButtonTelescopeVirtual, SIGNAL(toggled(bool)), this , SLOT(toggleTypeVirtual(bool)));
connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(buttonSave Pressed())); connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(buttonSave Pressed()));
connect(ui->pushButtonDiscard, SIGNAL(clicked()), this, SLOT(buttonD iscardPressed())); connect(ui->pushButtonDiscard, SIGNAL(clicked()), this, SLOT(buttonD iscardPressed()));
 End of changes. 4 change blocks. 
3 lines changed or deleted 17 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/