Pimp my filedialog.

This commit is contained in:
Tobias Rundstrom 2006-08-17 16:25:05 -04:00
parent 0fe79ab827
commit 67bf4215bf
3 changed files with 16 additions and 6 deletions

View file

@ -145,8 +145,8 @@ main (int argc, char **argv)
#ifdef Q_OS_MACX
/** This is soooo wrong, there must exsist a flag for
* static plugins
*/
Q_IMPORT_PLUGIN(QJpegPlugin);
*/
#endif
MainWindow *mw = new MainWindow (NULL);

View file

@ -4,6 +4,7 @@
#include "PlaylistShade.h"
#include "PlaylistMenu.h"
#include "FileDialog.h"
#include <QMouseEvent>
#include <QPaintEvent>
@ -344,20 +345,26 @@ PlaylistWidget::diveDir (const QString &dir)
void
PlaylistWidget::menuAddDir ()
{
/*
QString dir;
dir = QFileDialog::getExistingDirectory (this, "Select files to play",
QDir::homePath ());
diveDir (dir);
*/
FileDialog fd (this, "playlist_add_dir");
QString dir = fd.getDirectory ();
if (!dir.isNull ())
diveDir (dir);
}
void
PlaylistWidget::menuAddFile ()
{
QStringList files;
FileDialog fd (this, "playlist_add_files");
files = QFileDialog::getOpenFileNames (this, "Select files to play",
QDir::homePath());
files = fd.getFiles ();
for (int i = 0; i < files.count(); i++) {
XMMSHandler::getInstance ().playlistAddURL ("file://" + files.value(i));

View file

@ -8,7 +8,7 @@ SOURCES += XmmsQT4.cpp \
Button.cpp \
TextBar.cpp \
NumberDisplay.cpp \
TimeDisplay.cpp \
TimeDisplay.cpp \
XMMSHandler.cpp \
SmallNumberDisplay.cpp \
StereoMono.cpp \
@ -25,6 +25,7 @@ SOURCES += XmmsQT4.cpp \
VolumeSlider.cpp \
ClutterBar.cpp \
Equalizer.cpp \
FileDialog.cpp
HEADERS += XmmsQT4.h \
@ -54,14 +55,16 @@ HEADERS += XmmsQT4.h \
VolumeSlider.h \
ClutterBar.h \
Equalizer.h \
FileDialog.h
RESOURCES = promoe.qrc
macx:RC_FILE = promoe.icns
macx:INCLUDEPATH = /sw/include
QT += network
macx:QTPLUGIN += qjpeg
;macx:QTPLUGIN += qjpeg
QMAKE_LFLAGS += -L$$[QT_INSTALL_PLUGINS]/imageformats
CONFIG += link_pkgconfig