lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
MainApplication.h
Go to the documentation of this file.
1
/*
2
* MainApplication.h - Main QApplication handler
3
*
4
* Copyright (c) 2017-2017 Tres Finocchiaro <tres.finocchiaro/at/gmail.com>
5
*
6
* This file is part of LMMS - https://lmms.io
7
*
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public
10
* License as published by the Free Software Foundation; either
11
* version 2 of the License, or (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public
19
* License along with this program (see COPYING); if not, write to the
20
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301 USA.
22
*
23
*/
24
25
#ifndef LMMS_GUI_MAIN_APPLICATION_H
26
#define LMMS_GUI_MAIN_APPLICATION_H
27
28
#include "lmmsconfig.h"
29
30
#include <QApplication>
31
32
#ifdef LMMS_BUILD_WIN32
33
#include <windows.h>
34
#include <QAbstractNativeEventFilter>
35
#endif
36
37
38
namespace
lmms::gui
39
{
40
41
42
#if defined(LMMS_BUILD_WIN32)
43
class
MainApplication
:
public
QApplication,
public
QAbstractNativeEventFilter
44
#else
45
class
MainApplication
:
public
QApplication
46
#endif
47
{
48
public
:
49
MainApplication
(
int
& argc,
char
** argv);
50
bool
event
(QEvent*
event
)
override
;
51
#ifdef LMMS_BUILD_WIN32
52
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
53
using
FilterResult = long;
54
#else
55
using
FilterResult = qintptr;
56
#endif
// QT6 check
57
bool
win32EventFilter(MSG* msg, FilterResult* result);
58
bool
nativeEventFilter(
const
QByteArray& eventType,
void
* message, FilterResult* result);
59
#endif
// LMMS_BUILD_WIN32
60
inline
QString&
queuedFile
()
61
{
62
return
m_queuedFile
;
63
}
64
private
:
65
QString
m_queuedFile
;
66
};
67
68
69
}
// namespace lmms::gui
70
71
#endif
// LMMS_GUI_MAIN_APPLICATION_H
lmms::gui::MainApplication
Definition
MainApplication.h:47
lmms::gui::MainApplication::m_queuedFile
QString m_queuedFile
Definition
MainApplication.h:65
lmms::gui::MainApplication::queuedFile
QString & queuedFile()
Definition
MainApplication.h:60
lmms::gui::MainApplication::MainApplication
MainApplication(int &argc, char **argv)
Definition
MainApplication.cpp:38
lmms::gui::MainApplication::event
bool event(QEvent *event) override
Definition
MainApplication.cpp:60
lmms::gui
Definition
AudioPortAudio.cpp:209
Generated on
for lmms by
1.18.0