diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-03-31 05:52:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-03-31 05:52:43 +0200 |
commit | 6722803ee7e8c34649a351df0ea069ab4065de3a (patch) | |
tree | aaaf13343e087225a6b38982e498c7d50d55f3e9 /ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp | |
parent | f11305e6d89661f6a8552ff344358d93d09dd4ab (diff) |
hatire: minor opentrack API usage updates
Diffstat (limited to 'ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp')
-rw-r--r-- | ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp b/ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp index 1487cd39..34ebbeb8 100644 --- a/ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp +++ b/ftnoir_tracker_hatire/ftnoir_tracker_hat_dialog.cpp @@ -201,8 +201,8 @@ TrackerControls::TrackerControls() : theTracker(NULL), settingsDirty(false), tim connect(&timer,SIGNAL(timeout()), this,SLOT(poll_tracker_info())); - connect(ui.lineSend,SIGNAL(keyPressEvent),this,SLOT(on_lineSend_returnPressed()) ); - + // can't connect slot, keyPressEvent takes QKeyPressEvent as argument + //connect(ui.lineSend,SIGNAL(keyPressEvent),this,SLOT(on_lineSend_returnPressed()) ); } // @@ -365,8 +365,12 @@ void TrackerControls::doCancel() { } } - -void TrackerControls::registerTracker(ITracker *tracker) { +#ifdef OPENTRACK_API +void TrackerControls::register_tracker(ITracker *tracker) +#else +void TrackerControls::registerTracker(ITracker *tracker) +#endif +{ theTracker = static_cast<FTNoIR_Tracker*>(tracker); connect(theTracker, SIGNAL(sendMsgInfo(QByteArray)),this , SLOT(WriteMsgInfo(QByteArray))); @@ -383,8 +387,12 @@ void TrackerControls::registerTracker(ITracker *tracker) { } - -void TrackerControls::unRegisterTracker() { +#ifdef OPENTRACK_API +void TrackerControls::unregister_tracker() +#else +void TrackerControls::unRegisterTracker() +#endif +{ timer.stop(); theTracker=NULL; ui.cbSerialPort->setEnabled(true); @@ -406,7 +414,7 @@ void TrackerControls::unRegisterTracker() { // Win32 API function. // _GetTrackerDialog@0 - Common name decoration for __stdcall functions in C language. #ifdef OPENTRACK_API -extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog( ) +extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( ) #else #pragma comment(linker, "/export:GetTrackerDialog=_GetTrackerDialog@0") FTNOIR_TRACKER_BASE_EXPORT ITrackerDialogPtr __stdcall GetTrackerDialog( ) |