Commit fb0fa2af authored by Scott Wheeler's avatar Scott Wheeler

This has been sitting around doing a whole lot of nothing for a while; if

I ever decide to use it CVS history is still there.

svn path=/trunk/kdemultimedia/juk/; revision=262469
parent 2e908a92
bin_PROGRAMS = juk
check_PROGRAMS = tagguessertest mbtest
juk_SOURCES = directorylistbase.ui genrelisteditorbase.ui \
juk_SOURCES = directorylistbase.ui \
gstreamerplayer.cpp artsplayer.cpp directorylist.cpp stringhash.cpp \
sortedstringlist.cpp systemtray.cpp genrelisteditor.cpp splashscreen.cpp \
sortedstringlist.cpp systemtray.cpp splashscreen.cpp \
statuslabel.cpp cachedtag.cpp oggtag.cpp id3tag.cpp collectionlist.cpp \
playlistitem.cpp playlist.cpp playlistsplitter.cpp \
playlistbox.cpp tageditor.cpp cache.cpp genrelistreader.cpp \
......
/***************************************************************************
genrelisteditor.cpp - description
-------------------
begin : Sun Dec 8 2002
copyright : (C) 2002 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <kcombobox.h>
#include <klistview.h>
#include <klineedit.h>
#include <kdebug.h>
#include "genrelisteditor.h"
#include "genrelistlist.h"
////////////////////////////////////////////////////////////////////////////////
// public methods
////////////////////////////////////////////////////////////////////////////////
GenreListEditor::GenreListEditor(QWidget *parent, const char *name ) : GenreListEditorBase(parent, name, true)
{
loadID3v1Genres();
loadLists();
}
GenreListEditor::~GenreListEditor()
{
}
////////////////////////////////////////////////////////////////////////////////
// private methods
////////////////////////////////////////////////////////////////////////////////
void GenreListEditor::loadID3v1Genres()
{
GenreList ID3v1List = GenreListList::ID3v1List();
for(GenreList::Iterator it = ID3v1List.begin(); it != ID3v1List.end(); it++)
ID3v1Box->insertItem((*it).name());
}
void GenreListEditor::loadLists()
{
GenreListList lists = GenreListList::lists();
for(GenreListList::Iterator it = lists.begin(); it != lists.end(); it++) {
m_listDict.insert((*it).name(), &(*it));
selectListBox->insertItem((*it).name());
}
updateGenreList();
}
void GenreListEditor::updateGenreList()
{
GenreList *currentList = m_listDict[selectListBox->currentText()];
if(currentList) {
genreList->clear();
for(GenreList::Iterator it = currentList->begin(); it != currentList->end(); it++)
new KListViewItem(genreList, (*it).name(), currentList->ID3v1Name((*it).ID3v1()));
}
}
////////////////////////////////////////////////////////////////////////////////
// private slots
////////////////////////////////////////////////////////////////////////////////
void GenreListEditor::slotUpdateGenreBoxes(QListViewItem *item)
{
if(item) {
genreNameBox->setText(item->text(0));
ID3v1Box->setCurrentItem(GenreListList::ID3v1List().findIndex(item->text(1)));
}
}
void GenreListEditor::slotUpdateGenreName(const QString &name)
{
QListViewItem *current = genreList->currentItem();
if(!name.isEmpty() && current)
current->setText(0, name);
}
#include "genrelisteditor.moc"
/***************************************************************************
genrelisteditor.h - description
-------------------
begin : Sun Dec 8 2002
copyright : (C) 2002 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef GENRELISTEDITOR_H
#define GENRELISTEDITOR_H
#include <qdict.h>
#include "genrelisteditorbase.h"
class GenreList;
class GenreListEditor : public GenreListEditorBase
{
Q_OBJECT
public:
GenreListEditor(QWidget *parent = 0, const char *name = 0);
virtual ~GenreListEditor();
private:
void loadID3v1Genres();
void loadLists();
void updateGenreList();
private slots:
virtual void slotUpdateGenreBoxes(QListViewItem *item);
virtual void slotUpdateGenreName(const QString &name);
private:
QDict<GenreList> m_listDict;
};
#endif
This diff is collapsed.
......@@ -29,7 +29,6 @@
#include "slideraction.h"
#include "statuslabel.h"
#include "splashscreen.h"
#include "genrelisteditor.h"
#include "systemtray.h"
#include "keydialog.h"
#include "tagguesserconfigdlg.h"
......@@ -440,9 +439,6 @@ void JuK::setupActions()
this, SLOT(slotToggleSystemTray(bool)));
new KAction(i18n("Genre List Editor..."), 0, this, SLOT(slotShowGenreListEditor()),
actionCollection(), "showGenreListEditor");
m_outputSelectAction = Player::playerSelectAction(actionCollection());
if(m_outputSelectAction) {
......@@ -833,12 +829,6 @@ void JuK::slotPlaylistChanged()
// settings menu
////////////////////////////////////////////////////////////////////////////////
void JuK::slotShowGenreListEditor()
{
GenreListEditor * editor = new GenreListEditor();
editor->exec();
}
void JuK::slotToggleSystemTray(bool enabled)
{
if(enabled && !m_systemTray)
......
......@@ -148,7 +148,6 @@ private slots:
void slotQuit() { m_shuttingDown = true; kapp->quit(); }
// settings menu
void slotShowGenreListEditor();
void slotToggleSystemTray(bool enabled);
void slotSetOutput(int output);
void slotEditKeys();
......
......@@ -55,7 +55,6 @@
<Action name="renameFile"/>
</Menu>
<Menu name="settings"><text>&amp;Settings</text>
<!-- <Action name="showGenreListEditor"/> -->
<Action name="showSplashScreen" append="show_merge"/>
<Action name="toggleSystemTray" append="show_merge"/>
<Action name="dockOnClose" append="show_merge"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment