5 #include <QModelIndex>
\r
6 #include <QMainWindow>
\r
8 class OverWriteDialog;
\r
18 ///////////////////////////////////////////////////////////////////////////////
\r
19 /// \brief The MainWindow class
\r
21 class MainWindow : public QMainWindow
\r
26 explicit MainWindow(QWidget *parent = 0);
\r
30 void showHiddenFiles(bool show);
\r
31 void showSystemFiles(bool show);
\r
34 void askOverWrite(QString *copyMethod, QString *alias,
\r
35 const QString &srcPath, const QString &tgtPath);
\r
37 void currentChange(const QFileInfo &info);
\r
38 void dropAccept(const QFileInfoList &list);
\r
39 void focusChange(QWidget * old, QWidget * now);
\r
40 void leftKeyPress();
\r
41 void rightKeyPress();
\r
42 void returnPressInSearchBox();
\r
43 void showFileInfo(const QString &str);
\r
46 void checkUpdate(bool silent = false);
\r
47 void checkUpdateFinished(QNetworkReply *reply, bool silent = false);
\r
48 void checkUpdateFinishedSilent(QNetworkReply *reply);
\r
49 void chooseFolder();
\r
50 void copyFilenameToClipboard();
\r
51 void copyFullpathTpClipboard();
\r
54 void createFolder();
\r
58 void executeCommand();
\r
60 void historyForward();
\r
62 void itemNotFound();
\r
64 void markAllFiles();
\r
69 void open(const QModelIndex &index = QModelIndex());
\r
70 void openEditor(const QString &path = QString());
\r
71 void openTerminal();
\r
74 void retrieveFinish();
\r
75 void retrieveStart(const QString &path);
\r
76 void searchItem(const QString& text);
\r
79 void setCursorToBegin();
\r
80 void setCursorToEnd();
\r
81 void setFontSizeDown();
\r
82 void setFontSizeUp();
\r
83 void setPathFromOther();
\r
84 void setPathToHome();
\r
85 void setPathToOther();
\r
86 void setPathToParent();
\r
87 void setPathToRoot();
\r
88 void shellExecute();
\r
89 void showFilterDialog();
\r
90 void showHistoryDialog();
\r
91 void showPreferenceDialog();
\r
92 void showSortDialog();
\r
94 void switchHalfMode(bool checked);
\r
95 void toggleSearchBox(bool checked);
\r
96 void toggleShowHiddenFiles(bool checked);
\r
97 void toggleShowSystemFiles(bool checked);
\r
99 void showContextMenu(QContextMenuEvent *event);
\r
107 ModeFullView = 0x02,
\r
108 ModeHalfView = 0x04,
\r
110 typedef QFlags<Mode> ModeFlags;
\r
112 Ui::MainWindow *ui;
\r
113 QWidget *m_focusedView;
\r
114 OverWriteDialog *m_overwriteDialog;
\r
115 ModeFlags m_viewMode;
\r
118 void initActionConnections();
\r
119 static void replaceVars(QString &str, const QFileInfo info);
\r
120 bool startProcess(const QString &cmd, const QString &workDir, const QString &errMsg);
\r
121 void updateActions();
\r
122 void setEnabledAllActions(bool enable);
\r
123 void showNameFilters(FolderView *view);
\r
124 void copyItems(const QFileInfoList &list, const QString &tgtDir);
\r
125 void changeFontSize(int diff);
\r
128 FolderView* otherSideFolderView(const FolderView *view) const;
\r
131 void setViewMode(ModeFlags flags);
\r
133 // QWidget interface
\r
135 void closeEvent(QCloseEvent *event);
\r
136 void keyPressEvent(QKeyEvent *event);
\r
139 #endif // MAINWINDOW_H
\r