- forgot to add the playlist file dialog

- small updates


git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@688 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
w1z7ard
2007-11-10 03:52:35 +00:00
parent cdea9fdb2d
commit cdf22df8a9
4 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,43 @@
/***************************************************************************
* Copyright (C) 2007 by carm *
* carm@localhost *
* *
* 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. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QPLAYLIST_FILEDIALOG_H
#define QPLAYLIST_FILEDIALOG_H
#include <QFileDialog>
class QPlaylistFileDialog : public QFileDialog
{
Q_OBJECT // must include this if you use Qt signals/slots
public:
QPlaylistFileDialog(QWidget * parent = 0):
QFileDialog(parent, "Open a new preset playlist", QString(), "Preset Playlists (*.ppl)" ) {
this->setFileMode(QFileDialog::ExistingFile);
}
~QPlaylistFileDialog() { }
private:
};
#endif

View File

@ -215,6 +215,7 @@ void QPlaylistModel::clearItems()
endRemoveRows();
}
bool QPlaylistModel::writePlaylist ( const QString & file ) {
QFile qfile(file);

View File

@ -71,9 +71,10 @@ inline void setPlaylistDesc(const QString & desc) {
}
void clearItems();
public slots:
void updateItemHighlights();
public slots:
void updateItemHighlights();
private:
void readPlaylistItem(QXmlStreamReader & reader);

View File

@ -251,6 +251,13 @@ void QProjectM_MainWindow::keyReleaseEvent ( QKeyEvent * e )
this->setWindowState ( this->windowState() ^ Qt::WindowFullScreen );
return;
case Qt::Key_Delete:
// const QModelIndexList & list = ui->tableView->selectedIndexes();
// for (QModelIndexList::iterator pos = list.begin(); pos != list.end(); ++pos) {
// QModelIndex index = *pos;
// playlistModel->removeRow(index.row());
// }
return;
case Qt::Key_M:
if ( ui->presetSearchBarLineEdit->hasFocus() )
return;