File indexing completed on 2025-02-09 05:31:42
0001 /**************************************************************************** 0002 ** 0003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 0004 ** All rights reserved. 0005 ** Contact: Nokia Corporation (qt-info@nokia.com) 0006 ** 0007 ** This file is part of the Qt Designer of the Qt Toolkit. 0008 ** 0009 ** $QT_BEGIN_LICENSE:LGPL$ 0010 ** Commercial Usage 0011 ** Licensees holding valid Qt Commercial licenses may use this file in 0012 ** accordance with the Qt Commercial License Agreement provided with the 0013 ** Software or, alternatively, in accordance with the terms contained in 0014 ** a written agreement between you and Nokia. 0015 ** 0016 ** GNU Lesser General Public License Usage 0017 ** Alternatively, this file may be used under the terms of the GNU Lesser 0018 ** General Public License version 2.1 as published by the Free Software 0019 ** Foundation and appearing in the file LICENSE.LGPL included in the 0020 ** packaging of this file. Please review the following information to 0021 ** ensure the GNU Lesser General Public License version 2.1 requirements 0022 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 0023 ** 0024 ** In addition, as a special exception, Nokia gives you certain additional 0025 ** rights. These rights are described in the Nokia Qt LGPL Exception 0026 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 0027 ** 0028 ** GNU General Public License Usage 0029 ** Alternatively, this file may be used under the terms of the GNU 0030 ** General Public License version 3.0 as published by the Free Software 0031 ** Foundation and appearing in the file LICENSE.GPL included in the 0032 ** packaging of this file. Please review the following information to 0033 ** ensure the GNU General Public License version 3.0 requirements will be 0034 ** met: http://www.gnu.org/copyleft/gpl.html. 0035 ** 0036 ** If you have questions regarding the use of this file, please contact 0037 ** Nokia at qt-info@nokia.com. 0038 ** $QT_END_LICENSE$ 0039 ** 0040 ****************************************************************************/ 0041 0042 #include "volumesliderplugin.h" 0043 0044 #include <phonon/volumeslider.h> 0045 0046 static const char *volumeSliderToolTipC = "Phonon Volume Slider"; 0047 0048 VolumeSliderPlugin::VolumeSliderPlugin(const QString &group, QObject *parent) : 0049 QObject(parent), 0050 m_group(group), 0051 m_initialized(false) 0052 { 0053 } 0054 0055 QString VolumeSliderPlugin::name() const 0056 { 0057 return QLatin1String("Phonon::VolumeSlider"); 0058 } 0059 0060 QString VolumeSliderPlugin::group() const 0061 { 0062 return m_group; 0063 } 0064 0065 QString VolumeSliderPlugin::toolTip() const 0066 { 0067 return QString(QLatin1String(volumeSliderToolTipC)); 0068 } 0069 0070 QString VolumeSliderPlugin::whatsThis() const 0071 { 0072 return QString(QLatin1String(volumeSliderToolTipC)); 0073 } 0074 0075 QString VolumeSliderPlugin::includeFile() const 0076 { 0077 return QLatin1String("<phonon/volumeslider.h>"); 0078 } 0079 0080 QIcon VolumeSliderPlugin::icon() const 0081 { 0082 return QIcon(QLatin1String(":/trolltech/phononwidgets/images/volumeslider.png")); 0083 } 0084 0085 bool VolumeSliderPlugin::isContainer() const 0086 { 0087 return false; 0088 } 0089 0090 QWidget *VolumeSliderPlugin::createWidget(QWidget *parent) 0091 { 0092 return new Phonon::VolumeSlider(parent); 0093 } 0094 0095 bool VolumeSliderPlugin::isInitialized() const 0096 { 0097 return m_initialized; 0098 } 0099 0100 void VolumeSliderPlugin::initialize(QDesignerFormEditorInterface *) 0101 { 0102 if (m_initialized) 0103 return; 0104 m_initialized = true; 0105 } 0106 0107 QString VolumeSliderPlugin::domXml() const 0108 { 0109 return QLatin1String("\ 0110 <ui language=\"c++\">\ 0111 <widget class=\"Phonon::VolumeSlider\" name=\"volumeSlider\"/>\ 0112 </ui>"); 0113 }