Changeset 179

Show
Ignore:
Timestamp:
06/07/08 14:12:44 (5 years ago)
Author:
smoors
Message:

added "license"-field for soundlibraries

Location:
trunk
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/gui/src/DrumkitManager.cpp

    r127 r179  
    248248                        saveTab_nameTxt->text(), 
    249249                        saveTab_authorTxt->text(), 
    250                         saveTab_infoTxt->toPlainText() 
     250                        saveTab_infoTxt->toPlainText(), 
     251                        QString("") 
    251252        ); 
    252253        updateDrumkitList(); 
  • trunk/gui/src/SoundLibrary/SoundLibraryImportDialog.cpp

    r127 r179  
    171171                                } 
    172172 
     173                                QDomElement licenseNode = drumkitNode.firstChildElement( "license" ); 
     174                                if ( !licenseNode.isNull() ) { 
     175                                        soundLibInfo.m_sLicense = licenseNode.text(); 
     176                                } 
     177 
    173178                                m_soundLibraryList.push_back( soundLibInfo ); 
    174179                        } 
     
    312317 
    313318                                AuthorLbl->setText( trUtf8( "Author: %1" ).arg( info.m_sAuthor ) ); 
     319 
     320                                LicenseLbl->setText( trUtf8( "License: %1" ).arg( info.m_sLicense ) ); 
     321 
     322 
    314323                                DownloadBtn->setEnabled( true ); 
    315324                                return; 
  • trunk/gui/src/SoundLibrary/SoundLibraryImportDialog.h

    r162 r179  
    4040        QString m_sAuthor; 
    4141        QString m_sType; 
     42        QString m_sLicense; 
    4243}; 
    4344 
  • trunk/gui/src/SoundLibrary/SoundLibraryImportDialog_UI.ui

    r124 r179  
    9696      </item> 
    9797      <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> 
    98111       <widget class="QLabel" name="AuthorLbl" > 
    99112        <property name="maximumSize" > 
  • trunk/gui/src/SoundLibrary/SoundLibrarySaveDialog.cpp

    r127 r179  
    5252                        nameTxt->text(), 
    5353                        authorTxt->text(), 
    54                         infoTxt->toHtml() 
     54                        infoTxt->toHtml(), 
     55                        licenseTxt->text() 
    5556        ); 
    5657        accept(); 
  • trunk/gui/src/SoundLibrary/SoundLibrarySaveDialog_UI.ui

    r3 r179  
    11<ui version="4.0" > 
    2  <author></author> 
    3  <comment></comment> 
    4  <exportmacro></exportmacro> 
    52 <class>SoundLibrarySaveDialog_UI</class> 
    63 <widget class="QDialog" name="SoundLibrarySaveDialog_UI" > 
     
    96    <x>0</x> 
    107    <y>0</y> 
    11     <width>611</width> 
    12     <height>249</height> 
     8    <width>612</width> 
     9    <height>285</height> 
    1310   </rect> 
    1411  </property> 
     
    2623   </property> 
    2724   <property name="sizePolicy" > 
    28     <sizepolicy> 
    29      <hsizetype>7</hsizetype> 
    30      <vsizetype>7</vsizetype> 
     25    <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > 
    3126     <horstretch>0</horstretch> 
    3227     <verstretch>0</verstretch> 
     
    4742   </property> 
    4843   <property name="sizePolicy" > 
    49     <sizepolicy> 
    50      <hsizetype>7</hsizetype> 
    51      <vsizetype>5</vsizetype> 
     44    <sizepolicy vsizetype="Preferred" hsizetype="Expanding" > 
    5245     <horstretch>0</horstretch> 
    5346     <verstretch>0</verstretch> 
     
    6255    <rect> 
    6356     <x>10</x> 
    64      <y>70</y> 
     57     <y>100</y> 
    6558     <width>91</width> 
    6659     <height>111</height> 
     
    8073     <y>10</y> 
    8174     <width>20</width> 
    82      <height>231</height> 
     75     <height>271</height> 
    8376    </rect> 
    8477   </property> 
     
    9184    <rect> 
    9285     <x>60</x> 
    93      <y>210</y> 
     86     <y>250</y> 
    9487     <width>109</width> 
    9588     <height>32</height> 
     
    10396   <property name="geometry" > 
    10497    <rect> 
    105      <x>170</x> 
    106      <y>210</y> 
    107      <width>161</width> 
     98     <x>180</x> 
     99     <y>250</y> 
     100     <width>171</width> 
    108101     <height>32</height> 
    109102    </rect> 
     
    123116   </property> 
    124117   <property name="sizePolicy" > 
    125     <sizepolicy> 
    126      <hsizetype>0</hsizetype> 
    127      <vsizetype>0</vsizetype> 
     118    <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > 
    128119     <horstretch>0</horstretch> 
    129120     <verstretch>0</verstretch> 
     
    147138   </property> 
    148139   <property name="sizePolicy" > 
    149     <sizepolicy> 
    150      <hsizetype>0</hsizetype> 
    151      <vsizetype>0</vsizetype> 
     140    <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > 
    152141     <horstretch>0</horstretch> 
    153142     <verstretch>0</verstretch> 
     
    165154    <rect> 
    166155     <x>110</x> 
    167      <y>70</y> 
     156     <y>100</y> 
    168157     <width>231</width> 
    169158     <height>111</height> 
     
    174163   </property> 
    175164  </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> 
    176203 </widget> 
    177  <pixmapfunction></pixmapfunction> 
    178204 <resources/> 
    179205 <connections> 
  • trunk/libs/hydrogen/include/hydrogen/SoundLibrary.h

    r127 r179  
    7171 
    7272        // 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 ); 
    7474 
    7575 
     
    105105        } 
    106106 
     107        void setLicense( const QString& license ) { 
     108                this->m_sLicense = license; 
     109        } 
     110        const QString& getLicense() { 
     111                return m_sLicense; 
     112        } 
     113 
    107114        void dump(); 
    108115 
     
    112119        QString m_sAuthor; 
    113120        QString m_sInfo; 
     121        QString m_sLicense; 
    114122}; 
    115123 
  • trunk/libs/hydrogen/src/local_file_mgr.cpp

    r137 r179  
    433433        QString author = readXmlString( drumkitNode, "author", "undefined author", true ); 
    434434        QString info = readXmlString( drumkitNode, "info", "defaultInfo", true ); 
     435        QString license = readXmlString( drumkitNode, "license", "undefined license", true ); 
    435436 
    436437        Drumkit *drumkitInfo = new Drumkit(); 
     
    438439        drumkitInfo->setAuthor( author ); 
    439440        drumkitInfo->setInfo( info ); 
     441        drumkitInfo->setLicense( info ); 
    440442 
    441443        InstrumentList *instrumentList = new InstrumentList(); 
  • trunk/libs/hydrogen/src/sound_library.cpp

    r127 r179  
    171171 
    172172 
    173 void Drumkit::save( const QString& sName, const QString& sAuthor, const QString& sInfo ) 
     173void Drumkit::save( const QString& sName, const QString& sAuthor, const QString& sInfo, const QString& sLicense ) 
    174174{ 
    175175        _INFOLOG( "Saving drumkit" ); 
     
    179179        pDrumkitInfo->setAuthor( sAuthor ); 
    180180        pDrumkitInfo->setInfo( sInfo ); 
     181        pDrumkitInfo->setLicense( sLicense ); 
    181182 
    182183        Song *pSong = Hydrogen::get_instance()->getSong();