From 9184ea73941814b95c2768d8bcca8bdb77655891 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Sat, 17 Mar 2012 16:15:51 +0000 Subject: Changed Tracker code, so the DLL's are true plug-ins. FaceTrackNoIR will scan the bin folder for FTNoIR_Tracker*.dll and put the names in the combobox. All Trackers have 3 new member-functions (like the filters). git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@104 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h | 60 ++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 15 deletions(-) (limited to 'FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h') diff --git a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h index 4a26a824..a4933c35 100644 --- a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h +++ b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h @@ -1,3 +1,27 @@ +/******************************************************************************** +* FaceTrackNoIR This program is a private project of some enthusiastic * +* gamers from Holland, who don't like to pay much for * +* head-tracking. * +* * +* Copyright (C) 2012 Wim Vriend (Developing) * +* Ron Hendriks (Researching and Testing) * +* * +* Homepage: http://facetracknoir.sourceforge.net/home/default.htm * +* * +* This program is free software; you can redistribute it and/or modify it * +* under the terms of the GNU General Public License as published by the * +* Free Software Foundation; either version 3 of the License, or (at your * +* option) any later version. * +* * +* This program is distributed in the hope that it will be useful, but * +* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * +* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * +* more details. * +* * +* You should have received a copy of the GNU General Public License along * +* with this program; if not, see . * +* * +********************************************************************************/ #include "..\ftnoir_tracker_base\ftnoir_tracker_base.h" #include "..\ftnoir_tracker_base\ftnoir_tracker_sm_types.h" #include "ui_FTNoIR_SM_controls.h" @@ -10,11 +34,11 @@ using namespace std; -class FTNoIR_Tracker_SM : public ITracker +class FTNoIR_Tracker : public ITracker { public: - FTNoIR_Tracker_SM(); - ~FTNoIR_Tracker_SM(); + FTNoIR_Tracker(); + ~FTNoIR_Tracker(); void Release(); void Initialize( QFrame *videoframe ); @@ -24,7 +48,9 @@ public: void loadSettings(); bool SMCreateMapping(); - bool setParameterValue(const int index, const float newvalue); + void getFullName(QString *strToBeFilled); + void getShortName(QString *strToBeFilled); + void getDescription(QString *strToBeFilled); private: // @@ -33,32 +59,32 @@ private: HANDLE hSMMemMap; SMMemMap *pMemData; HANDLE hSMMutex; -// smEngineHeadPoseData new_head_pose; QProcess *faceAPI; - enum - { - kPortAddress=0, // Index in QList - kNumFilterParameters // Indicate number of parameters used - }; - QList> parameterRange; - QList parameterValueAsFloat; + QString trackerFullName; // Trackers' name and description + QString trackerShortName; + QString trackerDescription; }; // Widget that has controls for SMoIR protocol client-settings. -class SMClientControls: public QWidget, Ui::UICSMClientControls, public ITrackerDialog +class TrackerControls: public QWidget, Ui::UICSMClientControls, public ITrackerDialog { Q_OBJECT public: - explicit SMClientControls(); - virtual ~SMClientControls(); + explicit TrackerControls(); + virtual ~TrackerControls(); void showEvent ( QShowEvent * event ); void Release(); // Member functions which are accessible from outside the DLL void Initialize(QWidget *parent); + void getFullName(QString *strToBeFilled); + void getShortName(QString *strToBeFilled); + void getDescription(QString *strToBeFilled); + void getIcon(QIcon *icon); + private: Ui::UICSMClientControls ui; void loadSettings(); @@ -80,6 +106,10 @@ private: smEngineHandle *engine_handle; QTimer *timUpdateSettings; // Timer to display current settings + QString trackerFullName; // Trackers' name and description + QString trackerShortName; + QString trackerDescription; + private slots: void doOK(); void doCancel(); -- cgit v1.2.3