QTfrontend/ui/widget/about.cpp
author dag10 <gottlieb.drew@gmail.com>
Wed, 16 Jan 2013 18:34:43 -0500
changeset 8393 85bd6c7b2641
parent 8391 9f2527848ffd
child 8404 f06227b2ea14
permissions -rw-r--r--
Can now change theme for static and mission maps. Fixed mission map descriptions that had commas which broke them. Now, you must escape commas in map descriptions. Made bgwidget repaint on animation tick to avoid buffer-not-clearing issue with widgets that change overtop the background leaving a ghost image of the widget's previous state. Generated map is now the default map in the mapconfig widget.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 1052
diff changeset
     2
 * Hedgewars, a free turn based strategy game
6952
7f70f37bbf08 license header year range adjustments
sheepluva
parents: 6700
diff changeset
     3
 * Copyright (c) 2004-2012 Andrey Korotaev <unC0Rr@gmail.com>
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     4
 *
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     8
 *
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    12
 * GNU General Public License for more details.
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    13
 *
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    17
 */
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    18
221
0f451dae4251 Hedgehog on About page
unc0rr
parents: 187
diff changeset
    19
#include <QGridLayout>
235
28903e620258 About page
unc0rr
parents: 221
diff changeset
    20
#include <QLabel>
6175
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
    21
#include <QList>
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
    22
#include <QUrl>
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
    23
#include <QRegExp>
8256
19dbb3209f46 GCI2012: Refactor Authors Page
koda
parents: 7930
diff changeset
    24
#include <QNetworkAccessManager>
19dbb3209f46 GCI2012: Refactor Authors Page
koda
parents: 7930
diff changeset
    25
#include <QNetworkRequest>
8390
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    26
#include <QMessageBox>
8256
19dbb3209f46 GCI2012: Refactor Authors Page
koda
parents: 7930
diff changeset
    27
#include <QNetworkReply>
19dbb3209f46 GCI2012: Refactor Authors Page
koda
parents: 7930
diff changeset
    28
#include <QDebug>
6175
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
    29
#include "hwconsts.h"
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
    30
#include "SDLInteraction.h"
8390
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    31
#include "SDL.h"
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    32
#include "SDL_version.h"
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    33
#include "physfs.h"
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    34
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    35
#ifdef VIDEOREC
8391
9f2527848ffd Fixes build.
dag10 <gottlieb.drew@gmail.com>
parents: 8390
diff changeset
    36
