4 #include "overwritedialog.h"
\r
7 #include <QModelIndex>
\r
8 #include <QNetworkReply>
\r
9 #include <QAbstractItemView>
\r
10 #include <QMainWindow>
\r
20 ///////////////////////////////////////////////////////////////////////////////
\r
21 /// \brief The MainWindow class
\r
23 class MainWindow : public QMainWindow
\r
28 explicit MainWindow(QWidget *parent = 0);
\r
34 void app_focusChange(QWidget *old, QWidget *now);
\r
35 void checkUpdateFinished(QNetworkReply *reply, bool silent = false);
\r
36 void checkUpdateFinishedSilent(QNetworkReply *reply);
\r
37 void model_PreReset();
\r
38 void model_PostReset();
\r
40 void onCheckUpdate(bool silent = false);
\r
41 void onChooseFolder();
\r
43 void onCopyFileName();
\r
44 void onCopyFilePath();
\r
45 void onCreateFile();
\r
46 void onCreateFolder();
\r
48 void onEditBookmark();
\r
49 void onExpandLeft();
\r
50 void onExpandRight();
\r
52 void onKeyDownOther();
\r
54 void onKeyEndOther();
\r
56 void onKeyHomeOther();
\r
60 void onKeyUpOther();
\r
62 void onOpenArchiver();
\r
63 void onOpenBookmark();
\r
64 void onOpenEditor(const QModelIndex &index = QModelIndex());
\r
65 void onOpenTerminal();
\r
68 void onRunCommand();
\r
71 void onSearchNext();
\r
72 void onSearchPrev();
\r
73 void onSplitCenter();
\r
76 void onSyncPanelTo();
\r
77 void onToggleFullMode(bool checked);
\r
78 void onToggleHidden(bool checked);
\r
79 void onToggleMark();
\r
80 void onTogglePreviewMode(bool checked);
\r
81 void onToggleSearch(bool checked);
\r
82 void onToggleSystem(bool checked);
\r
83 void onToggleThumbnailMode(bool checked);
\r
84 void onToggleToolbar(bool checked);
\r
85 void showBookmarkDialog();
\r
86 void showFilterDialog();
\r
87 void showHistoryDialog();
\r
88 void showPreferenceDialog();
\r
89 void showSortDialog();
\r
92 void askOverWrite(QString *copyMethod, QString *alias,
\r
93 const QString &srcPath, const QString &tgtPath);
\r
94 void copyItems(const QStringList &list, const QString &tgtDir);
\r
95 void moveItems(const QStringList &list, const QString &tgtDir);
\r
96 void onAddBookmark();
\r
97 void onOpen(const QModelIndex &index = QModelIndex());
\r
98 void view_copyAvailable(bool yes);
\r
99 void view_currentChanged(const QModelIndex & current, const QModelIndex & previous);
\r
100 void view_finished();
\r
101 void view_statusChanged(const QString &text);
\r
102 void view_showed(QWidget* w);
\r
105 typedef QList<QAction*> ActionList;
\r
107 ModeBasic = 1, // 二画面モード
\r
108 ModeFull, // 単画面モード
\r
109 ModeView, // ビューモード
\r
110 ModePreview, // プレビューモード
\r
112 Ui::MainWindow *ui;
\r
113 OverWriteDialog m_overwriteDialog;
\r
116 ActionList m_actions;
\r
118 FolderModel* activeModel() const;
\r
119 Panel* activePanel() const;
\r
120 QAbstractItemView* focusItemView() const;
\r
121 FolderModel* inactiveModel() const;
\r
122 Panel* inactivePanel() const;
\r
123 void initActions();
\r
124 void initBookmarkMenu();
\r
125 bool onContextMenuEvent(QObject *obj, QContextMenuEvent *e);
\r
126 bool onKeyPressEvent(QObject *obj, QKeyEvent *e);
\r
127 QFileInfoList selectedItems() const;
\r
128 void sendEventOther(QEvent *event);
\r
129 void setActiveModel(FolderModel *m);
\r
130 void setEnabledAllActions(bool enable);
\r
131 void setViewMode(Mode mode);
\r
132 bool startProcess(const QString &cmd, const QString &errMsg);
\r
133 void updateActions();
\r
135 // QWidget interface
\r
137 void closeEvent(QCloseEvent *event);
\r
139 // QObject interface
\r
141 bool eventFilter(QObject *watched, QEvent *e);
\r
144 #endif // MAINWINDOW_H
\r