Changeset 179
- Timestamp:
- 06/07/08 14:12:44 (5 years ago)
- Location:
- trunk
- Files:
-
- 9 modified
-
gui/src/DrumkitManager.cpp (modified) (1 diff)
-
gui/src/SoundLibrary/SoundLibraryImportDialog.cpp (modified) (2 diffs)
-
gui/src/SoundLibrary/SoundLibraryImportDialog.h (modified) (1 diff)
-
gui/src/SoundLibrary/SoundLibraryImportDialog_UI.ui (modified) (1 diff)
-
gui/src/SoundLibrary/SoundLibrarySaveDialog.cpp (modified) (1 diff)
-
gui/src/SoundLibrary/SoundLibrarySaveDialog_UI.ui (modified) (12 diffs)
-
libs/hydrogen/include/hydrogen/SoundLibrary.h (modified) (3 diffs)
-
libs/hydrogen/src/local_file_mgr.cpp (modified) (2 diffs)
-
libs/hydrogen/src/sound_library.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/src/DrumkitManager.cpp
r127 r179 248 248 saveTab_nameTxt->text(), 249 249 saveTab_authorTxt->text(), 250 saveTab_infoTxt->toPlainText() 250 saveTab_infoTxt->toPlainText(), 251 QString("") 251 252 ); 252 253 updateDrumkitList(); -
trunk/gui/src/SoundLibrary/SoundLibraryImportDialog.cpp
r127 r179 171 171 } 172 172 173 QDomElement licenseNode = drumkitNode.firstChildElement( "license" ); 174 if ( !licenseNode.isNull() ) { 175 soundLibInfo.m_sLicense = licenseNode.text(); 176 } 177 173 178 m_soundLibraryList.push_back( soundLibInfo ); 174 179 } … … 312 317 313 318 AuthorLbl->setText( trUtf8( "Author: %1" ).arg( info.m_sAuthor ) ); 319 320 LicenseLbl->setText( trUtf8( "License: %1" ).arg( info.m_sLicense ) ); 321 322 314 323 DownloadBtn->setEnabled( true ); 315 324 return; -
trunk/gui/src/SoundLibrary/SoundLibraryImportDialog.h
r162 r179 40 40 QString m_sAuthor; 41 41 QString m_sType; 42 QString m_sLicense; 42 43 }; 43 44 -
trunk/gui/src/SoundLibrary/SoundLibraryImportDialog_UI.ui
r124 r179 96 96 </item> 97 97 <item> 98 <widget class="QLabel" name="LicenseLbl" > 99 <property name="maximumSize" > 100 <size> 101 <width>16777215</width> 102 <height>30</height> 103 </size> 104 </property> 105 <property name="text" > 106 <string>License...</string> 107 </property> 108 </widget> 109 </item> 110 <item> 98 111 <widget class="QLabel" name="AuthorLbl" > 99 112 <property name="maximumSize" > -
trunk/gui/src/SoundLibrary/SoundLibrarySaveDialog.cpp
r127 r179 52 52 nameTxt->text(), 53 53 authorTxt->text(), 54 infoTxt->toHtml() 54 infoTxt->toHtml(), 55 licenseTxt->text() 55 56 ); 56 57 accept(); -
trunk/gui/src/SoundLibrary/SoundLibrarySaveDialog_UI.ui
r3 r179 1 1 <ui version="4.0" > 2 <author></author>3 <comment></comment>4 <exportmacro></exportmacro>5 2 <class>SoundLibrarySaveDialog_UI</class> 6 3 <widget class="QDialog" name="SoundLibrarySaveDialog_UI" > … … 9 6 <x>0</x> 10 7 <y>0</y> 11 <width>61 1</width>12 <height>2 49</height>8 <width>612</width> 9 <height>285</height> 13 10 </rect> 14 11 </property> … … 26 23 </property> 27 24 <property name="sizePolicy" > 28 <sizepolicy> 29 <hsizetype>7</hsizetype> 30 <vsizetype>7</vsizetype> 25 <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > 31 26 <horstretch>0</horstretch> 32 27 <verstretch>0</verstretch> … … 47 42 </property> 48 43 <property name="sizePolicy" > 49 <sizepolicy> 50 <hsizetype>7</hsizetype> 51 <vsizetype>5</vsizetype> 44 <sizepolicy vsizetype="Preferred" hsizetype="Expanding" > 52 45 <horstretch>0</horstretch> 53 46 <verstretch>0</verstretch> … … 62 55 <rect> 63 56 <x>10</x> 64 <y> 70</y>57 <y>100</y> 65 58 <width>91</width> 66 59 <height>111</height> … … 80 73 <y>10</y> 81 74 <width>20</width> 82 <height>2 31</height>75 <height>271</height> 83 76 </rect> 84 77 </property> … … 91 84 <rect> 92 85 <x>60</x> 93 <y>2 10</y>86 <y>250</y> 94 87 <width>109</width> 95 88 <height>32</height> … … 103 96 <property name="geometry" > 104 97 <rect> 105 <x>1 70</x>106 <y>2 10</y>107 <width>1 61</width>98 <x>180</x> 99 <y>250</y> 100 <width>171</width> 108 101 <height>32</height> 109 102 </rect> … … 123 116 </property> 124 117 <property name="sizePolicy" > 125 <sizepolicy> 126 <hsizetype>0</hsizetype> 127 <vsizetype>0</vsizetype> 118 <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > 128 119 <horstretch>0</horstretch> 129 120 <verstretch>0</verstretch> … … 147 138 </property> 148 139 <property name="sizePolicy" > 149 <sizepolicy> 150 <hsizetype>0</hsizetype> 151 <vsizetype>0</vsizetype> 140 <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > 152 141 <horstretch>0</horstretch> 153 142 <verstretch>0</verstretch> … … 165 154 <rect> 166 155 <x>110</x> 167 <y> 70</y>156 <y>100</y> 168 157 <width>231</width> 169 158 <height>111</height> … … 174 163 </property> 175 164 </widget> 165 <widget class="QLabel" name="label_4" > 166 <property name="geometry" > 167 <rect> 168 <x>10</x> 169 <y>70</y> 170 <width>91</width> 171 <height>21</height> 172 </rect> 173 </property> 174 <property name="text" > 175 <string>License</string> 176 </property> 177 <property name="alignment" > 178 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> 179 </property> 180 </widget> 181 <widget class="QLineEdit" name="licenseTxt" > 182 <property name="geometry" > 183 <rect> 184 <x>110</x> 185 <y>70</y> 186 <width>231</width> 187 <height>25</height> 188 </rect> 189 </property> 190 <property name="sizePolicy" > 191 <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > 192 <horstretch>0</horstretch> 193 <verstretch>0</verstretch> 194 </sizepolicy> 195 </property> 196 <property name="minimumSize" > 197 <size> 198 <width>209</width> 199 <height>0</height> 200 </size> 201 </property> 202 </widget> 176 203 </widget> 177 <pixmapfunction></pixmapfunction>178 204 <resources/> 179 205 <connections> -
trunk/libs/hydrogen/include/hydrogen/SoundLibrary.h
r127 r179 71 71 72 72 // Save a drumkit 73 static void save( const QString& sName, const QString& sAuthor, const QString& sInfo );73 static void save( const QString& sName, const QString& sAuthor, const QString& sInfo, const QString& sLicense ); 74 74 75 75 … … 105 105 } 106 106 107 void setLicense( const QString& license ) { 108 this->m_sLicense = license; 109 } 110 const QString& getLicense() { 111 return m_sLicense; 112 } 113 107 114 void dump(); 108 115 … … 112 119 QString m_sAuthor; 113 120 QString m_sInfo; 121 QString m_sLicense; 114 122 }; 115 123 -
trunk/libs/hydrogen/src/local_file_mgr.cpp
r137 r179 433 433 QString author = readXmlString( drumkitNode, "author", "undefined author", true ); 434 434 QString info = readXmlString( drumkitNode, "info", "defaultInfo", true ); 435 QString license = readXmlString( drumkitNode, "license", "undefined license", true ); 435 436 436 437 Drumkit *drumkitInfo = new Drumkit(); … … 438 439 drumkitInfo->setAuthor( author ); 439 440 drumkitInfo->setInfo( info ); 441 drumkitInfo->setLicense( info ); 440 442 441 443 InstrumentList *instrumentList = new InstrumentList(); -
trunk/libs/hydrogen/src/sound_library.cpp
r127 r179 171 171 172 172 173 void Drumkit::save( const QString& sName, const QString& sAuthor, const QString& sInfo )173 void Drumkit::save( const QString& sName, const QString& sAuthor, const QString& sInfo, const QString& sLicense ) 174 174 { 175 175 _INFOLOG( "Saving drumkit" ); … … 179 179 pDrumkitInfo->setAuthor( sAuthor ); 180 180 pDrumkitInfo->setInfo( sInfo ); 181 pDrumkitInfo->setLicense( sLicense ); 181 182 182 183 Song *pSong = Hydrogen::get_instance()->getSong();