76class MainWindow :
public QMainWindow {
79 MainWindow(Fm::FilePath path = Fm::FilePath());
80 virtual ~MainWindow();
82 void chdir(Fm::FilePath path,
ViewFrame* viewFrame);
83 void chdir(Fm::FilePath path) {
84 chdir(path, activeViewFrame_);
87 void addTab(Fm::FilePath path,
ViewFrame* viewFrame);
88 void addTab(Fm::FilePath path);
91 return reinterpret_cast<TabPage*
>(viewFrame->getStackedWidget()->currentWidget());
94 return currentPage(activeViewFrame_);
97 void updateFromSettings(
Settings& settings);
99 static MainWindow* lastActive() {
103 void openFolderAndSelectFiles(
const Fm::FilePathList& files,
bool inNewTab =
true);
107 void onPathEntryReturnPressed();
108 void onPathBarChdir(
const Fm::FilePath& dirPath);
109 void onPathBarMiddleClickChdir(
const Fm::FilePath &dirPath);
111 void on_actionNewTab_triggered();
112 void on_actionNewWin_triggered();
113 void on_actionNewFolder_triggered();
114 void on_actionNewBlankFile_triggered();
115 void on_actionCloseTab_triggered();
116 void on_actionCloseWindow_triggered();
117 void on_actionFileProperties_triggered();
118 void on_actionFolderProperties_triggered();
120 void on_actionCut_triggered();
121 void on_actionCopy_triggered();
122 void on_actionPaste_triggered();
123 void on_actionDelete_triggered();
124 void on_actionRename_triggered();
125 void on_actionBulkRename_triggered();
126 void on_actionSelectAll_triggered();
127 void on_actionDeselectAll_triggered();
128 void on_actionInvertSelection_triggered();
129 void on_actionPreferences_triggered();
131 void on_actionGoBack_triggered();
132 void on_actionGoForward_triggered();
133 void on_actionGoUp_triggered();
134 void on_actionHome_triggered();
135 void on_actionReload_triggered();
136 void on_actionConnectToServer_triggered();
138 void on_actionIconView_triggered();
139 void on_actionCompactView_triggered();
140 void on_actionDetailedList_triggered();
141 void on_actionThumbnailView_triggered();
143 void on_actionGo_triggered();
144 void on_actionShowHidden_triggered(
bool check);
145 void on_actionShowThumbnails_triggered(
bool check);
146 void on_actionSplitView_triggered(
bool check);
147 void on_actionPreserveView_triggered(
bool checked);
148 void on_actionPreserveViewRecursive_triggered(
bool checked);
149 void on_actionGoToCustomizedViewSource_triggered();
151 void on_actionByFileName_triggered(
bool checked);
152 void on_actionByMTime_triggered(
bool checked);
153 void on_actionByCrTime_triggered(
bool checked);
154 void on_actionByDTime_triggered(
bool checked);
155 void on_actionByOwner_triggered(
bool checked);
156 void on_actionByGroup_triggered(
bool checked);
157 void on_actionByFileType_triggered(
bool checked);
158 void on_actionByFileSize_triggered(
bool checked);
159 void on_actionAscending_triggered(
bool checked);
160 void on_actionDescending_triggered(
bool checked);
161 void on_actionFolderFirst_triggered(
bool checked);
162 void on_actionHiddenLast_triggered(
bool checked);
163 void on_actionCaseSensitive_triggered(
bool checked);
164 void on_actionFilter_triggered(
bool checked);
165 void on_actionUnfilter_triggered();
166 void on_actionShowFilter_triggered();
168 void on_actionLocationBar_triggered(
bool checked);
169 void on_actionPathButtons_triggered(
bool checked);
171 void on_actionApplications_triggered();
172 void on_actionComputer_triggered();
173 void on_actionTrash_triggered();
174 void on_actionNetwork_triggered();
175 void on_actionDesktop_triggered();
176 void on_actionAddToBookmarks_triggered();
177 void on_actionEditBookmarks_triggered();
179 void on_actionOpenTerminal_triggered();
180 void on_actionCreateLauncher_triggered();
181 void on_actionOpenAsAdmin_triggered();
182 void on_actionOpenAsRoot_triggered();
183 void on_actionCopyFullPath_triggered();
184 void on_actionFindFiles_triggered();
186 void on_actionAbout_triggered();
187 void on_actionHiddenShortcuts_triggered();
189 void onBookmarkActionTriggered();
191 void onTabBarCloseRequested(
int index);
192 void onTabBarCurrentChanged(
int index);
193 void onTabBarTabMoved(
int from,
int to);
195 void onShortcutPrevTab();
196 void onShortcutNextTab();
197 void onShortcutJumpToTab();
199 void onStackedWidgetWidgetRemoved(
int index);
201 void onTabPageTitleChanged();
202 void onTabPageStatusChanged(
int type, QString statusText);
203 void onTabPageSortFilterChanged();
205 void onSidePaneChdirRequested(
int type,
const Fm::FilePath &path);
206 void onSidePaneOpenFolderInNewWindowRequested(
const Fm::FilePath &path);
207 void onSidePaneOpenFolderInNewTabRequested(
const Fm::FilePath &path);
208 void onSidePaneOpenFolderInTerminalRequested(
const Fm::FilePath &path);
209 void onSidePaneCreateNewFolderRequested(
const Fm::FilePath &path);
210 void onSidePaneModeChanged(Fm::SidePane::Mode mode);
211 void on_actionSidePane_triggered(
bool check);
212 void onSplitterMoved(
int pos,
int index);
215 void onBackForwardContextMenu(QPoint pos);
217 void onFolderUnmounted();
219 void tabContextMenu(
const QPoint& pos);
220 void onTabBarClicked(
int index);
221 void closeLeftTabs();
222 void closeRightTabs();
223 void closeOtherTabs() {
227 void focusPathEntry();
228 void toggleMenuBar(
bool checked);
229 void updateRecenMenu();
230 void clearRecentMenu();
231 void lanunchRecentFile();
234 void onBookmarksChanged();
236 void onSettingHiddenPlace(
const QString& str,
bool hide);
238 void on_actionCleanPerFolderConfig_triggered();
241 bool event(QEvent* event)
override;
242 void changeEvent(QEvent* event)
override;
243 void closeTab(
int index,
ViewFrame* viewFrame);
244 void closeTab(
int index) {
245 closeTab(index, activeViewFrame_);
247 virtual void resizeEvent(QResizeEvent* event)
override;
248 virtual void closeEvent(QCloseEvent* event)
override;
249 virtual void dragEnterEvent(QDragEnterEvent* event)
override;
250 virtual void dropEvent(QDropEvent* event)
override;
251 virtual bool eventFilter(QObject* watched, QEvent* event)
override;
254 void loadBookmarksMenu();
255 void updateUIForCurrentPage(
bool setFocus =
true);
256 void updateViewMenuForCurrentPage();
257 void updateEditSelectedActions();
258 void updateStatusBarForCurrentPage();
259 void setRTLIcons(
bool isRTL);
260 void createPathBar(
bool usePathButtons);
261 void addViewFrame(
const Fm::FilePath& path);
263 int addTabWithPage(
TabPage* page,
ViewFrame* viewFrame, Fm::FilePath path = Fm::FilePath());
264 void dropTab(QObject* source);
265 void setTabIcon(
TabPage* tabPage);
269 Fm::PathEdit* pathEntry_;
270 Fm::PathBar* pathBar_;
271 QLabel* fsInfoLabel_;
272 std::shared_ptr<Fm::Bookmarks> bookmarks_;
274 int rightClickIndex_;
275 bool updatingViewMenu_;
277 QAction* menuSpacer_;
286 static QPointer<MainWindow> lastActive_;