Pimp my filedialog.
This commit is contained in:
parent
0fe79ab827
commit
67bf4215bf
3 changed files with 16 additions and 6 deletions
|
@ -145,8 +145,8 @@ main (int argc, char **argv)
|
||||||
#ifdef Q_OS_MACX
|
#ifdef Q_OS_MACX
|
||||||
/** This is soooo wrong, there must exsist a flag for
|
/** This is soooo wrong, there must exsist a flag for
|
||||||
* static plugins
|
* static plugins
|
||||||
*/
|
|
||||||
Q_IMPORT_PLUGIN(QJpegPlugin);
|
Q_IMPORT_PLUGIN(QJpegPlugin);
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MainWindow *mw = new MainWindow (NULL);
|
MainWindow *mw = new MainWindow (NULL);
|
||||||
|
|
13
Playlist.cpp
13
Playlist.cpp
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "PlaylistShade.h"
|
#include "PlaylistShade.h"
|
||||||
#include "PlaylistMenu.h"
|
#include "PlaylistMenu.h"
|
||||||
|
#include "FileDialog.h"
|
||||||
|
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
|
@ -344,20 +345,26 @@ PlaylistWidget::diveDir (const QString &dir)
|
||||||
void
|
void
|
||||||
PlaylistWidget::menuAddDir ()
|
PlaylistWidget::menuAddDir ()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
QString dir;
|
QString dir;
|
||||||
dir = QFileDialog::getExistingDirectory (this, "Select files to play",
|
dir = QFileDialog::getExistingDirectory (this, "Select files to play",
|
||||||
QDir::homePath ());
|
QDir::homePath ());
|
||||||
|
|
||||||
diveDir (dir);
|
diveDir (dir);
|
||||||
|
*/
|
||||||
|
|
||||||
|
FileDialog fd (this, "playlist_add_dir");
|
||||||
|
QString dir = fd.getDirectory ();
|
||||||
|
if (!dir.isNull ())
|
||||||
|
diveDir (dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PlaylistWidget::menuAddFile ()
|
PlaylistWidget::menuAddFile ()
|
||||||
{
|
{
|
||||||
QStringList files;
|
QStringList files;
|
||||||
|
FileDialog fd (this, "playlist_add_files");
|
||||||
|
|
||||||
files = QFileDialog::getOpenFileNames (this, "Select files to play",
|
files = fd.getFiles ();
|
||||||
QDir::homePath());
|
|
||||||
|
|
||||||
for (int i = 0; i < files.count(); i++) {
|
for (int i = 0; i < files.count(); i++) {
|
||||||
XMMSHandler::getInstance ().playlistAddURL ("file://" + files.value(i));
|
XMMSHandler::getInstance ().playlistAddURL ("file://" + files.value(i));
|
||||||
|
|
|
@ -8,7 +8,7 @@ SOURCES += XmmsQT4.cpp \
|
||||||
Button.cpp \
|
Button.cpp \
|
||||||
TextBar.cpp \
|
TextBar.cpp \
|
||||||
NumberDisplay.cpp \
|
NumberDisplay.cpp \
|
||||||
TimeDisplay.cpp \
|
TimeDisplay.cpp \
|
||||||
XMMSHandler.cpp \
|
XMMSHandler.cpp \
|
||||||
SmallNumberDisplay.cpp \
|
SmallNumberDisplay.cpp \
|
||||||
StereoMono.cpp \
|
StereoMono.cpp \
|
||||||
|
@ -25,6 +25,7 @@ SOURCES += XmmsQT4.cpp \
|
||||||
VolumeSlider.cpp \
|
VolumeSlider.cpp \
|
||||||
ClutterBar.cpp \
|
ClutterBar.cpp \
|
||||||
Equalizer.cpp \
|
Equalizer.cpp \
|
||||||
|
FileDialog.cpp
|
||||||
|
|
||||||
|
|
||||||
HEADERS += XmmsQT4.h \
|
HEADERS += XmmsQT4.h \
|
||||||
|
@ -54,14 +55,16 @@ HEADERS += XmmsQT4.h \
|
||||||
VolumeSlider.h \
|
VolumeSlider.h \
|
||||||
ClutterBar.h \
|
ClutterBar.h \
|
||||||
Equalizer.h \
|
Equalizer.h \
|
||||||
|
FileDialog.h
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RESOURCES = promoe.qrc
|
RESOURCES = promoe.qrc
|
||||||
macx:RC_FILE = promoe.icns
|
macx:RC_FILE = promoe.icns
|
||||||
|
macx:INCLUDEPATH = /sw/include
|
||||||
|
|
||||||
QT += network
|
QT += network
|
||||||
macx:QTPLUGIN += qjpeg
|
;macx:QTPLUGIN += qjpeg
|
||||||
QMAKE_LFLAGS += -L$$[QT_INSTALL_PLUGINS]/imageformats
|
QMAKE_LFLAGS += -L$$[QT_INSTALL_PLUGINS]/imageformats
|
||||||
|
|
||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue