mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-13 00:25:28 +00:00
- 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:
43
src/qprojectM/src/QPlaylistFileDialog.hpp
Normal file
43
src/qprojectM/src/QPlaylistFileDialog.hpp
Normal 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
|
||||
@ -215,6 +215,7 @@ void QPlaylistModel::clearItems()
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
|
||||
bool QPlaylistModel::writePlaylist ( const QString & file ) {
|
||||
|
||||
QFile qfile(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);
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user