5 #include <QModelIndex>
\r
6 #include <QMainWindow>
\r
10 class OverWriteDialog;
\r
17 ///////////////////////////////////////////////////////////////////////////////
\r
18 /// \brief The MainWindow class
\r
20 class MainWindow : public QMainWindow
\r
25 explicit MainWindow(QWidget *parent = 0);
\r
28 FolderView *otherSideView(const FolderView *view) const;
\r
31 void showHiddenFiles(bool show);
\r
32 void showSystemFiles(bool show);
\r
35 void askOverWrite(QString *copyMethod, QString *alias,
\r
36 const QString &srcPath, const QString &tgtPath);
\r
38 void focusChange(QWidget * old, QWidget * now);
\r
39 void keyPress(FolderView *view, QKeyEvent *event);
\r
40 void returnPressInSearchBox();
\r
42 void chooseFolder();
\r
43 void copyFilenameToClipboard();
\r
44 void copyFullpathTpClipboard();
\r
47 void createFolder();
\r
51 void executeCommand();
\r
53 void historyForward();
\r
54 void itemFound(FolderView *view);
\r
55 void itemNotFound(FolderView *view);
\r
57 void markAllFiles();
\r
62 void open(const QModelIndex &index = QModelIndex());
\r
63 void openEditor(const QString &path = QString());
\r
64 void openTerminal();
\r
67 void retrieveFinish();
\r
68 void retrieveStart(const QString &path);
\r
69 void searchItem(const QString& text);
\r
72 void setCursorToBegin();
\r
73 void setCursorToEnd();
\r
74 void setPathFromOther();
\r
75 void setPathToHome();
\r
76 void setPathToOther();
\r
77 void setPathToParent();
\r
78 void setPathToRoot();
\r
79 void shellExecute();
\r
80 void showFilterDialog();
\r
81 void showHistoryDialog();
\r
82 void showSortDialog();
\r
84 void toggleSearchBox(bool checked);
\r
89 void openRequest(const QFileInfo &info);
\r
90 void showPreferenceDialog();
\r
92 void toggleShowHiddenFiles(bool checked);
\r
93 void toggleShowSystemFiles(bool checked);
\r
94 void checkUpdate(bool silent = false);
\r
95 void checkUpdateFinished(QNetworkReply *reply, bool silent = false);
\r
96 void checkUpdateFinishedSilent(QNetworkReply *reply);
\r
97 void viewFinish(QWidget *sender);
\r
100 Ui::MainWindow *ui;
\r
101 QWidget *m_focusedView;
\r
102 OverWriteDialog *m_overwriteDialog;
\r
105 void initActionConnections();
\r
106 static void replaceVars(QString &str, const QFileInfo info);
\r
107 bool startProcess(const QString &cmd, const QString &workDir, const QString &errMsg);
\r
108 void updateActions();
\r
109 void setEnabledAllActions(bool enable);
\r
110 void setNameFilters(FolderView *view, const QString& filters = QString());
\r
111 void setSorting(FolderView *view);
\r
114 QLabel* filterLabel(const FolderView *view) const;
\r
115 FolderView* folderView() const;
\r
116 SearchBox* searchBox(FolderView *view) const;
\r
119 // QWidget interface
\r
121 void closeEvent(QCloseEvent *event);
\r
122 void keyPressEvent(QKeyEvent *event);
\r
125 #endif // MAINWINDOW_H
\r