21 #ifndef PCMANFM_APPLICATION_H
22 #define PCMANFM_APPLICATION_H
24 #include <QApplication>
27 #include "editbookmarksdialog.h"
28 #include <QAbstractNativeEventFilter>
31 #include <QProxyStyle>
32 #include <QTranslator>
41 class PreferencesDialog;
42 class DesktopPreferencesDialog;
49 virtual int styleHint(StyleHint hint,
const QStyleOption * option = 0,
const QWidget * widget = 0, QStyleHintReturn * returnData = 0)
const;
52 class Application :
public QApplication,
public QAbstractNativeEventFilter {
54 Q_PROPERTY(
bool desktopManagerEnabled READ desktopManagerEnabled)
72 void launchFiles(QStringList paths,
bool inNewWindow);
73 void setWallpaper(QString path, QString modeString);
74 void preferences(QString page);
75 void desktopPrefrences(QString page);
77 void desktopManager(
bool enabled);
78 void findFiles(QStringList paths);
80 bool desktopManagerEnabled() {
81 return enableDesktopManager_;
84 void updateFromSettings();
85 void updateDesktopsFromSettings();
87 void openFolderInTerminal(FmPath* path);
88 void openFolders(FmFileInfoList* files);
90 QString profileName() {
94 virtual bool nativeEventFilter(
const QByteArray & eventType,
void * message,
long * result);
99 void onLastWindowClosed();
100 void onSaveStateRequest(QSessionManager & manager);
101 void onScreenResized(
int num);
102 void onScreenCountChanged(
int newCount);
103 void initVolumeManager();
105 void onVirtualGeometryChanged(
const QRect& rect);
106 void onScreenDestroyed(QObject* screenObj);
107 void onScreenAdded(QScreen* newScreen);
108 void reloadDesktopsAsNeeded();
111 virtual bool eventFilter(QObject* watched, QEvent* event);
112 bool parseCommandLineArgs();
114 bool autoMountVolume(GVolume* volume,
bool interactive =
true);
116 static void onVolumeAdded(GVolumeMonitor* monitor, GVolume* volume,
Application* pThis);
119 bool isPrimaryInstance;
122 QString profileName_;
124 bool enableDesktopManager_;
125 QVector<DesktopWindow*> desktopWindows_;
126 QPointer<PreferencesDialog> preferencesDialog_;
127 QPointer<DesktopPreferencesDialog> desktopPreferencesDialog_;
128 QPointer<Fm::EditBookmarksDialog> editBookmarksialog_;
129 QTranslator translator;
130 QTranslator qtTranslator;
131 GVolumeMonitor* volumeMonitor_;
138 #endif // PCMANFM_APPLICATION_H
Definition: application.h:52
Definition: settings.h:33
Definition: application.h:38
Definition: application.h:44
Definition: desktopwindow.h:42