2021-04-06 23:10:57 +08:00
|
|
|
#ifndef EDITORLIST_H
|
|
|
|
#define EDITORLIST_H
|
|
|
|
|
|
|
|
#include <QTabWidget>
|
|
|
|
#include <QSplitter>
|
|
|
|
#include <QWidget>
|
2021-04-07 21:13:15 +08:00
|
|
|
#include "utils.h"
|
2021-04-06 23:10:57 +08:00
|
|
|
|
2021-04-07 21:13:15 +08:00
|
|
|
class Editor;
|
|
|
|
class EditorList
|
2021-04-06 23:10:57 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum ShowType{
|
|
|
|
lstNone,
|
|
|
|
lstLeft,
|
|
|
|
lstRight,
|
|
|
|
lstBoth
|
|
|
|
};
|
|
|
|
|
2021-04-07 21:13:15 +08:00
|
|
|
explicit EditorList(QTabWidget* leftPageWidget,
|
|
|
|
QTabWidget* rightPageWidget,
|
|
|
|
QSplitter* splitter,
|
|
|
|
QWidget* panel);
|
2021-04-06 23:10:57 +08:00
|
|
|
|
2021-04-07 21:13:15 +08:00
|
|
|
Editor* NewEditor(const QString& filename, FileEncodingType encoding,
|
|
|
|
bool inProject, bool newFile,
|
|
|
|
QTabWidget* page=NULL);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QTabWidget* GetNewEditorPageControl();
|
2021-04-06 23:10:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
ShowType mLayout;
|
|
|
|
QTabWidget *mLeftPageWidget;
|
|
|
|
QTabWidget *mRightPageWidget;
|
|
|
|
QSplitter *mSplitter;
|
|
|
|
QWidget *mPanel;
|
|
|
|
int mUpdateCount;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EDITORLIST_H
|