]> git.lyx.org Git - features.git/commitdiff
support preview for include file
authorJohn Levon <levon@movementarian.org>
Tue, 3 Dec 2002 05:09:50 +0000 (05:09 +0000)
committerJohn Levon <levon@movementarian.org>
Tue, 3 Dec 2002 05:09:50 +0000 (05:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5765 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QInclude.C
src/frontends/qt2/ui/QIncludeDialog.ui

index bbc3aaa06104eaca298b6ce994d02cac804001ae..883f66b43688c7b7802b2c92ac6fcd4cbcc8e96f 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-03  John Levon  <levon@movementarian.org>
+
+       * ui/QIncludeDialog.ui:
+       * QInclude.C: support preview()
 2002-12-01  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * several files: ws changes
index 032a1016f813ef2234824a6b9f127b952f7b00f4..dfdade3a77be0d8afa06a8483a38085348259f1e 100644 (file)
@@ -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)
index b072afe7a5e0267dbfe59cb45496551fe6846930..784be9f348a399edb7d41c1e014a30691acbd6da 100644 (file)
@@ -13,8 +13,8 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>311</width>
-            <height>158</height>
+            <width>282</width>
+            <height>185</height>
         </rect>
     </property>
     <property stdset="1">
@@ -25,7 +25,7 @@
         <name>sizeGripEnabled</name>
         <bool>true</bool>
     </property>
-    <grid>
+    <vbox>
         <property stdset="1">
             <name>margin</name>
             <number>11</number>
             <name>spacing</name>
             <number>6</number>
         </property>
-        <widget row="1"  column="1" >
-            <class>QComboBox</class>
-            <item>
-                <property>
-                    <name>text</name>
-                    <string>Input</string>
-                </property>
-            </item>
-            <item>
-                <property>
-                    <name>text</name>
-                    <string>Include</string>
-                </property>
-            </item>
-            <item>
-                <property>
-                    <name>text</name>
-                    <string>Verbatim</string>
-                </property>
-            </item>
+        <widget>
+            <class>QLayoutWidget</class>
             <property stdset="1">
                 <name>name</name>
-                <cstring>typeCO</cstring>
+                <cstring>Layout2</cstring>
             </property>
+            <hbox>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>0</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <widget>
+                    <class>QLabel</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>filenameLA</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;File:</string>
+                    </property>
+                    <property>
+                        <name>buddy</name>
+                        <cstring>filenameED</cstring>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string></string>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QLineEdit</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>filenameED</cstring>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>File name to include</string>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QPushButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>browsePB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Browse...</string>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Select a file</string>
+                    </property>
+                </widget>
+            </hbox>
         </widget>
-        <spacer row="1"  column="3" >
-            <property>
-                <name>name</name>
-                <cstring>Spacer27</cstring>
-            </property>
-            <property stdset="1">
-                <name>orientation</name>
-                <enum>Horizontal</enum>
-            </property>
-            <property stdset="1">
-                <name>sizeType</name>
-                <enum>Expanding</enum>
-            </property>
-            <property>
-                <name>sizeHint</name>
-                <size>
-                    <width>20</width>
-                    <height>20</height>
-                </size>
-            </property>
-        </spacer>
-        <widget row="0"  column="0" >
-            <class>QLabel</class>
+        <widget>
+            <class>QLayoutWidget</class>
             <property stdset="1">
                 <name>name</name>
-                <cstring>filenameLA</cstring>
+                <cstring>Layout3</cstring>
             </property>
+            <hbox>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>0</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <widget>
+                    <class>QLabel</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>TextLabel1</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Include Type:</string>
+                    </property>
+                    <property>
+                        <name>buddy</name>
+                        <cstring>typeCO</cstring>
+                    </property>
+                </widget>
+                <widget>
+                    <class>QComboBox</class>
+                    <item>
+                        <property>
+                            <name>text</name>
+                            <string>Input</string>
+                        </property>
+                    </item>
+                    <item>
+                        <property>
+                            <name>text</name>
+                            <string>Include</string>
+                        </property>
+                    </item>
+                    <item>
+                        <property>
+                            <name>text</name>
+                            <string>Verbatim</string>
+                        </property>
+                    </item>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>typeCO</cstring>
+                    </property>
+                </widget>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer27</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>orientation</name>
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+                <widget>
+                    <class>QPushButton</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>loadPB</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>text</name>
+                        <string>&amp;Load</string>
+                    </property>
+                    <property>
+                        <name>toolTip</name>
+                        <string>Load the file</string>
+                    </property>
+                </widget>
+            </hbox>
+        </widget>
+        <widget>
+            <class>QLayoutWidget</class>
             <property stdset="1">
-                <name>text</name>
-                <string>&amp;File:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>filenameED</cstring>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string></string>
+                <name>name</name>
+                <cstring>Layout5</cstring>
             </property>
