void
PodcastSettingsDialog::init()
{
    QString url = m_channel->url().url();
    m_ps->m_urlLineEdit->setText( url );

    m_ps->m_saveLocation->setMode( KFile::Directory | KFile::ExistingOnly );
    m_ps->m_saveLocation->setUrl( m_channel->saveLocation() );

    m_ps->m_autoFetchCheck->setChecked( m_channel->autoScan() );

    if( m_channel->fetchType() == Podcasts::PodcastChannel::StreamOrDownloadOnDemand )
    {
        m_ps->m_streamRadio->setChecked( true );
        m_ps->m_downloadRadio->setChecked( false );
    }
    else if( m_channel->fetchType() == Podcasts::PodcastChannel::DownloadWhenAvailable )
    {
        m_ps->m_streamRadio->setChecked( false );
        m_ps->m_downloadRadio->setChecked( true );
    }

    m_ps->m_purgeCheck->setChecked( m_channel->hasPurge() );
    m_ps->m_purgeCountSpinBox->setValue( m_channel->purgeCount() );
    m_ps->m_purgeCountSpinBox->setSuffix( ki18np( " Item", " Items" ) );

    if( !m_channel->hasPurge() )
    {
        m_ps->m_purgeCountSpinBox->setEnabled( false );
        m_ps->m_purgeCountLabel->setEnabled( false );
    }

    m_ps->m_writeTagsCheck->setChecked( m_channel->writeTags() );

    enableButtonApply( false );

    // Connects for modification check
    connect( m_ps->m_urlLineEdit, SIGNAL(textChanged( const QString& )),
             SLOT(checkModified()) );
    connect( m_ps->m_saveLocation, SIGNAL(textChanged( const QString& )),
             SLOT(checkModified()) );
    connect( m_ps->m_autoFetchCheck, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_streamRadio, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_downloadRadio, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_purgeCheck, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_purgeCountSpinBox, SIGNAL(valueChanged( int )), SLOT(checkModified()) );
    connect( m_ps->m_writeTagsCheck, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_filenameLayoutConfigWidgetButton, SIGNAL(clicked()), SLOT(launchFilenameLayoutConfigDialog()) );

    connect( this, SIGNAL(applyClicked()), this ,SLOT(slotApply()) );
    connect( this, SIGNAL(okClicked()), this, SLOT(slotApply()) );
}
void T3kSoftlogicDlg::on_BtnLoad_clicked()
{
    if( !checkModified() )
        return;

    QString strDir( QApplication::applicationDirPath() );
    if( !m_strLoadedModelPathName.isEmpty() )
    {
        int nBP = m_strLoadedModelPathName.lastIndexOf( '/' );
        strDir = m_strLoadedModelPathName.left( nBP+1 );
    }

    QString strLoad = QFileDialog::getOpenFileName( this, "Open", strDir, "Files(*.hsk)" );

    if( !strLoad.isEmpty() )
    {
        loadModel( strLoad );

        m_pTabPanelWidget->updateUIFromData();
        T3kCommonData::instance()->resetCalibrationData();
        onUpdatePrewview();

        m_pTabKeyDesignWidget->refresh();
        //m_wndTab.ResetNotify();
    }
}
Exemple #3
0
void Project::seed(const QString& s, bool init)
{
    if (init) {
        _seed = s;
        ui->conf_seed->setText(s);
    } else {
        checkModified();
    }
}
Exemple #4
0
void Project::zincArgs(const QString& a, bool init)
{
    if (init) {
        _zincArgs = a;
        ui->conf_zinc_params->setText(a);
    } else {
        checkModified();
    }
}
Exemple #5
0
void Project::haveZincArgs(bool b, bool init)
{
    if (init) {
        _haveZincArgs = b;
        ui->conf_have_zinc_params->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #6
0
void Project::timeLimit(int n, bool init)
{
    if (init) {
        _timeLimit = n;
        ui->conf_timeLimit->setValue(n);
    } else {
        checkModified();
    }
}
Exemple #7
0
void Project::solverVerbose(bool b, bool init)
{
    if (init) {
        _solverVerbose = b;
        ui->conf_solver_verbose->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #8
0
void UiController::clearDataFlowNetwork()
{
   if (!checkModified("New"))
      return;

   m_vistleConnection->resetDataFlowNetwork();
   m_mainWindow.setFilename(QString());
   m_observer.resetModificationCount();
}
Exemple #9
0
void Project::haveSeed(bool b, bool init)
{
    if (init) {
        _haveSeed = b;
        ui->conf_have_seed->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #10
0
void Project::currentDataFileIndex(int i, bool init)
{
    if (init) {
        _currentDatafileIndex = i;
        ui->conf_data_file->setCurrentIndex(i);
    } else {
        checkModified();
    }
}
Exemple #11
0
void Project::solverFlags(const QString& s, bool init)
{
    if (init) {
        _solverFlags = s;
        ui->conf_solverFlags->setText(s);
    } else {
        checkModified();
    }
}
Exemple #12
0
void Project::haveSolverFlags(bool b, bool init)
{
    if (init) {
        _haveSolverFlags = b;
        ui->conf_have_solverFlags->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #13
0
void Project::mzn2fznVerbose(bool b, bool init)
{
    if (init) {
        _mzn2fzn_verbose= b;
        ui->conf_verbose->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #14
0
void Project::defaultBehaviour(bool b, bool init)
{
    if (init) {
        _defaultBehaviour = b;
        ui->defaultBehaviourButton->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #15
0
void Project::printStats(bool b, bool init)
{
    if (init) {
        _printStats = b;
        ui->conf_stats->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #16
0
void Project::n_solutions(int n, bool init)
{
    if (init) {
        _n_solutions = n;
        ui->conf_nsol->setValue(n);
    } else {
        checkModified();
    }
}
Exemple #17
0
void Project::printAll(bool b, bool init)
{
    if (init) {
        _printAll = b;
        ui->conf_printall->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #18
0
void Project::mzn2fznOptimize(bool b, bool init)
{
    if (init) {
        _mzn2fzn_optimize = b;
        ui->conf_optimize->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #19
0
void Project::currentSolver(const QString& s, bool init)
{
    if (init) {
        _currentSolver = s;
        ui->conf_solver->setCurrentText(s);
    } else {
        checkModified();
    }
}
Exemple #20
0
void Project::extraMzn2FznArgs(const QString& a, bool init)
{
    if (init) {
        _extraMzn2FznArgs = a;
        ui->conf_mzn2fzn_params->setText(a);
    } else {
        checkModified();
    }
}
Exemple #21
0
void Project::haveExtraMzn2FznArgs(bool b, bool init)
{
    if (init) {
        _haveExtraMzn2FznArgs = b;
        ui->conf_have_mzn2fzn_params->setChecked(b);
    } else {
        checkModified();
    }
}
Exemple #22
0
void Project::n_threads(int n, bool init)
{
    if (init) {
        _n_threads = n;
        ui->conf_nthreads->setValue(n);
    } else {
        checkModified();
    }
}
Exemple #23
0
void Player::deSerialize(std::istream &is, std::string playername)
{
	Settings args;
	
	for(;;)
	{
		if(is.eof())
			throw SerializationError
					(("Player::deSerialize(): PlayerArgsEnd of player \"" + playername + "\" not found").c_str());
		std::string line;
		std::getline(is, line);
		std::string trimmedline = trim(line);
		if(trimmedline == "PlayerArgsEnd")
			break;
		args.parseConfigLine(line);
	}

	//args.getS32("version"); // Version field value not used
	std::string name = args.get("name");
	updateName(name.c_str());
	setPitch(args.getFloat("pitch"));
	setYaw(args.getFloat("yaw"));
	setPosition(args.getV3F("position"));
	try{
		hp = args.getS32("hp");
	}catch(SettingNotFoundException &e){
		hp = 20;
	}
	try{
		m_breath = args.getS32("breath");
	}catch(SettingNotFoundException &e){
		m_breath = 11;
	}

	inventory.deSerialize(is);

	if(inventory.getList("craftpreview") == NULL)
	{
		// Convert players without craftpreview
		inventory.addList("craftpreview", 1);

		bool craftresult_is_preview = true;
		if(args.exists("craftresult_is_preview"))
			craftresult_is_preview = args.getBool("craftresult_is_preview");
		if(craftresult_is_preview)
		{
			// Clear craftresult
			inventory.getList("craftresult")->changeItem(0, ItemStack());
		}
	}

	// Set m_last_*
	checkModified();
}
Exemple #24
0
void
PodcastSettingsDialog::init()
{
        m_ps = new PodcastSettingsDialogBase(this);

        KWin::setState( winId(), NET::SkipTaskbar );

        setMainWidget(m_ps);
        m_ps->m_saveLocation->setMode( KFile::Directory | KFile::ExistingOnly );

        m_ps->m_addToMediaDeviceCheck->setEnabled( MediaBrowser::isAvailable() );

        enableButtonOK( false );

         // Connects for modification check
        connect( m_ps->m_purgeCountSpinBox->child( "qt_spinbox_edit" ),  SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
        connect( m_ps->m_saveLocation,   SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
        connect( m_ps->m_autoFetchCheck, SIGNAL(clicked()),                     SLOT(checkModified()) );
        connect( m_ps->m_streamRadio,    SIGNAL(clicked()),                     SLOT(checkModified()) );
        connect( m_ps->m_addToMediaDeviceCheck, SIGNAL(clicked()),              SLOT(checkModified()) );
        connect( m_ps->m_downloadRadio,  SIGNAL(clicked()),                     SLOT(checkModified()) );
        connect( m_ps->m_purgeCheck,     SIGNAL(clicked()),                     SLOT(checkModified()) );
}
Exemple #25
0
void qGo::quit()
{
	emit signal_leave_qgo();
	int check;
	if ((check = checkModified()) == 1 ||
		(!check &&
		!QMessageBox::warning(0, PACKAGE,
		tr("At least one board is modified.\n"
		"If you exit the application now, all changes will be lost!"
		"\nExit anyway?"),
		tr("Yes"), tr("No"), QString::null,
		1, 0)))
	{
		//	qApp->quit();
		qDebug("Program quits now...");
	}
	
	//    emit signal_leave_qgo();
}
void T3kSoftlogicDlg::onHandleMessage(const QString &msg)
{
    raise();
    activateWindow();

    QString strCmdLine = msg;
    strCmdLine.replace( '\"', "" );

    if( !checkModified() )
        return;

    if( loadModel( strCmdLine ) )
    {
        m_pTabPanelWidget->updateUIFromData();
        T3kCommonData::instance()->resetCalibrationData();
        onUpdatePrewview();

        //m_wndTab.ResetNotify();
    }
}
Exemple #27
0
void UiController::loadDataFlowNetwork()
{
   if (!checkModified("Open"))
      return;

   QString dir = m_currentFile.isEmpty() ? QDir::currentPath() : m_currentFile;
   QString filename = QFileDialog::getOpenFileName(&m_mainWindow,
      tr("Open Data Flow Network"),
      dir,
      tr("Vistle files (*.vsl);;Python files (*.py);;All files (*)"));

   if (filename.isEmpty())
      return;

   clearDataFlowNetwork();

   m_mainWindow.setFilename(filename);

   vistle::PythonInterface::the().exec_file(filename.toStdString());

   m_observer.resetModificationCount();
}
Exemple #28
0
KrViewer::KrViewer(QWidget *parent) :
        KParts::MainWindow(parent, (Qt::WindowFlags)KDE_DEFAULT_WINDOWFLAGS), manager(this, this), tabBar(this),
        reservedKeys(), reservedKeyActions(), sizeX(-1), sizeY(-1)
{
    //setWFlags(Qt::WType_TopLevel | WDestructiveClose);
    setXMLFile("krviewer.rc");   // kpart-related xml file
    setHelpMenuEnabled(false);

    connect(&manager, SIGNAL(activePartChanged(KParts::Part*)),
            this, SLOT(createGUI(KParts::Part*)));
    connect(&tabBar, &QTabWidget::currentChanged, this, &KrViewer::tabChanged);
    connect(&tabBar, SIGNAL(tabCloseRequested(int)), this, SLOT(tabCloseRequest(int)));

    tabBar.setDocumentMode(true);
    tabBar.setMovable(true);
    setCentralWidget(&tabBar);

    printAction = KStandardAction::print(this, SLOT(print()), 0);
    copyAction = KStandardAction::copy(this, SLOT(copy()), 0);

    viewerMenu = new QMenu(this);
    QAction *tempAction;
    KActionCollection *ac = actionCollection();

#define addCustomMenuAction(name, text, slot, shortcut)\
    tempAction = ac->addAction(name, this, slot);\
    tempAction->setText(text);\
    ac->setDefaultShortcut(tempAction, shortcut);\
    viewerMenu->addAction(tempAction);

    addCustomMenuAction("genericViewer", i18n("&Generic Viewer"), SLOT(viewGeneric()), Qt::CTRL + Qt::SHIFT + Qt::Key_G);
    addCustomMenuAction("textViewer", i18n("&Text Viewer"), SLOT(viewText()), Qt::CTRL + Qt::SHIFT + Qt::Key_T);
    addCustomMenuAction("hexViewer", i18n("&Hex Viewer"), SLOT(viewHex()), Qt::CTRL + Qt::SHIFT + Qt::Key_H);
    addCustomMenuAction("lister", i18n("&Lister"), SLOT(viewLister()), Qt::CTRL + Qt::SHIFT + Qt::Key_L);
    viewerMenu->addSeparator();

    addCustomMenuAction("textEditor", i18n("Text &Editor"), SLOT(editText()), Qt::CTRL + Qt::SHIFT + Qt::Key_E);
    viewerMenu->addSeparator();

    QList<QAction *> actList = menuBar()->actions();
    bool hasPrint = false, hasCopy = false;
    foreach(QAction *a, actList) {
        if (a->shortcut().matches(printAction->shortcut()) != QKeySequence::NoMatch)
            hasPrint = true;
        if (a->shortcut().matches(copyAction->shortcut()) != QKeySequence::NoMatch)
            hasCopy = true;
    }
    QAction *printAct = viewerMenu->addAction(printAction->icon(), printAction->text(), this, SLOT(print()));
    if (hasPrint)
        printAct->setShortcut(printAction->shortcut());
    QAction *copyAct = viewerMenu->addAction(copyAction->icon(), copyAction->text(), this, SLOT(copy()));
    if (hasCopy)
        copyAct->setShortcut(copyAction->shortcut());
    viewerMenu->addSeparator();

    configKeysAction = ac->addAction(KStandardAction::KeyBindings, this, SLOT(configureShortcuts()));
    viewerMenu->addAction(configKeysAction);
    viewerMenu->addSeparator();

    detachAction = ac->addAction("detachTab", this, SLOT(detachTab()));
    detachAction->setText(i18n("&Detach Tab"));
    //no point in detaching only one tab..
    detachAction->setEnabled(false);
    ac->setDefaultShortcut(detachAction, Qt::META + Qt::Key_D);
    viewerMenu->addAction(detachAction);

    quitAction = ac->addAction(KStandardAction::Quit, this, SLOT(close()));
    viewerMenu->addAction(quitAction);

    tabCloseAction = ac->addAction("closeTab", this, SLOT(tabCloseRequest()));
    tabCloseAction->setText(i18n("&Close Current Tab"));
    QList<QKeySequence> shortcuts = KStandardShortcut::close();
    shortcuts.append(Qt::Key_Escape);
    ac->setDefaultShortcuts(tabCloseAction, shortcuts);

    tabNextAction = ac->addAction("nextTab", this, SLOT(nextTab()));
    tabNextAction->setText(i18n("&Next Tab"));
    ac->setDefaultShortcuts(tabNextAction, KStandardShortcut::tabNext());

    tabPrevAction = ac->addAction("prevTab", this, SLOT(prevTab()));
    tabPrevAction->setText(i18n("&Previous Tab"));
    ac->setDefaultShortcuts(tabPrevAction, KStandardShortcut::tabPrev());


    tabBar.setTabsClosable(true);

    checkModified();

    KConfigGroup group(krConfig, "KrViewerWindow");
    int sx = group.readEntry("Window Width", -1);
    int sy = group.readEntry("Window Height", -1);

    if (sx != -1 && sy != -1)
        resize(sx, sy);
    else
        resize(900, 700);

    if (group.readEntry("Window Maximized",  false)) {
        setWindowState(windowState() | Qt::WindowMaximized);
    }

    // filtering out the key events
    menuBar() ->installEventFilter(this);
}
Exemple #29
0
//reset to default settings button
void PodcastSettingsDialog::slotUser1()    //slot
{
    setSettings( new PodcastSettings(m_settings->m_title) );
    checkModified();
}
Exemple #30
0
void TagDialog::init()
{

    //NOTE We allocate on the stack in Playlist
    if( parent() != Playlist::instance()->qscrollview() )
        setWFlags( getWFlags() | Qt::WDestructiveClose );

    KConfig *config = amaroK::config( "TagDialog" );

    kTabWidget->addTab( summaryTab, i18n( "Summary" ) );
    kTabWidget->addTab( tagsTab, i18n( "Tags" ) );
    kTabWidget->addTab( lyricsTab, i18n( "Lyrics" ) );
    kTabWidget->addTab( statisticsTab, i18n( "Statistics" ) );
    kTabWidget->setCurrentPage( config->readNumEntry( "CurrentTab", 0 ) );

    const QStringList artists = CollectionDB::instance()->artistList();
    kComboBox_artist->insertStringList( artists );
    kComboBox_artist->completionObject()->insertItems( artists );
    kComboBox_artist->completionObject()->setIgnoreCase( true );
    kComboBox_artist->setCompletionMode( KGlobalSettings::CompletionPopup );

    const QStringList albums = CollectionDB::instance()->albumList();
    kComboBox_album->insertStringList( albums );
    kComboBox_album->completionObject()->insertItems( albums );
    kComboBox_album->completionObject()->setIgnoreCase( true );
    kComboBox_album->setCompletionMode( KGlobalSettings::CompletionPopup );

    const QStringList composers = CollectionDB::instance()->composerList();
    kComboBox_composer->insertStringList( composers );
    kComboBox_composer->completionObject()->insertItems( composers );
    kComboBox_composer->completionObject()->setIgnoreCase( true );
    kComboBox_composer->setCompletionMode( KGlobalSettings::CompletionPopup );

    kComboBox_rating->insertStringList( MetaBundle::ratingList() );

//    const QStringList genres = MetaBundle::genreList();
    const QStringList genres = CollectionDB::instance()->genreList();
    kComboBox_genre->insertStringList( genres );
    kComboBox_genre->completionObject()->insertItems( genres );
    kComboBox_genre->completionObject()->setIgnoreCase( true );

    // looks better to have a blank label than 0, we can't do this in
    // the UI file due to bug in Designer
    kIntSpinBox_track->setSpecialValueText( " " );
    kIntSpinBox_year->setSpecialValueText( " " );
    kIntSpinBox_score->setSpecialValueText( " " );
    kIntSpinBox_discNumber->setSpecialValueText( " " );

    if( !AmarokConfig::useRatings() )
    {
        kComboBox_rating->hide();
        ratingLabel->hide();
    }
    if( !AmarokConfig::useScores() )
    {
        kIntSpinBox_score->hide();
        scoreLabel->hide();
    }

    //HACK due to deficiency in Qt that will be addressed in version 4
    // QSpinBox doesn't emit valueChanged if you edit the value with
    // the lineEdit until you change the keyboard focus
    connect( kIntSpinBox_year->child( "qt_spinbox_edit" ),  SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kIntSpinBox_track->child( "qt_spinbox_edit" ), SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kIntSpinBox_score->child( "qt_spinbox_edit" ), SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kIntSpinBox_discNumber->child( "qt_spinbox_edit" ), SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );

    // Connects for modification check
    connect( kLineEdit_title,  SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kComboBox_composer, SIGNAL(activated( int )),              SLOT(checkModified()) );
    connect( kComboBox_artist, SIGNAL(activated( int )),              SLOT(checkModified()) );
    connect( kComboBox_artist, SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kComboBox_album,  SIGNAL(activated( int )),              SLOT(checkModified()) );
    connect( kComboBox_album,  SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kComboBox_genre,  SIGNAL(activated( int )),              SLOT(checkModified()) );
    connect( kComboBox_genre,  SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kComboBox_rating, SIGNAL(activated( int )),              SLOT(checkModified()) );
    connect( kComboBox_rating, SIGNAL(textChanged( const QString& )), SLOT(checkModified()) );
    connect( kIntSpinBox_track,SIGNAL(valueChanged( int )),           SLOT(checkModified()) );
    connect( kIntSpinBox_year, SIGNAL(valueChanged( int )),           SLOT(checkModified()) );
    connect( kIntSpinBox_score,SIGNAL(valueChanged( int )),           SLOT(checkModified()) );
    connect( kTextEdit_comment,SIGNAL(textChanged()), SLOT(checkModified()) );
    connect( kTextEdit_lyrics, SIGNAL(textChanged()), SLOT(checkModified()) );

    // Remember original button text
    m_buttonMbText = pushButton_musicbrainz->text();

    connect( pushButton_cancel,   SIGNAL(clicked()), SLOT(cancelPressed()) );
    connect( pushButton_ok,       SIGNAL(clicked()), SLOT(accept()) );
    connect( pushButton_open,     SIGNAL(clicked()), SLOT(openPressed()) );
    connect( pushButton_previous, SIGNAL(clicked()), SLOT(previousTrack()) );
    connect( pushButton_next,     SIGNAL(clicked()), SLOT(nextTrack()) );
    connect( checkBox_perTrack,   SIGNAL(clicked()), SLOT(perTrack()) );

    // draw an icon onto the open-in-konqui button
    pushButton_open->setIconSet( kapp->iconLoader()->loadIconSet( "fileopen", KIcon::Small ) );

    //Update lyrics on Context Browser
    connect( this, SIGNAL(lyricsChanged( const QString& )), ContextBrowser::instance(), SLOT( lyricsChanged( const QString& ) ) );

    //Update cover
    connect( CollectionDB::instance(), SIGNAL( coverFetched( const QString&, const QString& ) ),
            this, SLOT( loadCover( const QString&, const QString& ) ) );
    connect( CollectionDB::instance(), SIGNAL( coverChanged( const QString&, const QString& ) ),
             this, SLOT( loadCover( const QString&, const QString& ) ) );



#if HAVE_TUNEPIMP
    connect( pushButton_musicbrainz, SIGNAL(clicked()), SLOT(musicbrainzQuery()) );
#else
    QToolTip::add( pushButton_musicbrainz, i18n("Please install MusicBrainz to enable this functionality") );
#endif

    connect( pushButton_guessTags, SIGNAL(clicked()), SLOT( guessFromFilename() ) );
    connect( pushButton_setFilenameSchemes, SIGNAL(clicked()), SLOT( setFileNameSchemes() ) );

    if( m_urlList.count() ) {   //editing multiple tracks
        m_perTrack = false;
        setMultipleTracksMode();
        readMultipleTracks();

        checkBox_perTrack->setChecked( m_perTrack );
        if( m_urlList.count() == 1 )
        {
            checkBox_perTrack->setEnabled( false );
            pushButton_previous->setEnabled( false );
            pushButton_next->setEnabled( false );
        }
        else
        {
            checkBox_perTrack->setEnabled( true );
            pushButton_previous->setEnabled( m_perTrack );
            pushButton_next->setEnabled( m_perTrack );
        }
    }
    else
    {
        m_perTrack = true;
        checkBox_perTrack->hide();

        if( !m_playlistItem ) {
            pushButton_previous->hide();
            pushButton_next->hide();
        }
        loadLyrics( m_bundle.url() );
        readTags();
    }


    // make it as small as possible
    resize( sizeHint().width(), minimumSize().height() );

}