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