2021-03-16 00:02:20 -07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2021 CutefishOS Team.
|
|
|
|
*
|
2021-03-29 01:51:34 -07:00
|
|
|
* Author: revenmartin <revenmartin@gmail.com>
|
2021-03-16 00:02:20 -07:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2021-09-26 04:23:54 -07:00
|
|
|
#include "application.h"
|
2021-03-29 01:51:34 -07:00
|
|
|
#include "model/placesmodel.h"
|
|
|
|
#include "model/foldermodel.h"
|
|
|
|
#include "model/pathbarmodel.h"
|
2021-04-05 00:21:39 -07:00
|
|
|
#include "model/positioner.h"
|
2021-03-29 01:51:34 -07:00
|
|
|
#include "widgets/rubberband.h"
|
|
|
|
#include "widgets/itemviewadapter.h"
|
2021-09-05 14:39:56 -07:00
|
|
|
#include "desktop/desktop.h"
|
2021-03-16 00:02:20 -07:00
|
|
|
#include "desktop/desktopsettings.h"
|
|
|
|
#include "desktop/desktopview.h"
|
2021-04-21 19:24:10 -07:00
|
|
|
#include "helper/datehelper.h"
|
2021-05-21 00:55:58 -07:00
|
|
|
#include "helper/fm.h"
|
2021-06-15 21:43:43 -07:00
|
|
|
#include "helper/shortcut.h"
|
2021-03-16 00:02:20 -07:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-10-31 13:28:32 -07:00
|
|
|
//QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
2021-08-16 18:53:52 -07:00
|
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
2021-03-16 00:02:20 -07:00
|
|
|
|
2021-03-29 01:51:34 -07:00
|
|
|
// Register QML Type.
|
|
|
|
const char *uri = "Cutefish.FileManager";
|
|
|
|
qmlRegisterType<PlacesModel>(uri, 1, 0, "PlacesModel");
|
|
|
|
qmlRegisterType<FolderModel>(uri, 1, 0, "FolderModel");
|
|
|
|
qmlRegisterType<PathBarModel>(uri, 1, 0, "PathBarModel");
|
2021-04-05 00:21:39 -07:00
|
|
|
qmlRegisterType<Positioner>(uri, 1, 0, "Positioner");
|
2021-03-29 01:51:34 -07:00
|
|
|
qmlRegisterType<RubberBand>(uri, 1, 0, "RubberBand");
|
|
|
|
qmlRegisterType<ItemViewAdapter>(uri, 1, 0, "ItemViewAdapter");
|
|
|
|
qmlRegisterType<DesktopSettings>(uri, 1, 0, "DesktopSettings");
|
2021-05-21 00:55:58 -07:00
|
|
|
qmlRegisterType<Fm>(uri, 1, 0, "Fm");
|
2021-06-15 21:43:43 -07:00
|
|
|
qmlRegisterType<ShortCut>(uri, 1, 0, "ShortCut");
|
2021-08-30 08:23:32 -07:00
|
|
|
|
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
|
|
|
qmlRegisterType<QAction>();
|
|
|
|
#else
|
2021-07-27 12:43:41 -07:00
|
|
|
qmlRegisterAnonymousType<QAction>(uri, 1);
|
2021-08-30 08:23:32 -07:00
|
|
|
#endif
|
2021-03-29 01:51:34 -07:00
|
|
|
|
2021-09-26 04:23:54 -07:00
|
|
|
Application app(argc, argv);
|
|
|
|
return app.run();
|
2021-03-16 00:02:20 -07:00
|
|
|
}
|