Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • app
  • src
pencil2d.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17
18#ifndef PENCIL2D_H
19#define PENCIL2D_H
20
21#include <QApplication>
22#include <memory>
23#include "pencilerror.h"
24
25class MainWindow2;
26class QLockFile;
27
31#define pencil2D \
32 (static_cast<Pencil2D *>(QCoreApplication::instance()))
33
37class Pencil2D : public QApplication
38{
39 Q_OBJECT
40
41public:
48 explicit Pencil2D(int &argc, char **argv);
49 ~Pencil2D() override;
50
61 Status handleCommandLineOptions();
62
71 bool isInstanceOpen();
72
73 bool event(QEvent* event) override;
74
75signals:
82 void openFileRequested(QString filename);
83
84private:
88 void installTranslators();
94 void prepareGuiStartup(const QString &inputPath);
95
96 std::unique_ptr<MainWindow2> mainWindow;
97
98 std::unique_ptr<QLockFile> mProcessLock;
99};
100
101#endif // PENCIL2D_H
MainWindow2
Definition: mainwindow2.h:57
Pencil2D
The main application class handling startup as well as the main loop.
Definition: pencil2d.h:38
Pencil2D::isInstanceOpen
bool isInstanceOpen()
Checks if multiple instances of Pencil2D are open.
Definition: pencil2d.cpp:109
Pencil2D::openFileRequested
void openFileRequested(QString filename)
Emitted when the operating system requests that a file should be opened.
Pencil2D::prepareGuiStartup
void prepareGuiStartup(const QString &inputPath)
Readies the graphical UI for entering the main loop.
Definition: pencil2d.cpp:169
Pencil2D::installTranslators
void installTranslators()
Sets up translators for the application locale configured by the user or the system locale.
Definition: pencil2d.cpp:137
Pencil2D::handleCommandLineOptions
Status handleCommandLineOptions()
Parses supplied command line arguments and performs the appropriate actions, such as running the comm...
Definition: pencil2d.cpp:72
Status
Definition: pencilerror.h:40
QApplication
QEvent
QLockFile
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QString
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39