1*ba1adacfSNicolas Bonnefon /* 2*ba1adacfSNicolas Bonnefon * Copyright (C) 2017 Nicolas Bonnefon and other contributors 3*ba1adacfSNicolas Bonnefon * 4*ba1adacfSNicolas Bonnefon * This file is part of glogg. 5*ba1adacfSNicolas Bonnefon * 6*ba1adacfSNicolas Bonnefon * glogg is free software: you can redistribute it and/or modify 7*ba1adacfSNicolas Bonnefon * it under the terms of the GNU General Public License as published by 8*ba1adacfSNicolas Bonnefon * the Free Software Foundation, either version 3 of the License, or 9*ba1adacfSNicolas Bonnefon * (at your option) any later version. 10*ba1adacfSNicolas Bonnefon * 11*ba1adacfSNicolas Bonnefon * glogg is distributed in the hope that it will be useful, 12*ba1adacfSNicolas Bonnefon * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*ba1adacfSNicolas Bonnefon * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*ba1adacfSNicolas Bonnefon * GNU General Public License for more details. 15*ba1adacfSNicolas Bonnefon * 16*ba1adacfSNicolas Bonnefon * You should have received a copy of the GNU General Public License 17*ba1adacfSNicolas Bonnefon * along with glogg. If not, see <http://www.gnu.org/licenses/>. 18*ba1adacfSNicolas Bonnefon */ 19*ba1adacfSNicolas Bonnefon 20*ba1adacfSNicolas Bonnefon #ifndef GLOGGAPP_H 21*ba1adacfSNicolas Bonnefon #define GLOGGAPP_H 22*ba1adacfSNicolas Bonnefon 23*ba1adacfSNicolas Bonnefon #include <QApplication> 24*ba1adacfSNicolas Bonnefon 25*ba1adacfSNicolas Bonnefon // Subclass QApplication to add a custom event handler 26*ba1adacfSNicolas Bonnefon class GloggApp : public QApplication 27*ba1adacfSNicolas Bonnefon { 28*ba1adacfSNicolas Bonnefon Q_OBJECT 29*ba1adacfSNicolas Bonnefon public: GloggApp(int & argc,char ** argv)30*ba1adacfSNicolas Bonnefon GloggApp( int &argc, char **argv ) : QApplication( argc, argv ) 31*ba1adacfSNicolas Bonnefon {} 32*ba1adacfSNicolas Bonnefon 33*ba1adacfSNicolas Bonnefon signals: 34*ba1adacfSNicolas Bonnefon void loadFile( const QString& file_name ); 35*ba1adacfSNicolas Bonnefon 36*ba1adacfSNicolas Bonnefon protected: 37*ba1adacfSNicolas Bonnefon #ifdef __APPLE__ 38*ba1adacfSNicolas Bonnefon virtual bool event( QEvent* event ); 39*ba1adacfSNicolas Bonnefon #endif 40*ba1adacfSNicolas Bonnefon }; 41*ba1adacfSNicolas Bonnefon 42*ba1adacfSNicolas Bonnefon #endif 43