// $Id: qtlcmswidgetsplugin-def.cpp,v 1.2 2008/02/19 21:02:41 hvengel Exp $
//  Little cms - profiler construction set
// Copyright (C) 2005-2006 Hal Engel
//
// THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
// EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
// WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
//
// IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
// INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
// OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
// WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
// LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
// OF THIS SOFTWARE.
//
// 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 <http://www.gnu.org/licenses/>.
//
// Version 1.99

#include "qtlcmswidgets.h"
#include "qtlcmswidgetsplugin-def.h"

#include <QtPlugin>

cmsxCIETongePlugin::cmsxCIETongePlugin(QObject *parent)
    : QObject(parent)
{
    initialized = false;
}

void cmsxCIETongePlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool cmsxCIETongePlugin::isInitialized() const
{
    return initialized;
}

QWidget *cmsxCIETongePlugin::createWidget(QWidget *parent)
{
    return new cmsxCIETonge(parent);
}

QString cmsxCIETongePlugin::name() const
{
    return "cmsxCIETonge";
}

QString cmsxCIETongePlugin::group() const
{
    return "LProf Custom Widgets";
}

QIcon cmsxCIETongePlugin::icon() const
{
    return QIcon(":cmsxCIETonge.png");
}

QString cmsxCIETongePlugin::toolTip() const
{
    return "";
}

QString cmsxCIETongePlugin::whatsThis() const
{
    return "";
}

bool cmsxCIETongePlugin::isContainer() const
{
    return false;
}

QString cmsxCIETongePlugin::domXml() const
{
    return "<widget class=\"cmsxCIETonge\" name=\"cmsxCIETonge\">\n"
            " <property name=\"geometry\">\n"
            "  <rect>\n"
            "   <x>0</x>\n"
            "   <y>0</y>\n"
            "   <width>200</width>\n"
            "   <height>150</height>\n"
            "  </rect>\n"
            " </property>\n"
            " <property name=\"toolTip\" >\n"
            "  <string>Gauge</string>\n"
            " </property>\n"
            " <property name=\"whatsThis\" >\n"
            "  <string>Gauge widget</string>\n"
            " </property>\n"                   
            " <property name=\"FileMask\" >\n"
            "  <double>0</double>\n"
            " </property>\n"                   
            " <property name=\"Prompt\" >\n"
            "  <double>100</double>\n"
            " </property>\n"
            "</widget>\n";
}

QString cmsxCIETongePlugin::includeFile() const
{
    return "qtlcmswidgets.h";
}

IT8SelectorPlugin::IT8SelectorPlugin(QObject *parent)
    : QObject(parent)
{
    initialized = false;
}

void IT8SelectorPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool IT8SelectorPlugin::isInitialized() const
{
    return initialized;
}

QWidget *IT8SelectorPlugin::createWidget(QWidget *parent)
{
    return new IT8Selector(parent);
}

QString IT8SelectorPlugin::name() const
{
    return "IT8Selector";
}

QString IT8SelectorPlugin::group() const
{
    return "LProf Custom Widgets";
}

QIcon IT8SelectorPlugin::icon() const
{
    return QIcon(":IT8Selector.png");
}

QString IT8SelectorPlugin::toolTip() const
{
    return "";
}

QString IT8SelectorPlugin::whatsThis() const
{
    return "";
}

bool IT8SelectorPlugin::isContainer() const
{
    return false;
}

QString IT8SelectorPlugin::domXml() const
{
    return "<widget class=\"IT8Selector\" name=\"IT8Selector\">\n"
           " <property name=\"geometry\">\n"
           "  <rect>\n"
           "   <x>0</x>\n"
           "   <y>0</y>\n"
           "   <width>90</width>\n"
           "   <height>25</height>\n"
           "  </rect>\n"
           " </property>\n"
           " <property name=\"toolTip\" >\n"
           "  <string>Gauge</string>\n"
           " </property>\n"
           " <property name=\"whatsThis\" >\n"
           "  <string>Gauge widget</string>\n"
           " </property>\n"                   
           " <property name=\"FileMask\" >\n"
           "  <double>0</double>\n"
           " </property>\n"                   
            " <property name=\"Prompt\" >\n"
           "  <double>100</double>\n"
           " </property>\n"
           "</widget>\n";
}

QString IT8SelectorPlugin::includeFile() const
{
    return "qtlcmswidgets.h";
}

IT8SelectorWithFileDialogPlugin::IT8SelectorWithFileDialogPlugin(QObject *parent)
    : QObject(parent)
{
    initialized = false;
}

