GuiNote.h
GuiPainter.h
GuiParagraph.h
+ GuiPhantom.h
GuiPrefs.h
GuiPrint.h
GuiRef.h
GuiNote.cpp
GuiPainter.cpp
GuiParagraph.cpp
+ GuiPhantom.cpp
GuiPrefs.cpp
GuiPrint.cpp
GuiRef.cpp
PageLayoutUi.ui
ParagraphUi.ui
PDFSupportUi.ui
+ PhantomUi.ui
PreambleUi.ui
PrefColorsUi.ui
PrefCompletionUi.ui
OptItem "Float Settings...|a" "inset-settings float"
OptItem "Text Wrap Settings...|W" "inset-settings wrap"
OptItem "Note Settings...|N" "inset-settings note"
+ OptItem "Phantom Settings...|h" "inset-settings phantom"
OptItem "Branch Settings...|B" "inset-settings branch"
OptItem "Box Settings...|x" "inset-settings box"
OptItem "Listings Settings...|g" "inset-settings listings"
Item "Horizontal Space...|o" "dialog-show-new-inset space"
Item "Horizontal Line|L" "line-insert"
Item "Vertical Space...|V" "dialog-show-new-inset vspace"
- Submenu "Phantom Text" "insert_phantom"
+ Submenu "Phantom" "insert_phantom"
Separator
Item "Hyphenation Point|H" "specialchar-insert hyphenation"
Item "Ligature Break|k" "specialchar-insert ligature-break"
/*!
* \var lyx::FuncCode lyx::LFUN_INSET_MODIFY
* \li Action: Modify existing inset.
- * \li Notion: Used for label, floats, listings, box, branch, external, wrap
- bibtex, ert, command, graphics, note, space, vspace, tabular,
- bibitem, inlude, ref insets.
+ * \li Notion: Used for bibitem, bibtex, box, branch, command, ert, external,
+ floats, graphics, include, label, listings, note,
+ phantom, ref, space, tabular, vspace, wrap insets.
* \li Syntax: inset-modify <INSET> <ARGS>
* \li Params: See #LFUN_INSET_INSERT for further details.
* \endvar
/*!
* \var lyx::FuncCode lyx::LFUN_NEXT_INSET_MODIFY
* \li Action: Modify the inset at cursor position, if there is one.
- * \li Notion: Used for label, floats, listings, box, branch, external, wrap
- bibtex, ert, command, graphics, note, space, vspace, tabular,
- bibitem, inlude, ref insets.
+ * \li Notion: Used for bibitem, bibtex, box, branch, command, ert, external,
+ floats, graphics, include, label, listings, note,
+ phantom, ref, space, tabular, vspace, wrap insets.
* \li Syntax: next-inset-modify <INSET> <ARGS>
* \li Syntax: next-inset-modify changetype <TYPE>
* \li Params: See #LFUN_INSET_INSERT for further details.
* \li Action: Open the inset's properties dialog.
* \li Notion: Used for box, branch, ert, float, listings, note, tabular, wrap insets.
* \li Syntax: inset-settings <INSET>
- * \li Params: <INSET>: <box|branch|ert|float|listings|note|tabular|wrap>
+ * \li Params: <INSET>: <box|branch|ert|float|listings|note|phantom|tabular|wrap>
* \endvar
*/
{ LFUN_INSET_SETTINGS, "inset-settings", ReadOnly, Edit },
* \li Action: Toggles the inset at cursor position. For collapsables, this means it will
be (un-)collapsed, in case of other insets, the editing widget (dialog) will
be entered. Also cf. #LFUN_INSET_SETTINGS.
- * \li Notion: Used for label, floats, listings, box, branch, external, wrap
- bibtex, ert, command, graphics, note, space, vspace, tabular,
- bibitem, inlude, ref insets.
+ * \li Notion: Used for bibitem, bibtex, box, branch, command, ert, external,
+ floats, graphics, include, label, listings, note,
+ phantom, ref, space, tabular, vspace, wrap insets.
* \li Syntax: next-inset-toggle <ARG>
* \li Params: <ARG>: these are passed as arguments to #LFUN_INSET_TOGGLE .
* \li Origin: leeming, 30 Mar 2004
* \li Syntax: dialog-show <NAME> [<DATA>]
* \li Params: <NAME>: aboutlyx|bibitem|bibtex|box|branch|changes|character|citation|\n
document|errorlist|ert|external|file|findreplace|float|graphics|\n
- include|index|info|nomenclature|label|log|mathdelimiter|mathmatrix|\n
- note|paragraph|prefs|print|ref|sendto|space|spellchecker|symbols|\n
- tabular|tabularcreate|thesaurus|texinfo|toc|href|view-source|vspace\n
- wrap|listings|<SPECIAL> \n
+ include|index|info|nomenclature|label|listings|log|mathdelimiter|\n
+ mathmatrix|note|paragraph|phantom|prefs|print|ref|sendto|space|\n
+ spellchecker|symbols|tabular|tabularcreate|thesaurus|texinfo|toc|href|\n
+ view-source|vspace|wrap|<SPECIAL> \n
<SPECIAL>: latexlog|vclog \n
<DATA>: data, usually settings for the given dialog. Use debug mode for the
details.
--- /dev/null
+/**
+ * \file GuiPhantom.cpp
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Uwe Stöhr
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
+#include "GuiPhantom.h"
+#include "FuncRequest.h"
+#include "support/gettext.h"
+
+#include "insets/InsetPhantom.h"
+
+using namespace std;
+
+namespace lyx {
+namespace frontend {
+
+GuiPhantom::GuiPhantom(GuiView & lv)
+ : GuiDialog(lv, "phantom", qt_("Phantom Settings"))
+{
+ setupUi(this);
+
+ connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
+ connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+
+ connect(phantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+ connect(hphantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+ connect(vphantomRB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
+
+ bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
+ bc().setOK(okPB);
+ bc().setCancel(closePB);
+}
+
+
+void GuiPhantom::change_adaptor()
+{
+ changed();
+}
+
+
+void GuiPhantom::updateContents()
+{
+ switch (params_.type) {
+ case InsetPhantomParams::Phantom:
+ phantomRB->setChecked(true);
+ break;
+ case InsetPhantomParams::HPhantom:
+ hphantomRB->setChecked(true);
+ break;
+ case InsetPhantomParams::VPhantom:
+ vphantomRB->setChecked(true);
+ break;
+ }
+}
+
+
+void GuiPhantom::applyView()
+{
+ if (vphantomRB->isChecked())
+ params_.type = InsetPhantomParams::VPhantom;
+ else if (hphantomRB->isChecked())
+ params_.type = InsetPhantomParams::HPhantom;
+ else
+ params_.type = InsetPhantomParams::Phantom;
+}
+
+
+bool GuiPhantom::initialiseParams(string const & data)
+{
+ InsetPhantom::string2params(data, params_);
+ return true;
+}
+
+
+void GuiPhantom::clearParams()
+{
+ params_ = InsetPhantomParams();
+}
+
+
+void GuiPhantom::dispatchParams()
+{
+ dispatch(FuncRequest(getLfun(), InsetPhantom::params2string(params_)));
+}
+
+
+Dialog * createGuiPhantom(GuiView & lv) { return new GuiPhantom(lv); }
+
+
+} // namespace frontend
+} // namespace lyx
+
+#include "moc_GuiPhantom.cpp"
--- /dev/null
+// -*- C++ -*-
+/**
+ * \file GuiPhantom.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Uwe Stöhr
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef GUIPHANTOM_H
+#define GUIPHANTOM_H
+
+#include "GuiDialog.h"
+#include "insets/InsetPhantom.h"
+#include "ui_PhantomUi.h"
+
+namespace lyx {
+namespace frontend {
+
+class GuiPhantom : public GuiDialog, public Ui::PhantomUi
+{
+ Q_OBJECT
+public:
+ GuiPhantom(GuiView & lv);
+private Q_SLOTS:
+ void change_adaptor();
+private:
+ /// Apply changes
+ void applyView();
+ /// Update dialog before showing it
+ void updateContents();
+ ///
+ bool initialiseParams(std::string const & data);
+ ///
+ void clearParams();
+ ///
+ void dispatchParams();
+ ///
+ bool isBufferDependent() const { return true; }
+private:
+ ///
+ InsetPhantomParams params_;
+};
+
+} // namespace frontend
+} // namespace lyx
+
+#endif // GUIPHANTOM_H
char const * const dialognames[] = {
"aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
-"citation", "document", "errorlist", "ert", "external", "file",
-"findreplace", "float", "graphics", "include", "index", "info", "nomenclature", "label", "log",
-"mathdelimiter", "mathmatrix", "mathspace", "note", "paragraph", "prefs", "print",
-"ref", "sendto", "space", "spellchecker", "symbols", "tabular", "tabularcreate",
+"citation", "document", "errorlist", "ert", "external", "file", "findreplace",
+"float", "graphics", "include", "index", "info", "nomenclature", "label",
+"log", "mathdelimiter", "mathmatrix", "mathspace", "note", "paragraph",
+"phantom", "prefs", "print", "ref", "sendto", "space", "spellchecker",
+"symbols", "tabular", "tabularcreate",
#ifdef HAVE_LIBAIKSAURUS
"thesaurus",
Dialog * createGuiNomenclature(GuiView & lv);
Dialog * createGuiNote(GuiView & lv);
Dialog * createGuiParagraph(GuiView & lv);
+Dialog * createGuiPhantom(GuiView & lv);
Dialog * createGuiPreferences(GuiView & lv);
Dialog * createGuiPrint(GuiView & lv);
Dialog * createGuiRef(GuiView & lv);
return createGuiLabel(*this);
if (name == "log")
return createGuiLog(*this);
- if (name == "view-source")
- return createGuiViewSource(*this);
if (name == "mathdelimiter")
return createGuiDelimiter(*this);
if (name == "mathspace")
return createGuiNote(*this);
if (name == "paragraph")
return createGuiParagraph(*this);
+ if (name == "phantom")
+ return createGuiPhantom(*this);
if (name == "prefs")
return createGuiPreferences(*this);
if (name == "print")
return createGuiTabularCreate(*this);
if (name == "texinfo")
return createGuiTexInfo(*this);
+ if (name == "view-source")
+ return createGuiViewSource(*this);
#ifdef HAVE_LIBAIKSAURUS
if (name == "thesaurus")
return createGuiThesaurus(*this);
#endif
- if (name == "toc")
- return createGuiToc(*this);
if (name == "href")
return createGuiHyperlink(*this);
+ if (name == "listings")
+ return createGuiListings(*this);
+ if (name == "toc")
+ return createGuiToc(*this);
if (name == "vspace")
return createGuiVSpace(*this);
if (name == "wrap")
return createGuiWrap(*this);
- if (name == "listings")
- return createGuiListings(*this);
return 0;
}
GuiNote.cpp \
GuiPainter.cpp \
GuiParagraph.cpp \
+ GuiPhantom.cpp \
GuiPrefs.cpp \
GuiPrint.cpp \
GuiRef.cpp \
GuiNomencl.h \
GuiNote.h \
GuiParagraph.h \
+ GuiPhantom.h \
GuiPrefs.h \
GuiPrint.h \
GuiRef.h \
PageLayoutUi.ui \
ParagraphUi.ui \
PDFSupportUi.ui \
+ PhantomUi.ui \
PreambleUi.ui \
PrefColorsUi.ui \
PrefCompletionUi.ui \
--- /dev/null
+<ui version="4.0" >
+ <class>PhantomUi</class>
+ <widget class="QDialog" name="PhantomUi" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>202</width>
+ <height>184</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string/>
+ </property>
+ <property name="sizeGripEnabled" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="1" >
+ <widget class="QPushButton" name="closePB" >
+ <property name="text" >
+ <string>Close</string>
+ </property>
+ <property name="default" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="okPB" >
+ <property name="text" >
+ <string>&OK</string>
+ </property>
+ <property name="default" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="2" >
+ <widget class="QGroupBox" name="PhantomBG" >
+ <property name="title" >
+ <string>Type</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>11</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QRadioButton" name="phantomRB" >
+ <property name="toolTip" >
+ <string>Horizontal and vertical space of the phantom content</string>
+ </property>
+ <property name="text" >
+ <string>&Phantom</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="hphantomRB" >
+ <property name="toolTip" >
+ <string>Horizontal space of the phantom content</string>
+ </property>
+ <property name="text" >
+ <string>&Horiz. Phantom</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="vphantomRB" >
+ <property name="toolTip" >
+ <string>Vertical space of the phantom content</string>
+ </property>
+ <property name="text" >
+ <string>&Vert. Phantom</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>phantomRB</tabstop>
+ <tabstop>vphantomRB</tabstop>
+ <tabstop>vphantomRB</tabstop>
+ <tabstop>okPB</tabstop>
+ <tabstop>closePB</tabstop>
+ </tabstops>
+ <includes>
+ <include location="local" >qt_i18n.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>