+            <hbox>
+                <property stdset="1">
+                    <name>margin</name>
+                    <number>0</number>
+                </property>
+                <property stdset="1">
+                    <name>spacing</name>
+                    <number>6</number>
+                </property>
+                <widget>
+                    <class>QLayoutWidget</class>
+                    <property stdset="1">
+                        <name>name</name>
+                        <cstring>Layout4</cstring>
+                    </property>
+                    <vbox>
+                        <property stdset="1">
+                            <name>margin</name>
+                            <number>0</number>
+                        </property>
+                        <property stdset="1">
+                            <name>spacing</name>
+                            <number>6</number>
+                        </property>
+                        <widget>
+                            <class>QCheckBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>visiblespaceCB</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>sizePolicy</name>
+                                <sizepolicy>
+                                    <hsizetype>3</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                </sizepolicy>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Visible Space</string>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>FIXME</string>
+                            </property>
+                        </widget>
+                        <widget>
+                            <class>QCheckBox</class>
+                            <property stdset="1">
+                                <name>name</name>
+                                <cstring>previewCB</cstring>
+                            </property>
+                            <property stdset="1">
+                                <name>sizePolicy</name>
+                                <sizepolicy>
+                                    <hsizetype>3</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                </sizepolicy>
+                            </property>
+                            <property stdset="1">
+                                <name>text</name>
+                                <string>&amp;Show preview</string>
+                            </property>
+                            <property>
+                                <name>toolTip</name>
+                                <string>Show LaTeX preview</string>
+                            </property>
+                        </widget>
+                    </vbox>
+                </widget>
+                <spacer>
+                    <property>
+                        <name>name</name>
+                        <cstring>Spacer5</cstring>
+                    </property>
+                    <property stdset="1">
+                        <name>orientation</name>
+                        <enum>Horizontal</enum>
+                    </property>
+                    <property stdset="1">
+                        <name>sizeType</name>
+                        <enum>Expanding</enum>
+                    </property>
+                    <property>
+                        <name>sizeHint</name>
+                        <size>
+                            <width>20</width>
+                            <height>20</height>
+                        </size>
+                    </property>
+                </spacer>
+            </hbox>
         </widget>
-        <spacer row="2"  column="4"  rowspan="2"  colspan="1" >
+        <spacer>
             <property>
                 <name>name</name>
-                <cstring>Spacer13</cstring>
+                <cstring>Spacer13_2</cstring>
             </property>
             <property stdset="1">
                 <name>orientation</name>
                 </size>
             </property>
         </spacer>
-        <widget row="3"  column="1"  rowspan="1"  colspan="3" >
-            <class>QCheckBox</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>visiblespaceCB</cstring>
-            </property>
-            <property stdset="1">
-                <name>sizePolicy</name>
-                <sizepolicy>
-                    <hsizetype>3</hsizetype>
-                    <vsizetype>0</vsizetype>
-                </sizepolicy>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>Visible &amp;Space</string>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string>FIXME</string>
-            </property>
-        </widget>
-        <widget row="1"  column="4" >
-            <class>QPushButton</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>loadPB</cstring>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Load</string>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string>Load the file</string>
-            </property>
-        </widget>
-        <widget row="6"  column="0"  rowspan="1"  colspan="5" >
+        <widget>
             <class>QLayoutWidget</class>
             <property stdset="1">
                 <name>name</name>
                 </widget>
             </hbox>
         </widget>
-        <spacer row="4"  column="2" >
-            <property>
-                <name>name</name>
-                <cstring>Spacer13_2</cstring>
-            </property>
-            <property stdset="1">
-                <name>orientation</name>
-                <enum>Vertical</enum>
-            </property>
-            <property stdset="1">
-                <name>sizeType</name>
-                <enum>Expanding</enum>
-            </property>
-            <property>
-                <name>sizeHint</name>
-                <size>
-                    <width>20</width>
-                    <height>20</height>
-                </size>
-            </property>
-        </spacer>
-        <widget row="0"  column="4" >
-            <class>QPushButton</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>browsePB</cstring>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Browse...</string>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string>Select a file</string>
-            </property>
-        </widget>
-        <widget row="1"  column="0" >
-            <class>QLabel</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>TextLabel1</cstring>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Include Type:</string>
-            </property>
-            <property>
-                <name>buddy</name>
-                <cstring>typeCO</cstring>
-            </property>
-        </widget>
-        <widget row="0"  column="1"  rowspan="1"  colspan="3" >
-            <class>QLineEdit</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>filenameED</cstring>
-            </property>
-            <property>
-                <name>toolTip</name>
-                <string>File name to include</string>
-            </property>
-        </widget>
-    </grid>
+    </vbox>
 </widget>
 <connections>
     <connection>