void IT8SelectorWithFileDialogPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool IT8SelectorWithFileDialogPlugin::isInitialized() const
{
    return initialized;
}

QWidget *IT8SelectorWithFileDialogPlugin::createWidget(QWidget *parent)
{
    return new IT8SelectorWithFileDialog(parent);
}

QString IT8SelectorWithFileDialogPlugin::name() const
{
    return "IT8SelectorWithFileDialog";
}

QString IT8SelectorWithFileDialogPlugin::group() const
{
    return "LProf Custom Widgets";
}

QIcon IT8SelectorWithFileDialogPlugin::icon() const
{
    return QIcon(":IT8Selector.png");
}

QString IT8SelectorWithFileDialogPlugin::toolTip() const
{
    return "";
}

QString IT8SelectorWithFileDialogPlugin::whatsThis() const
{
    return "";
}

bool IT8SelectorWithFileDialogPlugin::isContainer() const
{
    return false;
}

QString IT8SelectorWithFileDialogPlugin::domXml() const
{
    return "<widget class=\"IT8SelectorWithFileDialog\" name=\"IT8SelectorWithFileDialog\">\n"
            " <property name=\"geometry\">\n"
            "  <rect>\n"
            "   <x>0</x>\n"
            "   <y>0</y>\n"
            "   <width>90</width>\n"
            "   <height>25</height>\n"
            "  </rect>\n"
            " </property>\n"
            " <property name=\"toolTip\" >\n"
            "  <string>Gauge</string>\n"
            " </property>\n"
            " <property name=\"whatsThis\" >\n"
            "  <string>Gauge widget</string>\n"
            " </property>\n"                   
            " <property name=\"FileMask\" >\n"
            "  <double>0</double>\n"
            " </property>\n"                   
            " <property name=\"Prompt\" >\n"
            "  <double>100</double>\n"
            " </property>\n"
            "</widget>\n";
}

QString IT8SelectorWithFileDialogPlugin::includeFile() const
{
    return "qtlcmswidgets.h";
}


IT8FileSelectorPlugin::IT8FileSelectorPlugin(QObject *parent)
    : QObject(parent)
{
    initialized = false;
}

void IT8FileSelectorPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool IT8FileSelectorPlugin::isInitialized() const
{
    return initialized;
}

QWidget *IT8FileSelectorPlugin::createWidget(QWidget *parent)
{
    return new IT8FileSelector(parent);
}

QString IT8FileSelectorPlugin::name() const
{
    return "IT8FileSelector";
}

QString IT8FileSelectorPlugin::group() const
{
    return "LProf Custom Widgets";
}

QIcon IT8FileSelectorPlugin::icon() const
{
    return QIcon(":IT8Selector.png");
}

QString IT8FileSelectorPlugin::toolTip() const
{
    return "";
}

QString IT8FileSelectorPlugin::whatsThis() const
{
    return "";
}

bool IT8FileSelectorPlugin::isContainer() const
{
    return false;
}

QString IT8FileSelectorPlugin::domXml() const
{
    return "<widget class=\"IT8FileSelector\" name=\"IT8FileSelector\">\n"
            " <property name=\"geometry\">\n"
            "  <rect>\n"
            "   <x>0</x>\n"
            "   <y>0</y>\n"
            "   <width>90</width>\n"
            "   <height>25</height>\n"
            "  </rect>\n"
            " </property>\n"
            " <property name=\"toolTip\" >\n"
            "  <string>Gauge</string>\n"
            " </property>\n"
            " <property name=\"whatsThis\" >\n"
            "  <string>Gauge widget</string>\n"
            " </property>\n"                   
            " <property name=\"FileMask\" >\n"
            "  <double>0</double>\n"
            " </property>\n"                   
            " <property name=\"Prompt\" >\n"
            "  <double>100</double>\n"
            " </property>\n"
            "</widget>\n";
}

QString IT8FileSelectorPlugin::includeFile() const
{
    return "qtlcmswidgets.h";
}

ICCProfileSelectorPlugin::ICCProfileSelectorPlugin(QObject *parent)
    : QObject(parent)
{
    initialized = false;
}

void ICCProfileSelectorPlugin::initialize(QDesignerFormEditorInterface * /* core */)
{
    if (initialized)
        return;

    initialized = true;
}

bool ICCProfileSelectorPlugin::isInitialized() const
{
    return initialized;
}

QWidget *ICCProfileSelectorPlugin::createWidget(QWidget *parent)
{
    return new ICCProfileSelector(parent);
}

