~daggerstab/stellarium/telescope-control-0-4-0

« back to all changes in this revision

Viewing changes to plugins/TelescopeControl/src/gui/StelDeviceWidget.cpp

  • Committer: Bogdan Marinov
  • Date: 2012-11-21 18:24:46 UTC
  • Revision ID: bogdan.marinov84@gmail.com-20121121182446-j5sj8jh5od1r9f0u
separate control widget for ASCOM devices

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
using namespace TelescopeControlGlobals;
39
39
 
40
40
StelDeviceWidget::StelDeviceWidget(TelescopeControl *plugin,
41
 
                                   const QString &id, QWidget *parent) :
 
41
                                   const QString &id,
 
42
                                   const TelescopeClientP& telescope,
 
43
                                   QWidget *parent) :
42
44
    QWidget(parent),
43
45
    clientId(id)
44
46
{
45
47
        Q_ASSERT(plugin);
46
48
        deviceManager = plugin;
47
49
        
 
50
        Q_ASSERT(telescope);
 
51
        client = telescope;
 
52
        
48
53
        ui = new Ui_StelDeviceWidget;
49
54
        ui->setupUi(this);
50
55
        
51
56
        coordsWidget = new CoordinatesWidget(this);
52
57
        ui->verticalLayout->addWidget(coordsWidget);
 
58
        coordsWidget->abortButton->setHidden(true);
 
59
        coordsWidget->syncButton->setHidden(true);
53
60
        
54
 
        TelescopeClientP telescope = deviceManager->getTelescope(id);
55
61
        fcWidget = new FovCirclesWidget(telescope.data(), this);
56
62
        ui->verticalLayout->addWidget(fcWidget);
57
63
        
59
65
        connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
60
66
                this, SLOT(retranslate()));
61
67
 
 
68
        // TODO: Find out if there's a way to reuse this code in
 
69
        // CoordinatesWidget or somewhere else.
62
70
        connect(coordsWidget->slewCoordsButton, SIGNAL(clicked()),
63
71
                this, SLOT(slewToCoords()));
64
72
        connect(coordsWidget->slewCenterButton, SIGNAL(clicked()),