hydrogen 1.2.3
WidgetWithLicenseProperty.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2008-2024 The hydrogen development team <hydrogen-devel@lists.sourceforge.net>
4 *
5 * http://www.hydrogen-music.org
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY, without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#ifndef WIDGET_WITH_LICENSE_PROPERTY_H
24#define WIDGET_WITH_LICENSE_PROPERTY_H
25
26#include <QString>
27#include <QObject>
28#include <core/License.h>
29
40 Q_DECLARE_TR_FUNCTIONS( WidgetWithLicenseProperty )
41protected:
42 void setupLicenseComboBox( QComboBox* pComboBox ) {
43
44 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_0),
46 .append( " (Public Domain)" ) );
47 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_BY),
49 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_BY_NC),
51 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_BY_SA),
53 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_BY_NC_SA),
55 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_BY_ND),
57 pComboBox->insertItem( static_cast<int>(H2Core::License::CC_BY_NC_ND),
59 pComboBox->insertItem( static_cast<int>(H2Core::License::GPL),
61 pComboBox->insertItem( static_cast<int>(H2Core::License::AllRightsReserved),
63
64 /*: Label used for all license not directly supported in
65 Hydrogen's license combo box.*/
66 pComboBox->insertItem( static_cast<int>(H2Core::License::Other),
67 tr( "Other" ) );
68 /*: Label used if no license was specified.*/
69 pComboBox->insertItem( static_cast<int>(H2Core::License::Unspecified),
70 tr( "Unspecified" ) );
71
72 // Default value.
73 pComboBox->setCurrentIndex( static_cast<int>(H2Core::License::Unspecified) );
74 }
75};
76
77#endif
@ GPL
Not a desirable license for audio data but introduced here specifically since it is already used by a...
Definition License.h:68
@ Unspecified
No license set yet.
Definition License.h:74
@ AllRightsReserved
User decides with withhold all rights.
Definition License.h:70
@ Other
All other licenses not specified above.
Definition License.h:72
static QString LicenseTypeToQString(LicenseType license)
Definition License.h:155
Widget is affected by the "Font size" settings in the PreferencesDialog.
void setupLicenseComboBox(QComboBox *pComboBox)