42 setMaximumSize( width(), height() );
43 setMinimumSize( width(), height() );
45 setWindowTitle( tr(
"Song properties" ) );
48 songNameTxt->setText( pSong->getName() );
50 authorTxt->setText( pSong->getAuthor() );
51 notesTxt->append( pSong->getNotes() );
52 connect( licenseComboBox, SIGNAL( currentIndexChanged(
int ) ),
57 licenseComboBox->setToolTip( pCommonStrings->getLicenseComboToolTip() );
58 licenseStringTxt->setToolTip( pCommonStrings->getLicenseStringToolTip() );
60 licenseComboBox->setCurrentIndex(
static_cast<int>( pSong->getLicense().getType() ) );
61 licenseStringTxt->setText( pSong->getLicense().getLicenseString() );
63 licenseStringTxt->hide();
94 auto pSong = pHydrogen->getSong();
96 bool bIsModified =
false;
97 if ( songNameTxt->text() != pSong->getName() ) {
98 pSong->setName( songNameTxt->text() );
101 if ( pSong->getAuthor() != authorTxt->text() ) {
102 pSong->setAuthor( authorTxt->text() );
105 if ( pSong->getNotes() != notesTxt->toPlainText() ) {
106 pSong->setNotes( notesTxt->toPlainText() );
110 QString sNewLicenseString( licenseStringTxt->text() );
111 if ( licenseComboBox->currentIndex() ==
113 sNewLicenseString =
"";
115 License newLicense( sNewLicenseString );
116 if ( pSong->getLicense() != newLicense ) {
117 pSong->setLicense( newLicense );
122 pHydrogen->setIsModified(
true );