equal
deleted
inserted
replaced
18 |
18 |
19 #ifndef FMVIEWMANAGER_H |
19 #ifndef FMVIEWMANAGER_H |
20 #define FMVIEWMANAGER_H |
20 #define FMVIEWMANAGER_H |
21 |
21 |
22 #include <QObject> |
22 #include <QObject> |
|
23 #include <QList> |
|
24 #include "fmcommon.h" |
23 |
25 |
24 class FmMainWindow; |
26 class FmMainWindow; |
25 class HbView; |
27 class HbView; |
26 class FmViewManager; |
28 class FmViewManager; |
27 class FmOperationService; |
29 class FmOperationService; |
28 class FmOperationBase; |
30 class FmOperationBase; |
29 class QFileSystemWatcher; |
31 class QFileSystemWatcher; |
30 class FmDriveWatcher; |
32 class FmDriveWatcher; |
|
33 class HbDialog; |
|
34 |
|
35 class FmDlgCloseUnit |
|
36 { |
|
37 public: |
|
38 FmDlgCloseUnit( HbDialog *dialog ); |
|
39 ~FmDlgCloseUnit(); |
|
40 |
|
41 void addAssociatedDrives( QString drives ); |
|
42 void removeAssociatedDrives( QString drives ); |
|
43 QString associatedDrives(); |
|
44 HbDialog *dialog(); |
|
45 |
|
46 private: |
|
47 HbDialog *mDialog; |
|
48 QString mAssociatedDrives; |
|
49 }; |
31 |
50 |
32 class FmViewManager : public QObject |
51 class FmViewManager : public QObject |
33 { |
52 { |
34 Q_OBJECT |
53 Q_OBJECT |
35 |
54 |
52 void createDeleteBackupView(); |
71 void createDeleteBackupView(); |
53 |
72 |
54 void addWatchPath( const QString &path ); |
73 void addWatchPath( const QString &path ); |
55 void removeWatchPath( const QString &path ); |
74 void removeWatchPath( const QString &path ); |
56 |
75 |
|
76 // dialog close utils: |
|
77 void addDlgCloseUnit( FmDlgCloseUnit* unit ) |
|
78 { |
|
79 FmLogger::log( "FmViewManager::addDlgCloseUnit_" + unit->associatedDrives() ); |
|
80 mDlgCloseUnitList.append( unit ); |
|
81 } |
|
82 void removeDlgCloseUnit( FmDlgCloseUnit* unit ) |
|
83 { |
|
84 FmLogger::log( "FmViewManager::removeDlgCloseUnit_" + unit->associatedDrives() ); |
|
85 mDlgCloseUnitList.removeOne( unit ); |
|
86 } |
|
87 |
57 protected: |
88 protected: |
58 explicit FmViewManager( FmMainWindow* mainWindow ); |
89 explicit FmViewManager( FmMainWindow* mainWindow ); |
59 ~FmViewManager(); |
90 ~FmViewManager(); |
60 |
91 |
61 public slots: |
92 public slots: |
71 private: |
102 private: |
72 /// create view will push current view to stack |
103 /// create view will push current view to stack |
73 // HbView *createView( FmViewType viewType ); |
104 // HbView *createView( FmViewType viewType ); |
74 |
105 |
75 // void adjustSecondarySoftKey(); |
106 // void adjustSecondarySoftKey(); |
|
107 |
|
108 void checkDlgCloseUnit(); |
76 |
109 |
77 private: |
110 private: |
78 static FmViewManager *mViewManager; |
111 static FmViewManager *mViewManager; |
79 |
112 |
80 private: |
113 private: |
81 FmMainWindow *mMainWindow; |
114 FmMainWindow *mMainWindow; |
82 FmOperationService *mOperationService; |
115 FmOperationService *mOperationService; |
83 QFileSystemWatcher *mFsWatcher; |
116 QFileSystemWatcher *mFsWatcher; |
84 FmDriveWatcher *mDriveWatcher; |
117 FmDriveWatcher *mDriveWatcher; |
|
118 |
|
119 QList<FmDlgCloseUnit*> mDlgCloseUnitList; |
85 }; |
120 }; |
86 |
121 |
87 |
122 |
88 |
123 |
89 |
124 |