QString ICCProfileSelectorPlugin::name() const
{
    return "ICCProfileSelector";
}

QString ICCProfileSelectorPlugin::group() const
{
    return "LProf Custom Widgets";
}

QIcon ICCProfileSelectorPlugin::icon() const
{
    return QIcon(":IT8Selector.png");
}

QString ICCProfileSelectorPlugin::toolTip() const
{
    return "";
}

QString ICCProfileSelectorPlugin::whatsThis() const
{
    return "";
}

bool ICCProfileSelectorPlugin::isContainer() const
{
    return false;
}

QString ICCProfileSelectorPlugin::domXml() const
{
    return "<widget class=\"ICCProfileSelector\" name=\"ICCProfileSelector\">\n"
            " <property name=\"geometry\">\n"
            "  <rect>\n"
            "   <x>0</x>\n"
            "   <y>0</y>\n"
            "   <width>90</width>\n"
            "   <height>25</height>\n"
            "  </rect>\n"
            " </property>\n"
            " <property name=\"toolTip\" >\n"
            "  <string>Gauge</string>\n"
            " </property>\n"
            " <property name=\"whatsThis\" >\n"
            "  <string>Gauge widget</string>\n"
            " </property>\n"                   
            " <property name=\"FileMask\" >\n"
            "  <double>0</double>\n"
            " </property>\n"                   
            " <property name=\"Prompt\" >\n"
            "  <double>100</double>\n"
            " </property>\n"
            "</widget>\n";
}

QString ICCProfileSelectorPlugin::includeFile() const
{
    return "qtlcmswidgets.h";
}

// The following widget code is dirived from the Gauge widget writen by  
// P. Sereno. It has been extensively modified for use in LProf.   This
// version is now GPL version 3

/***************************************************************************
 *   Copyright (C) 2008 by P. Sereno                                       *
 *   http://www.sereno-online.com                                          *
 *   http://www.qt4lab.org                                                 *
 *   http://www.qphoton.org                                                *
 *                                                                         *
 ***************************************************************************/

#include "lprofgauge.h"

LProfGaugePlugin::LProfGaugePlugin(QObject *parent)
    : QObject(parent)
{
    initialized = false;
}

void LProfGaugePlugin::initialize(QDesignerFormEditorInterface *)
{
    if (initialized)
        return;

    initialized = true;
}

bool LProfGaugePlugin::isInitialized() const
{
    return initialized;
}

QWidget *LProfGaugePlugin::createWidget(QWidget *parent)
{
    return new LProfGauge(parent);
}

QString LProfGaugePlugin::name() const
{
    return "LProfGauge";
}

QString LProfGaugePlugin::group() const
{
    return "LProf Custom Widgets";
}

QIcon LProfGaugePlugin::icon() const
{
    return QIcon(":LProfGauge.png");
}

QString LProfGaugePlugin::toolTip() const
{
    return "";
}

QString LProfGaugePlugin::whatsThis() const
{
    return "";
}

bool LProfGaugePlugin::isContainer() const
{
    return false;
}

QString LProfGaugePlugin::domXml() const
{
    return "<widget class=\"LProfGauge\" name=\"LProfGauge\">\n"
           " <property name=\"geometry\">\n"
           "  <rect>\n"
           "   <x>0</x>\n"
           "   <y>0</y>\n"
           "   <width>80</width>\n"
           "   <height>180</height>\n"
           "  </rect>\n"
           " </property>\n"
           " <property name=\"toolTip\" >\n"
           "  <string>Gauge</string>\n"
           " </property>\n"
           " <property name=\"whatsThis\" >\n"
           "  <string>Gauge widget</string>\n"
           " </property>\n"                   
           " <property name=\"minValue\" >\n"
           "  <double>0</double>\n"
           " </property>\n"                   
            " <property name=\"maxValue\" >\n"
           "  <double>100</double>\n"
           " </property>\n"                   
           " <property name=\"value\" >\n"
           "  <double>0</double>\n"
           " </property>\n"          
           " <property name=\"orientation\" >\n"
           "  <enum>LProfGauge::Vertical</enum>\n"
           " </property>\n"              
           " <property name=\"alarmEnabled\" >\n"
           "  <bool>false</bool>\n"
           " </property>\n"   
           " <property name=\"alarmThreshold\" >\n"
           "  <double>0</double>\n"
           " </property>\n"
           "</widget>\n";
}

QString LProfGaugePlugin::includeFile() const
{
    return "lprofgauge.h";
}
