2 * Copyright (C) 2010-2011 Toni Gundogdu.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef nomnom_mainwindow_h
19 #define nomnom_mainwindow_h
21 #include <QSystemTrayIcon>
29 #include "DownloadDiag.h"
30 #include "ProcProgDiag.h"
32 #include "ui_MainWindow.h"
34 class MainWindow
: public QMainWindow
, private Ui::MainWindow
40 void showEvent (QShowEvent
*);
41 void hideEvent (QHideEvent
*);
42 void closeEvent (QCloseEvent
*);
43 void dragEnterEvent (QDragEnterEvent
*);
44 void dropEvent (QDropEvent
*);
46 void createContextMenu ();
49 void handleURL (const QString
&);
50 bool parseOK (QString
&);
52 void downloadMedia ();
53 void changeProgramIcon ();
54 bool queryFormats (QStringList
&,
58 bool selectFormat (QStringList
&, QString
&);
61 void onTrayActivated(QSystemTrayIcon::ActivationReason
);
62 void onPreferences ();
68 void onProcFinished (QString
);
70 QPointer
<ProcessProgressDialog
> proc
;
71 QPointer
<QSystemTrayIcon
> trayIcon
;
72 QPointer
<DownloadDialog
> download
;
73 QHash
<QString
,QAction
*> actions
;
74 QPointer
<QMenu
> trayMenu
;
75 QPointer
<Media
> media
;
81 // vim: set ts=2 sw=2 tw=72 expandtab: