From e1f3cdcd7797bfbf518c7dbd00055f3e6e20557c Mon Sep 17 00:00:00 2001 From: John Levon Date: Tue, 3 Dec 2002 05:09:50 +0000 Subject: [PATCH] support preview for include file git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5765 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 + src/frontends/qt2/QInclude.C | 5 + src/frontends/qt2/ui/QIncludeDialog.ui | 412 +++++++++++++++---------- 3 files changed, 261 insertions(+), 161 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index bbc3aaa061..883f66b436 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-12-03 John Levon + + * ui/QIncludeDialog.ui: + * QInclude.C: support preview() + 2002-12-01 Lars Gullik Bjønnes * several files: ws changes diff --git a/src/frontends/qt2/QInclude.C b/src/frontends/qt2/QInclude.C index 032a1016f8..dfdade3a77 100644 --- a/src/frontends/qt2/QInclude.C +++ b/src/frontends/qt2/QInclude.C @@ -58,10 +58,14 @@ void QInclude::update_contents() dialog_->visiblespaceCB->setChecked(false); dialog_->visiblespaceCB->setEnabled(false); + dialog_->previewCB->setChecked(false); + dialog_->previewCB->setEnabled(false); switch (params.flag) { case InsetInclude::INPUT: dialog_->typeCO->setCurrentItem(0); + dialog_->previewCB->setEnabled(true); + dialog_->previewCB->setChecked(params.cparams.preview()); break; case InsetInclude::INCLUDE: @@ -84,6 +88,7 @@ void QInclude::apply() InsetInclude::Params & params = controller().params(); params.cparams.setContents(dialog_->filenameED->text().latin1()); + params.cparams.preview(dialog_->previewCB->isChecked()); int const item = dialog_->typeCO->currentItem(); if (item == 0) diff --git a/src/frontends/qt2/ui/QIncludeDialog.ui b/src/frontends/qt2/ui/QIncludeDialog.ui index b072afe7a5..784be9f348 100644 --- a/src/frontends/qt2/ui/QIncludeDialog.ui +++ b/src/frontends/qt2/ui/QIncludeDialog.ui @@ -13,8 +13,8 @@ 0 0 - 311 - 158 + 282 + 185 @@ -25,7 +25,7 @@ sizeGripEnabled true - + margin 11 @@ -34,75 +34,264 @@ spacing 6 - - QComboBox - - - text - Input - - - - - text - Include - - - - - text - Verbatim - - + + QLayoutWidget name - typeCO + Layout2 + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + filenameLA + + + text + &File: + + + buddy + filenameED + + + toolTip + + + + + QLineEdit + + name + filenameED + + + toolTip + File name to include + + + + QPushButton + + name + browsePB + + + text + &Browse... + + + toolTip + Select a file + + + - - - name - Spacer27 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel + + QLayoutWidget name - filenameLA + Layout3 + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + TextLabel1 + + + text + &Include Type: + + + buddy + typeCO + + + + QComboBox + + + text + Input + + + + + text + Include + + + + + text + Verbatim + + + + name + typeCO + + + + + name + Spacer27 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QPushButton + + name + loadPB + + + text + &Load + + + toolTip + Load the file + + + + + + QLayoutWidget - text - &File: - - - buddy - filenameED - - - toolTip - + name + Layout5 + + + margin + 0 + + + spacing + 6 + + + QLayoutWidget + + name + Layout4 + + + + margin + 0 + + + spacing + 6 + + + QCheckBox + + name + visiblespaceCB + + + sizePolicy + + 3 + 0 + + + + text + &Visible Space + + + toolTip + FIXME + + + + QCheckBox + + name + previewCB + + + sizePolicy + + 3 + 0 + + + + text + &Show preview + + + toolTip + Show LaTeX preview + + + + + + + name + Spacer5 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + - + name - Spacer13 + Spacer13_2 orientation @@ -120,44 +309,7 @@ - - QCheckBox - - name - visiblespaceCB - - - sizePolicy - - 3 - 0 - - - - text - Visible &Space - - - toolTip - FIXME - - - - QPushButton - - name - loadPB - - - text - &Load - - - toolTip - Load the file - - - + QLayoutWidget name @@ -221,69 +373,7 @@ - - - name - Spacer13_2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - browsePB - - - text - &Browse... - - - toolTip - Select a file - - - - QLabel - - name - TextLabel1 - - - text - &Include Type: - - - buddy - typeCO - - - - QLineEdit - - name - filenameED - - - toolTip - File name to include - - - + -- 2.39.2