Changeset 180

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

added "license"-field for songs

Location:
trunk
Files:
5 modified

Legend:

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

    r127 r180  
    4646        authorTxt->setText( song->__author ); 
    4747        notesTxt->append( song->get_notes() ); 
     48        licenseTxt->setText( song->get_license() ); 
    4849} 
    4950 
     
    6768        song->__author = authorTxt->text(); 
    6869        song->set_notes( notesTxt->toPlainText() ); 
     70        song->set_license( licenseTxt->text() ); 
     71 
    6972        accept(); 
    7073} 
  • trunk/gui/src/UI/SongPropertiesDialog_UI.ui

    r45 r180  
    77    <y>0</y> 
    88    <width>290</width> 
    9     <height>332</height> 
     9    <height>378</height> 
    1010   </rect> 
    1111  </property> 
     
    5656    <rect> 
    5757     <x>10</x> 
    58      <y>132</y> 
     58     <y>190</y> 
    5959     <width>268</width> 
    6060     <height>24</height> 
     
    9494    <rect> 
    9595     <x>150</x> 
    96      <y>300</y> 
     96     <y>330</y> 
    9797     <width>90</width> 
    9898     <height>24</height> 
     
    113113    <rect> 
    114114     <x>50</x> 
    115      <y>300</y> 
     115     <y>330</y> 
    116116     <width>90</width> 
    117117     <height>24</height> 
     
    129129    <rect> 
    130130     <x>10</x> 
    131      <y>160</y> 
     131     <y>220</y> 
    132132     <width>271</width> 
    133      <height>131</height> 
     133     <height>101</height> 
    134134    </rect> 
     135   </property> 
     136  </widget> 
     137  <widget class="QLineEdit" name="licenseTxt" > 
     138   <property name="geometry" > 
     139    <rect> 
     140     <x>10</x> 
     141     <y>154</y> 
     142     <width>268</width> 
     143     <height>24</height> 
     144    </rect> 
     145   </property> 
     146  </widget> 
     147  <widget class="QLabel" name="TextLabel1_3" > 
     148   <property name="geometry" > 
     149    <rect> 
     150     <x>10</x> 
     151     <y>130</y> 
     152     <width>268</width> 
     153     <height>24</height> 
     154    </rect> 
     155   </property> 
     156   <property name="minimumSize" > 
     157    <size> 
     158     <width>0</width> 
     159     <height>20</height> 
     160    </size> 
     161   </property> 
     162   <property name="text" > 
     163    <string>License</string> 
    135164   </property> 
    136165  </widget> 
    137166 </widget> 
    138167 <layoutdefault spacing="6" margin="11" /> 
    139  <includes/> 
    140168 <resources/> 
    141169 <connections/> 
  • trunk/libs/hydrogen/include/hydrogen/Song.h

    r127 r180  
    6262        bool __is_modified; 
    6363        QString __name;         ///< song name 
    64         QString __author;               ///< author of the song 
     64        QString __author;       ///< author of the song 
     65        QString __license;      ///< license of the song 
    6566 
    6667        /* 
     
    123124        const QString& get_notes() { 
    124125                return __notes; 
     126        } 
     127 
     128        void set_license( const QString& license ) { 
     129                __license = license; 
     130        } 
     131        const QString& get_license() { 
     132                return __license; 
    125133        } 
    126134 
  • trunk/libs/hydrogen/src/local_file_mgr.cpp

    r179 r180  
    885885        LocalFileMng::writeXmlString( &songNode, "author", song->__author ); 
    886886        LocalFileMng::writeXmlString( &songNode, "notes", song->get_notes() ); 
     887        LocalFileMng::writeXmlString( &songNode, "license", song->get_license() ); 
    887888        LocalFileMng::writeXmlBool( &songNode, "loopEnabled", song->is_loop_enabled() ); 
    888889 
  • trunk/libs/hydrogen/src/song.cpp

    r127 r180  
    206206        QString sAuthor( LocalFileMng::readXmlString( songNode, "author", "Unknown Author" ) ); 
    207207        QString sNotes( LocalFileMng::readXmlString( songNode, "notes", "..." ) ); 
     208        QString sLicense( LocalFileMng::readXmlString( songNode, "license", "Unknown license" ) ); 
    208209        bool bLoopEnabled = LocalFileMng::readXmlBool( songNode, "loopEnabled", false ); 
    209210 
     
    221222        song->set_metronome_volume( fMetronomeVolume ); 
    222223        song->set_notes( sNotes ); 
     224        song->set_license( sLicense ); 
    223225        song->set_loop_enabled( bLoopEnabled ); 
    224226        song->set_mode( nMode );