#ifndef     LtcsIifServiceWidget_H_
#define     LtcsIifServiceWidget_H_

#include <Nice/Qt/BridgeItem.h>
#include <Ltcs/Iif/ServiceWorkerInterface.h>
#include <QtDesigner/QDesignerExportWidget>
#include <Basda/ServiceStateMachine.h>

namespace Ui
{
    class LtcsIifServiceWidgetUI;
};

/**
 * @brief This class is the implementation of the GUI LtcsIifServiceWidgetUI
 */
class QDESIGNER_WIDGET_EXPORT LtcsIifServiceWidget : public QWidget,
        public Nice::BridgeItem
{
    private:
    Q_OBJECT

        /**
         * @brief Connect the Qt Designer Property propertyNode with the methods
         *        getPropertyNode and setPropertyNode.
         */
        Q_PROPERTY(QString PropertyNode READ getPropertyNode WRITE setPropertyNode)

        /**
         * @brief Connect the Qt Designer Property AutoSynch with the methods
         *        getSynchStatus and setSynchStatus.
         */
        Q_PROPERTY(bool AutoSynch READ getSynchStatus WRITE setSynchStatus)

        Ui::LtcsIifServiceWidgetUI* m_iifView;

        /**
         * @brief member for the command interface
         */
        Ltcs::IifServiceWorkerInterfacePtr m_cmd;

        Nice::Mutex m_mutex;

        Basda::ServiceState m_state;

    public:
        //------------------------------------------------------------
        /**
         * @brief Constructor
         * @param parent the parent widget
         * @param _connect ??
         */
        LtcsIifServiceWidget(QWidget * parent = 0, bool _connect =
                false);

        //------------------------------------------------------------
        virtual void initAttributes();

        /**
         * @brief This method can be used to connect different properties with
         *        method, which will be executed every time when a property changed.
         */
        virtual void initSlots();

    protected slots:
           virtual void setState ( Basda::ServiceStateMachine _state);
           virtual void slotQt_presetTelescope();
           virtual void slotQt_authorize(bool);
};

#endif
