| 4 | #include "ccnotepad.h" |
| 5 | |
| 6 | OptionsView::OptionsView(QWidget* pNotepadWin, QWidget *parent) |
| 7 | : QWidget(parent), m_pNotepadWin(pNotepadWin) |
| 8 | { |
| 9 | ui.setupUi(this); |
| 10 | |
| 11 | //只在文件对比中出现;在编辑框模式下不出现,这个关联文件容易误解。 |
| 12 | if (pNotepadWin == nullptr) |
| 13 | { |
| 14 | DocTypeListView* p = new DocTypeListView(this); |
| 15 | ui.stackedWidget->addWidget(p); |
| 16 | |
| 17 | //文件关联 file correlation |
| 18 | ui.optionListWidget->addItem(tr("File Correlation")); |
| 19 | } |
| 20 | |
| 21 | |
| 22 | ui.optionListWidget->addItem(tr("Compare File Types")); |
| 23 | |
| 24 | TextEditSetWin* p2 = new TextEditSetWin(this); |
| 25 | p2->setNotePadWin(pNotepadWin); |
| 26 | |
| 27 | ui.stackedWidget->addWidget(p2); |
| 28 | ui.optionListWidget->addItem(tr("Text And Fonts")); |
| 29 | |
| 30 | connect(ui.optionListWidget, &QListWidget::currentRowChanged, this, &OptionsView::slot_curRowChanged); |
| 31 | connect(p2, &TextEditSetWin::sendTabFormatChange, this, &OptionsView::sendTabFormatChange); |
| 32 | connect(p2, &TextEditSetWin::signProLangFontChange, this, &OptionsView::signProLangFontChange); |
| 33 | } |
| 34 | |
| 35 | OptionsView::~OptionsView() |
| 36 | { |
nothing calls this directly
no test coverage detected