extern "C"
9f2527848ffd Fixes build.
dag10 <gottlieb.drew@gmail.com>
parents: 8390
diff changeset
    37
{
9f2527848ffd Fixes build.
dag10 <gottlieb.drew@gmail.com>
parents: 8390
diff changeset
    38
#include "libavutil/avutil.h"
9f2527848ffd Fixes build.
dag10 <gottlieb.drew@gmail.com>
parents: 8390
diff changeset
    39
}
8390
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    40
#endif
6175
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
    41
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    42
#include "about.h"
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    43
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    44
About::About(QWidget * parent) :
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    45
    QWidget(parent)
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
    46
{
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
    47
    QGridLayout *mainLayout = new QGridLayout(this);
2525
e6cdc0251cd1 remove the svg dependency
koda
parents: 2460
diff changeset
    48
5646
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    49
    QLabel *imageLabel = new QLabel;
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    50
    QImage image(":/res/Hedgehog.png");
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    51
    imageLabel->setPixmap(QPixmap::fromImage(image));
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    52
    imageLabel->setScaledContents(true);
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    53
    imageLabel->setMinimumWidth(2.8);
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    54
    imageLabel->setMaximumWidth(280);
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    55
    imageLabel->setMinimumHeight(30);
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    56
    imageLabel->setMaximumHeight(300);
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    57
1d44c448cfa4 enable a tip on osx, remove trailing whitespaces
koda
parents: 5626
diff changeset
    58
    mainLayout->addWidget(imageLabel, 0, 0, 2, 1);
235
28903e620258 About page
unc0rr
parents: 221
diff changeset
    59
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
    60
    QLabel *lbl1 = new QLabel(this);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
    61
    lbl1->setOpenExternalLinks(true);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
    62
    lbl1->setText(
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    63
        "<style type=\"text/css\">"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    64
        "a { color: #ffcc00; }"
1897
e9dcb47013c7 - Some style changes by nemo
unc0rr
parents: 1796
diff changeset
    65
//            "a:hover { color: yellow; }"
6616
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    66
        "</style>"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    67
        "<div align=\"center\"><h1>Hedgewars</h1>"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    68
        "<h3>" + QLabel::tr("Version") + " " + *cVersionString + "</h3>"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    69
        "<p><a href=\"http://www.hedgewars.org/\">http://www.hedgewars.org/</a></p><br>" +
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    70
        QLabel::tr("This program is distributed under the GNU General Public License v2") +
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    71
        "</div>"
f77bb02b669f astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents: 6175
diff changeset
    72
    );
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
    73
    lbl1->setWordWrap(true);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
    74
    mainLayout->addWidget(lbl1, 0, 1);
235
28903e620258 About page
unc0rr
parents: 221
diff changeset
    75
8390
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    76
    QString html;
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    77
    QFile file(":/res/html/about.html");
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    78
    if(!file.open(QIODevice::ReadOnly))
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    79
        QMessageBox::information(0, "Error loading about page", file.errorString());
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    80
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    81
    QTextStream in(&file);
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    82
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    83
    while(!in.atEnd())
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    84
        html.append(in.readLine());
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    85
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    86
    file.close();
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    87
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    88
    /* Get information */
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    89
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    90
    QString compilerText, compilerOpen, compilerClose;
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    91
    #ifdef __GNUC__
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    92
        compilerText = "GCC " + QString(__VERSION__) + "\n";
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    93
        compilerOpen = "<a href=\"http://gcc.gnu.org\">";
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    94
        compilerClose = "</a>";
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    95
    #else
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    96
        compilerText = "Unknown\n";
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    97
        compilerOpen = compilerClose = "";
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    98
    #endif
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
    99
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   100
    /* Add information */
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   101
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   102
    html.replace("%COMPILER_A_OPEN%", compilerOpen);
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   103
    html.replace("%COMPILER_A_CLOSE%", compilerClose);
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   104
    html.replace("%COMPILER%", compilerText);
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   105
    html.replace("%SDL%", QString("version: %1.%2.%3")
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   106
        .arg(SDL_MAJOR_VERSION)
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   107
        .arg(SDL_MINOR_VERSION)
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   108
        .arg(SDL_PATCHLEVEL));
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   109
    html.replace("%QT%", QT_VERSION_STR);
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   110
#ifdef VIDEOREC
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   111
    html.replace("%LIBAV%", QString("<a href=\"http://libav.org\">Libav</a> version: %1.%2.%3")
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   112
        .arg(LIBAVUTIL_VERSION_MAJOR)
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   113
        .arg(LIBAVUTIL_VERSION_MINOR)
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   114
        .arg(LIBAVUTIL_VERSION_MICRO));
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   115
#endif
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   116
    html.replace("%PHYSFS%", QString("version: %1.%2.%3")
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   117
        .arg(PHYSFS_VER_MAJOR)
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   118
        .arg(PHYSFS_VER_MINOR)
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   119
        .arg(PHYSFS_VER_PATCH));
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   120
6175
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   121
    lbl2 = new QTextBrowser(this);
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
   122
    lbl2->setOpenExternalLinks(true);
8390
0b2403003640 Added "what we use" section to "about" page. From GCI.
dag10 <gottlieb.drew@gmail.com>
parents: 8256
diff changeset
   123
    lbl2->setHtml(html);
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2751
diff changeset
   124
    mainLayout->addWidget(lbl2, 1, 1);
8256
19dbb3209f46 GCI2012: Refactor Authors Page
koda
parents: 7930
diff changeset
   125
    
6175
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   126
    setAcceptDrops(true);
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents:
diff changeset
   127
}
6175
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   128
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   129
void About::dragEnterEvent(QDragEnterEvent * event)
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   130
{
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   131
    if (event->mimeData()->hasUrls())
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   132
    {
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   133
        QList<QUrl> urls = event->mimeData()->urls();
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   134
        QString url = urls[0].toString();
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   135
        if (urls.count() == 1)
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   136
            if (url.contains(QRegExp("^file://.*\\.ogg$")))
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   137
                event->acceptProposedAction();
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   138
    }
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   139
}
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   140
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   141
void About::dropEvent(QDropEvent * event)
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   142
{
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   143
    QString file =
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   144
        event->mimeData()->urls()[0].toString().remove(QRegExp("^file://"));
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   145
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   146
    SDLInteraction::instance().setMusicTrack(file);
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   147
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   148
    event->acceptProposedAction();
a80833ddaef0 moving a file around, fixing a png, etc.
sheepluva
parents: 6067
diff changeset
   149
}