From f6aaac088c411f6d03bab73695b14a5441ea85b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Mon, 12 Feb 2001 14:09:09 +0000 Subject: [PATCH] formskdepatchthingie git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1486 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 8 + Makefile.am | 9 +- autogen.sh | 41 +- boost/Makefile.am | 4 +- boost/boost/array.hpp | 22 +- boost/boost/config.hpp | 178 ++++- config/qt2.m4 | 16 +- configure.in | 4 +- forms/bibforms.h.patch | 32 - forms/lyx.fd | 44 +- po/POTFILES.in | 40 +- src/BufferView_pimpl.C | 6 +- src/ChangeLog | 26 + src/LyXAction.C | 2 +- src/bibforms.h | 16 - src/commandtags.h | 3 +- src/counters.h | 2 +- src/frontends/ChangeLog | 7 + src/frontends/DialogBase.h | 2 + src/frontends/Dialogs.h | 18 +- src/frontends/kde/ChangeLog | 25 + src/frontends/kde/Dialogs.C | 105 +-- src/frontends/kde/FormCitation.C | 112 +-- src/frontends/kde/FormCitation.h | 56 +- src/frontends/kde/FormCopyright.C | 31 +- src/frontends/kde/FormCopyright.h | 47 +- src/frontends/kde/FormDocument.C | 36 +- src/frontends/kde/FormDocument.h | 27 +- src/frontends/kde/FormIndex.C | 30 +- src/frontends/kde/FormIndex.h | 32 +- src/frontends/kde/FormLog.C | 104 +++ src/frontends/kde/FormLog.h | 55 ++ src/frontends/kde/FormParagraph.C | 65 +- src/frontends/kde/FormParagraph.h | 26 +- src/frontends/kde/FormPrint.C | 28 +- src/frontends/kde/FormPrint.h | 26 +- src/frontends/kde/FormRef.C | 46 +- src/frontends/kde/FormRef.h | 35 +- src/frontends/kde/FormTabularCreate.C | 27 +- src/frontends/kde/FormTabularCreate.h | 30 +- src/frontends/kde/FormToc.C | 59 +- src/frontends/kde/FormToc.h | 33 +- src/frontends/kde/FormUrl.C | 35 +- src/frontends/kde/FormUrl.h | 31 +- src/frontends/kde/FormVCLog.C | 100 +++ src/frontends/kde/FormVCLog.h | 55 ++ src/frontends/kde/GUIRunTime.C | 36 +- src/frontends/kde/Makefile.am | 15 + src/frontends/kde/QtLyXView.h | 15 +- src/frontends/kde/citationdlg.C | 28 +- src/frontends/kde/citationdlg.h | 97 ++- src/frontends/kde/copyrightdlg.C | 27 +- src/frontends/kde/copyrightdlg.h | 37 +- src/frontends/kde/dlg/Makefile.am | 3 + src/frontends/kde/dlg/README | 10 +- src/frontends/kde/dlg/copyrightdlgdata.C | 8 +- src/frontends/kde/dlg/copyrightdlgdata.h | 6 +- src/frontends/kde/dlg/dialogs/copyright.dlg | 4 +- src/frontends/kde/dlg/dialogs/doc.dlg | 48 +- src/frontends/kde/dlg/dialogs/docextra.dlg | 492 +++++++++--- src/frontends/kde/dlg/dialogs/docgeometry.dlg | 358 ++++----- src/frontends/kde/dlg/dialogs/docsettings.dlg | 712 ++++++++++++------ src/frontends/kde/dlg/dialogs/index.dlg | 2 +- src/frontends/kde/dlg/dialogs/log.dlg | 157 ++++ src/frontends/kde/dlg/dialogs/para.dlg | 48 +- src/frontends/kde/dlg/dialogs/paraabove.dlg | 6 +- src/frontends/kde/dlg/dialogs/parabelow.dlg | 6 +- src/frontends/kde/dlg/dialogs/paraextra.dlg | 156 ++-- src/frontends/kde/dlg/dialogs/parageneral.dlg | 263 ++----- src/frontends/kde/dlg/dialogs/print.dlg | 256 +++---- src/frontends/kde/dlg/dialogs/tabcreate.dlg | 4 +- src/frontends/kde/dlg/docbulletsdlgdata.C | 2 +- src/frontends/kde/dlg/docbulletsdlgdata.h | 2 +- src/frontends/kde/dlg/docdlgdata.C | 32 +- src/frontends/kde/dlg/docdlgdata.h | 8 +- src/frontends/kde/dlg/docextradlgdata.C | 404 +++++++--- src/frontends/kde/dlg/docextradlgdata.h | 11 +- src/frontends/kde/dlg/docgeometrydlgdata.C | 274 +++---- src/frontends/kde/dlg/docgeometrydlgdata.h | 14 +- src/frontends/kde/dlg/doclanguagedlgdata.C | 2 +- src/frontends/kde/dlg/doclanguagedlgdata.h | 2 +- src/frontends/kde/dlg/docsettingsdlgdata.C | 607 +++++++++------ src/frontends/kde/dlg/docsettingsdlgdata.h | 14 +- src/frontends/kde/dlg/emptytable.C | 5 +- src/frontends/kde/dlg/indexdlgdata.C | 6 +- src/frontends/kde/dlg/indexdlgdata.h | 6 +- src/frontends/kde/dlg/logdlgdata.C | 129 ++++ src/frontends/kde/dlg/logdlgdata.h | 49 ++ src/frontends/kde/dlg/moc/Makefile.am | 3 + src/frontends/kde/dlg/paraabovedlgdata.C | 8 +- src/frontends/kde/dlg/paraabovedlgdata.h | 2 +- src/frontends/kde/dlg/parabelowdlgdata.C | 8 +- src/frontends/kde/dlg/parabelowdlgdata.h | 2 +- src/frontends/kde/dlg/paradlgdata.C | 32 +- src/frontends/kde/dlg/paradlgdata.h | 8 +- src/frontends/kde/dlg/paraextradlgdata.C | 160 ++-- src/frontends/kde/dlg/paraextradlgdata.h | 10 +- src/frontends/kde/dlg/parageneraldlgdata.C | 236 ++---- src/frontends/kde/dlg/parageneraldlgdata.h | 13 +- src/frontends/kde/dlg/printdlgdata.C | 220 +++--- src/frontends/kde/dlg/printdlgdata.h | 16 +- src/frontends/kde/dlg/tabcreatedlgdata.C | 8 +- src/frontends/kde/dlg/tabcreatedlgdata.h | 6 +- src/frontends/kde/docdlg.C | 229 ++++-- src/frontends/kde/docdlg.h | 57 +- src/frontends/kde/indexdlg.C | 55 +- src/frontends/kde/indexdlg.h | 45 +- src/frontends/kde/logdlg.C | 49 ++ src/frontends/kde/logdlg.h | 35 + src/frontends/kde/moc/Makefile.am | 3 + src/frontends/kde/paradlg.C | 117 +-- src/frontends/kde/paradlg.h | 67 +- src/frontends/kde/paraextradlg.C | 44 +- src/frontends/kde/paraextradlg.h | 36 +- src/frontends/kde/parageneraldlg.C | 45 +- src/frontends/kde/parageneraldlg.h | 26 +- src/frontends/kde/printdlg.C | 19 +- src/frontends/kde/printdlg.h | 43 +- src/frontends/kde/refdlg.C | 31 +- src/frontends/kde/refdlg.h | 78 +- src/frontends/kde/tabcreatedlg.C | 17 +- src/frontends/kde/tabcreatedlg.h | 18 +- src/frontends/kde/tocdlg.C | 27 +- src/frontends/kde/tocdlg.h | 51 +- src/frontends/kde/urldlg.C | 27 +- src/frontends/kde/urldlg.h | 56 +- src/frontends/qt2/FormCopyrightDialogBase.C | 2 +- src/frontends/qt2/Makefile.am | 88 ++- src/frontends/xforms/ChangeLog | 29 + src/frontends/xforms/Dialogs.C | 8 + src/frontends/xforms/FormBase.h | 2 +- src/frontends/xforms/FormBibitem.C | 126 ++++ src/frontends/xforms/FormBibitem.h | 48 ++ src/frontends/xforms/FormBibtex.C | 125 +++ src/frontends/xforms/FormBibtex.h | 48 ++ src/frontends/xforms/FormInclude.C | 211 ++++++ src/frontends/xforms/FormInclude.h | 61 ++ src/frontends/xforms/FormSplash.C | 128 ++++ src/frontends/xforms/FormSplash.h | 46 ++ src/frontends/xforms/Makefile.am | 16 + src/frontends/xforms/form_bibitem.C | 59 ++ src/frontends/xforms/form_bibitem.h | 24 + src/frontends/xforms/form_bibtex.C | 59 ++ src/frontends/xforms/form_bibtex.h | 24 + src/frontends/xforms/form_include.C | 104 +++ src/frontends/xforms/form_include.h | 31 + src/frontends/xforms/form_splash.C | 38 + src/frontends/xforms/form_splash.h | 19 + .../frontends/xforms/forms/form_bibitem.fd | 24 +- src/frontends/xforms/forms/form_bibtex.fd | 106 +++ .../frontends/xforms/forms/form_include.fd | 26 +- src/frontends/xforms/forms/form_splash.fd | 52 ++ src/frontends/xforms/forms/makefile | 6 +- src/graphics/GraphicsCacheItem_pimpl.C | 4 +- src/include_form.h | 28 - src/insets/ChangeLog | 6 + src/insets/insetbib.C | 155 +--- src/insets/insetbib.h | 3 - src/insets/insetinclude.C | 207 +---- src/lyx.C | 18 - src/lyx.h | 11 - src/lyx_cb.C | 18 - src/lyx_gui.C | 54 +- src/lyx_gui_misc.C | 30 - src/lyxfunc.C | 32 +- src/lyxvc.h | 6 +- src/support/lyxfunctional.h | 1 + src/vspace.C | 21 +- 168 files changed, 6283 insertions(+), 3825 deletions(-) delete mode 100644 forms/bibforms.h.patch delete mode 100644 src/bibforms.h create mode 100644 src/frontends/kde/FormLog.C create mode 100644 src/frontends/kde/FormLog.h create mode 100644 src/frontends/kde/FormVCLog.C create mode 100644 src/frontends/kde/FormVCLog.h create mode 100644 src/frontends/kde/dlg/dialogs/log.dlg create mode 100644 src/frontends/kde/dlg/logdlgdata.C create mode 100644 src/frontends/kde/dlg/logdlgdata.h create mode 100644 src/frontends/kde/logdlg.C create mode 100644 src/frontends/kde/logdlg.h create mode 100644 src/frontends/xforms/FormBibitem.C create mode 100644 src/frontends/xforms/FormBibitem.h create mode 100644 src/frontends/xforms/FormBibtex.C create mode 100644 src/frontends/xforms/FormBibtex.h create mode 100644 src/frontends/xforms/FormInclude.C create mode 100644 src/frontends/xforms/FormInclude.h create mode 100644 src/frontends/xforms/FormSplash.C create mode 100644 src/frontends/xforms/FormSplash.h create mode 100644 src/frontends/xforms/form_bibitem.C create mode 100644 src/frontends/xforms/form_bibitem.h create mode 100644 src/frontends/xforms/form_bibtex.C create mode 100644 src/frontends/xforms/form_bibtex.h create mode 100644 src/frontends/xforms/form_include.C create mode 100644 src/frontends/xforms/form_include.h create mode 100644 src/frontends/xforms/form_splash.C create mode 100644 src/frontends/xforms/form_splash.h rename forms/bibforms.fd => src/frontends/xforms/forms/form_bibitem.fd (88%) create mode 100644 src/frontends/xforms/forms/form_bibtex.fd rename forms/include_form.fd => src/frontends/xforms/forms/form_include.fd (94%) create mode 100644 src/frontends/xforms/forms/form_splash.fd delete mode 100644 src/include_form.h diff --git a/ChangeLog b/ChangeLog index fb3c28a93b..a5e2f5c381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-02-12 John Levon + + * forms/include_form.fd: + * forms/bibforms.fd: + * forms/bibforms.h.patch: deleted + + * forms/lyx.fd: remove splash form + 2001-02-08 John Levon * INSTALL: mention RH7.0 workaround with kde f.e. diff --git a/Makefile.am b/Makefile.am index 164a9468ec..4760fe08e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,10 +50,11 @@ bindist: @echo "*** $(bindistfile) has been created." -sourcedoc: - mkdir sourcedoc - cd sourcedoc ; \ - doc++ -p `find ../$(top_srcdir)/src -name \*.h` +sourcedoc: + cd sourcedoc; \ + doxygen ./Doxyfile lgbtags: etags --totals=yes --recurse=yes -o TAGS $(top_srcdir)/* + +.PHONY: sourcedoc diff --git a/autogen.sh b/autogen.sh index ff42367219..2ac582734a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,7 +22,7 @@ fi # Generate acinclude.m4 echo -n "Generate acinclude.m4... " -rm -f acinclude.m4 sigc++/acinclude.m4 +rm -f acinclude.m4 sigc++/acinclude.m4 boost/acinclude.m4 touch acinclude.m4 for fil in config/lyxinclude.m4 config/libtool.m4 config/gettext.m4 config/lcmessage.m4 config/progtest.m4 config/sigc++.m4 config/kde.m4 config/qt2.m4 config/gtk--.m4 config/gnome--.m4 config/gnome.m4 config/pspell.m4; do cat $fil >> acinclude.m4 @@ -31,12 +31,21 @@ touch sigc++/acinclude.m4 for fil in config/libtool.m4 ; do cat $fil >> sigc++/acinclude.m4 done +touch boost/acinclude.m4 +for fil in config/boost.m4 ; do + cat $fil >> boost/acinclude.m4 +done echo "done." # Generate the Makefiles and configure files if ( aclocal --version ) /dev/null 2>&1; then - echo -n "Building macros... " - $ACLOCAL ; ( cd lib/reLyX; $ACLOCAL ) ; ( cd sigc++; $ACLOCAL ) + echo "Building macros..." + for dir in . lib/reLyX sigc++ boost ; do + echo -e "\t$dir" + ( cd $dir ; $ACLOCAL ) + done +# $ACLOCAL ; ( cd lib/reLyX; $ACLOCAL ) ; ( cd sigc++; $ACLOCAL ) +# ( cd boost; $ACLOCAL ) echo "done." else echo "aclocal not found -- aborting" @@ -44,8 +53,12 @@ else fi if ( autoheader --version ) /dev/null 2>&1; then - echo -n "Building config header template... " - $AUTOHEADER ; ( cd sigc++; $AUTOHEADER ) + echo "Building config header template..." + for dir in . sigc++ boost ; do + echo -e "\t$dir" + ( cd $dir ; $AUTOHEADER ) + done +# $AUTOHEADER ; ( cd sigc++; $AUTOHEADER ) ; ( cd boost; $AUTOHEADER ) echo "done." else echo "autoheader not found -- aborting" @@ -53,8 +66,13 @@ else fi if ( $AUTOMAKE --version ) /dev/null 2>&1; then - echo -n "Building Makefile templates... " - $AUTOMAKE ; ( cd lib/reLyX ; $AUTOMAKE ) ; ( cd sigc++; $AUTOMAKE ) + echo "Building Makefile templates..." + for dir in . lib/reLyX sigc++ boost ; do + echo -e "\t$dir" + ( cd $dir ; $AUTOMAKE ) + done +# $AUTOMAKE ; ( cd lib/reLyX ; $AUTOMAKE ) ; ( cd sigc++; $AUTOMAKE ) +# ( cd boost; $AUTOMAKE ) echo "done." else echo "automake not found -- aborting" @@ -62,8 +80,13 @@ else fi if ( $AUTOCONF --version ) /dev/null 2>&1; then - echo -n "Building configure... " - $AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF ) ; ( cd sigc++; $AUTOCONF ) + echo "Building configure..." + for dir in . lib/reLyX sigc++ boost ; do + echo -e "\t$dir" + ( cd $dir ; $AUTOCONF ) + done +# $AUTOCONF ; ( cd lib/reLyX ; $AUTOCONF ) ; ( cd sigc++; $AUTOCONF ) +# ( cd boost; $AUTOCONF ) echo "done." else echo "autoconf not found -- aborting" diff --git a/boost/Makefile.am b/boost/Makefile.am index 6a241be849..60d517510d 100644 --- a/boost/Makefile.am +++ b/boost/Makefile.am @@ -1,7 +1,7 @@ AUTOMAKE_OPTIONS = foreign DISTCLEANFILES= *.orig *.rej *~ *.bak core MAINTAINERCLEANFILES= $(srcdir)/Makefile.in -# SUBDIRS = libs boost +SUBDIRS = libs ETAGS_ARGS = --lang=c++ -EXTRA_DIST = boost libs +EXTRA_DIST = boost diff --git a/boost/boost/array.hpp b/boost/boost/array.hpp index 0b16c39643..5d14869d35 100644 --- a/boost/boost/array.hpp +++ b/boost/boost/array.hpp @@ -11,7 +11,8 @@ * This software is provided "as is" without express or implied * warranty, and with no claim as to its suitability for any purpose. * - * Jul 31, 2000 + * 20 Jan 2001 - STLport fix (Beman Dawes) + * 29 Sep 2000 - Initial Revision (Nico Josuttis) */ #ifndef BOOST_ARRAY_HPP #define BOOST_ARRAY_HPP @@ -21,9 +22,7 @@ #include #include -// BUG-FIX for compilers that don't support -// std::size_t and std::ptrdiff_t yet -// (such as gcc) +// FIXES for broken compilers #include // LGB @@ -51,14 +50,14 @@ const_iterator end() const { return elems+N; } // reverse iterator support -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; -# else - // workaround for broken reverse_iterator implementations due to no partial specialization +#else + // workaround for broken reverse_iterator implementations typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; -# endif +#endif reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { @@ -89,7 +88,6 @@ static size_type max_size() { return N; } enum { static_size = N }; - public: // swap (note: linear complexity) void swap (array& y) { std::swap_ranges(begin(),end(),y.begin()); @@ -111,10 +109,10 @@ std::fill_n(begin(),size(),value); } -# ifndef BOOST_NO_PRIVATE_IN_AGGREGATE +#ifndef BOOST_NO_PRIVATE_IN_AGGREGATE private: -# endif - // private member functions are allowed in aggregates [ISO 8.5.1] +#endif + // check range (may be private because it is static) static void rangecheck (size_type i) { if (i >= size()) { throw std::range_error("array"); } } diff --git a/boost/boost/config.hpp b/boost/boost/config.hpp index 867d39a806..334c6f532e 100644 --- a/boost/boost/config.hpp +++ b/boost/boost/config.hpp @@ -11,6 +11,15 @@ // http://www.boost.org/libs/config // Revision History (excluding minor changes for specific compilers) +// 20 Jan 01 BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS moved here from +// cast.hpp. Added missing BOOST_NO_STRINGSTREAM which some +// boost code seemed to depend on. (Dave Abrahams) +// 13 Jan 01 SGI MIPSpro and Compaq Tru64 Unix compiler support added +// (Jens Maurer) +// 13 Jan 01 BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP (Jens Maurer) +// 17 Nov 00 BOOST_NO_AUTO_PTR (John Maddock) +// 4 Oct 00 BOOST_NO_STD_MIN_MAX (Jeremy Siek) +// 29 Sep 00 BOOST_NO_INTEGRAL_INT64_T (Jens Maurer) // 25 Sep 00 BOOST_NO_STD_ALLOCATOR (Jeremy Siek) // 18 SEP 00 BOOST_NO_SLIST, BOOST_NO_HASH, // BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS @@ -50,12 +59,25 @@ // burden where it should be, on non-conforming compilers. In the future, // hopefully, less rather than more conformance flags will have to be defined. +// BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP: Compiler does not implement +// argument-dependent lookup (also named Koenig lookup); see std::3.4.2 +// [basic.koenig.lookup] + // BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS: Template value // parameters cannot have a dependent type, for example // "template class X { ... };" // BOOST_NO_INCLASS_MEMBER_INITIALIZATION: Compiler violates std::9.4.2/4. +// BOOST_NO_INT64_T: does not support 64-bit integer +// types. (Set by rather than ). + +// BOOST_NO_INTEGRAL_INT64_T: int64_t as defined by is +// not an integral type. + +// BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS: constants such as +// numeric_limits::is_signed are not available for use at compile-time. + // BOOST_NO_MEMBER_TEMPLATES: Member template functions not fully supported. // Also see BOOST_MSVC6_MEMBER_TEMPLATES in the Compiler Control section below. @@ -99,6 +121,9 @@ // that imports a template from the global namespace into a named namespace. // Probably Borland specific. +// BOOST_NO_AUTO_PTR: If the compiler / library supplies non-standard or broken +// std::auto_ptr. + // Compiler Control or Information Macros ----------------------------------// // // Compilers often supply features outside of the C++ Standard which need to be @@ -107,12 +132,19 @@ // BOOST_DECL: Certain compilers for Microsoft operating systems require // non-standard class and function decoration if dynamic load library linking -// is desired. BOOST_DECL supplies that decoration, defaulting to a nul string -// so that it is harmless when not required. Boost does not encourage the use -// of BOOST_DECL - it is non-standard and to be avoided if practical to do so. - -// BOOST_DECL_EXPORTS: User defined, BOOST_DECL_EXPORTS causes BOOST_DECL to -// be defined as __declspec(dllexport) rather than __declspec(dllimport). +// is desired. BOOST_DECL supplies that decoration. Boost does not require +// use of BOOST_DECL - it is non-standard and to be avoided if practical to do +// so. Even compilers requiring it for DLL's only require it in certain cases. +// +// BOOST_DECL_EXPORTS: User defined, usually via command line or IDE, +// it causes BOOST_DECL to be defined as __declspec(dllexport). +// +// BOOST_DECL_IMPORTS: User defined, usually via command line or IDE, +// it causes BOOST_DECL to be defined as __declspec(dllimport). +// +// If neither BOOST_DECL_EXPORTS nor BOOST_DECL_IMPORTS is defined, or if +// the compiler does not require __declspec() decoration, BOOST_DECL is +// defined as a null string. // BOOST_MSVC6_MEMBER_TEMPLATES: Microsoft Visual C++ 6.0 has enough member // template idiosyncrasies (being polite) that BOOST_NO_MEMBER_TEMPLATES is @@ -138,9 +170,14 @@ // BOOST_NO_SLIST: The C++ implementation does not provide the slist class. +// BOOST_NO_STRINGSTREAM: The C++ implementation does not provide the header. + // BOOST_NO_HASH: The C++ implementation does not provide the hash_set // or hash_map classes. +// BOOST_STD_EXTENSION_NAMESPACE: The name of the namespace in which the slist, +// hash_set and/or hash_map templates are defined in this implementation (if any). + // BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS: The standard library does not provide // templated iterator constructors for its containers. @@ -154,33 +191,71 @@ // BOOST_NO_STD_ALLOCATOR: The C++ standard library does not provide // a standards conforming std::allocator. +// BOOST_NO_STD_MIN_MAX: The C++ standard library does not provide +// the min() and max() template functions that should be in . + // Compilers are listed in alphabetic order (except VC++ last - see below)---// // GNU CC (also known as GCC and G++) --------------------------------------// # if defined __GNUC__ +# if __GNUC__ == 2 && __GNUC_MINOR__ == 91 + // egcs 1.1 won't parse smart_ptr.hpp without this: +# define BOOST_NO_AUTO_PTR +# endif # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 # include // not sure this is the right way to do this -JGS # if !defined(_CXXRT_STD) && !defined(__SGI_STL) // need to ask Dietmar about this -JGS # define BOOST_NO_STD_ITERATOR # define BOOST_NO_LIMITS # endif +# if !defined(_CXXRT_STD) && !defined(__SGI_STL_OWN_IOSTREAMS) +# define BOOST_NO_STRINGSTREAM +# endif # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_OPERATORS_IN_NAMESPACE # endif # if __GNUC__ == 2 && __GNUC_MINOR__ <= 8 # define BOOST_NO_MEMBER_TEMPLATES # endif -// LGB -# if __GNUC__ == 2 && __GNUC_MINOR__ == 97 -# define BOOST_NO_STDC_NAMESPACE +# if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2 + // upcoming gcc 3.0 +# include +# if defined(__GLIBCPP__) + // The new GNU C++ library has slist, hash_map, hash_set headers + // in , but client code assumes they're in <*> --- Jens M. +# define BOOST_NO_SLIST +# define BOOST_NO_HASH +# endif # endif + // Kai C++ ------------------------------------------------------------------// #elif defined __KCC # define BOOST_NO_SLIST # define BOOST_NO_HASH +# if __KCC_VERSION <= 4001 + // at least on Sun, the contents of is not in namespace std +# define BOOST_NO_STDC_NAMESPACE +# endif + +// SGI MIPSpro C++ -------------------------------------------------------- + +#elif defined __sgi + +# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 240 +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# endif + +// Compaq Tru64 Unix cxx --------------------------------------------------- + +#elif defined __DECCXX + +# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 240 +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# endif + // Greenhills C++ -----------------------------------------------------------// #elif defined __ghs @@ -190,7 +265,10 @@ // Borland ------------------------------------------------------------------// #elif defined __BORLANDC__ +# define BOOST_NO_SLIST +# define BOOST_NO_HASH # if __BORLANDC__ <= 0x0551 +# define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_PRIVATE_IN_AGGREGATE # endif # if __BORLANDC__ <= 0x0550 @@ -203,9 +281,14 @@ # endif # endif # if defined BOOST_DECL_EXPORTS +# if defined BOOST_DECL_IMPORTS +# error Not valid to define both BOOST_DECL_EXPORTS and BOOST_DECL_IMPORTS +# endif # define BOOST_DECL __declspec(dllexport) -# else +# elif defined BOOST_DECL_IMPORTS # define BOOST_DECL __declspec(dllimport) +# else +# define BOOST_DECL # endif // Intel -------------------------------------------------------------------// @@ -224,6 +307,7 @@ # define BOOST_NO_HASH # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR +# define BOOST_NO_STD_MIN_MAX # endif @@ -240,14 +324,26 @@ # define BOOST_SYSTEM_HAS_STDINT_H # endif # if defined BOOST_DECL_EXPORTS +# if defined BOOST_DECL_IMPORTS +# error Not valid to define both BOOST_DECL_EXPORTS and BOOST_DECL_IMPORTS +# endif # define BOOST_DECL __declspec(dllexport) -# else +# elif defined BOOST_DECL_IMPORTS # define BOOST_DECL __declspec(dllimport) +# else +# define BOOST_DECL # endif +# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks + // Sun Workshop Compiler C++ ------------------------------------------------// # elif defined __SUNPRO_CC +# if __SUNPRO_CC <= 0x520 +# define BOOST_NO_SLIST +# define BOOST_NO_HASH +# define BOOST_NO_STD_ITERATOR_TRAITS +# endif # if __SUNPRO_CC <= 0x500 # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -268,7 +364,9 @@ # if _MSC_VER <= 1200 // 1200 == VC++ 6.0 # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_INTRINSIC_WCHAR_T // VC++ 6.0 has member templates but they have numerous problems including @@ -292,6 +390,17 @@ # define BOOST_NO_HASH # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR +# ifndef _CPPLIB_VER + // Updated Dinkum library defines this, and provides + // its own min and max definitions. +# define BOOST_NO_STD_MIN_MAX +# undef min +# undef max +# endif +# ifndef NOMINMAX + // avoid spurious NOMINMAX redefinition warning +# define NOMINMAX +# endif # endif # define BOOST_NO_STD_ITERATOR_TRAITS @@ -303,16 +412,21 @@ // Determine if the standard library implementation is already pulling names // into std. STLport defines the following if so. (Ed Brey 5 Jun 00) -# ifndef __STL_IMPORT_VENDOR_CSTD +# if !defined( __STL_IMPORT_VENDOR_CSTD ) || defined( __STL_NO_CSTD_FUNCTION_IMPORTS ) # define BOOST_NO_STDC_NAMESPACE # endif # endif # if defined BOOST_DECL_EXPORTS +# if defined BOOST_DECL_IMPORTS +# error Not valid to define both BOOST_DECL_EXPORTS and BOOST_DECL_IMPORTS +# endif # define BOOST_DECL __declspec(dllexport) -# else +# elif defined BOOST_DECL_IMPORTS # define BOOST_DECL __declspec(dllimport) +# else +# define BOOST_DECL # endif # endif // Microsoft (excluding Intel/EDG frontend) @@ -323,6 +437,23 @@ // end of compiler specific portion ----------------------------------------// +#if defined(BOOST_NO_LIMITS) || \ + (defined(_RWSTD_VER) && _RWSTD_VER < 0x0203) || \ + (defined(__SGI_STL_PORT) && __SGI_STL_PORT <= 0x410 && __STL_STATIC_CONST_INIT_BUG) +// STLPort 4.0 doesn't define the static constants in numeric_limits<> so that they +// can be used at compile time if the compiler bug indicated by +// __STL_STATIC_CONST_INIT_BUG is present. + +// Rogue wave STL (C++ Builder) also has broken numeric_limits +// with default template defining members out of line. +// However, Compaq C++ also uses RogueWave (version 2.03) and it's ok. +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#endif + +#ifndef BOOST_STD_EXTENSION_NAMESPACE +# define BOOST_STD_EXTENSION_NAMESPACE std +#endif + // Check for old name "BOOST_NMEMBER_TEMPLATES" for compatibility -----------// // Don't use BOOST_NMEMBER_TEMPLATES. It is deprecated and will be removed soon. #if defined( BOOST_NMEMBER_TEMPLATES ) && !defined( BOOST_NO_MEMBER_TEMPLATES ) @@ -345,5 +476,26 @@ // using ::wchar_t; removed since wchar_t is a C++ built-in type (Ed Brey) # endif +#ifdef BOOST_NO_STD_MIN_MAX +namespace std { + template + inline const _Tp& min(const _Tp& __a, const _Tp& __b) { + return __b < __a ? __b : __a; + } + template + inline const _Tp& max(const _Tp& __a, const _Tp& __b) { + return __a < __b ? __b : __a; + } +#ifdef BOOST_MSVC + inline long min(long __a, long __b) { + return __b < __a ? __b : __a; + } + inline long max(long __a, long __b) { + return __a < __b ? __b : __a; + } +#endif +} +#endif #endif // BOOST_CONFIG_HPP + diff --git a/config/qt2.m4 b/config/qt2.m4 index 3de5fd30d7..d973e9dca9 100644 --- a/config/qt2.m4 +++ b/config/qt2.m4 @@ -83,6 +83,17 @@ AC_DEFUN(QT2_FIND_PATH, fi ]) +dnl ------------------------------------------------------------------------ +dnl Find the UIC compiler if available +dnl ------------------------------------------------------------------------ +AC_DEFUN(QT2_AC_PATH_UIC, +[ + QT2_FIND_PATH(uic, UIC, [$ac_qt2_bindir $QTDIR/bin \ + /usr/bin /usr/X11R6/bin /usr/lib/qt2/bin \ + /usr/local/qt2/bin /usr/local/qt/bin /usr/lib/qt/bin], ) + AC_SUBST(UIC) +]) + dnl ------------------------------------------------------------------------ dnl Find the meta object compiler in the PATH, in $QTDIR/bin, and some dnl more usual places @@ -184,6 +195,7 @@ AC_MSG_CHECKING([for Qt 2]) ac_qt2_includes=NO ac_qt2_libraries=NO ac_qt2_bindir=NO qt2_libraries="" qt2_includes="" + AC_ARG_WITH(qt2-dir, [ --with-qt2-dir where the root of Qt2 is installed ], [ ac_qt2_includes="$withval"/include @@ -294,7 +306,6 @@ QT2_CHECK_DIRECT(qt2_libraries= ,[]) fi dnl check it is Qt2 -dnl FIXME: what minor version do we require ??? SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -I$qt2_includes -L$qt2_libraries" @@ -304,7 +315,7 @@ AC_TRY_COMPILE([ #include ], [ -#if (QT_VERSION < 200) +#if (QT_VERSION < 223) break_me_(\\\); #endif ], @@ -337,6 +348,7 @@ AC_SUBST(QT2_INCLUDES) AC_SUBST(QT2_LDFLAGS) AC_SUBST(QT2_LIBS) QT2_AC_PATH_MOC +QT2_AC_PATH_UIC ]) AC_DEFUN(QT2_DO_IT_ALL, diff --git a/configure.in b/configure.in index a531153ce6..677b924a9a 100644 --- a/configure.in +++ b/configure.in @@ -294,13 +294,13 @@ if test "x$enable_assertions" = xyes ; then fi ### Finish the work. -AC_CONFIG_SUBDIRS(sigc++ lib lib/reLyX) +AC_CONFIG_SUBDIRS(boost sigc++ lib lib/reLyX) AC_OUTPUT([Makefile \ development/lyx.spec \ lib/Makefile \ intl/Makefile \ po/Makefile.in \ - boost/Makefile \ + sourcedoc/Doxyfile \ src/Makefile \ src/mathed/Makefile \ src/graphics/Makefile \ diff --git a/forms/bibforms.h.patch b/forms/bibforms.h.patch deleted file mode 100644 index c3941616fc..0000000000 --- a/forms/bibforms.h.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- bibforms.h Tue Oct 7 21:30:55 1997 -+++ ../src/bibforms.h Tue Oct 7 19:57:53 1997 -@@ -2,12 +2,6 @@ - #define FD_citation_form_h_ - /* Header file generated with fdesign. */ - --/**** Callback routines ****/ -- --extern void bibitem_cb(FL_OBJECT *, long); -- --extern void bibitem_cb(FL_OBJECT *, long); -- - - /**** Forms and Objects ****/ - -@@ -19,7 +13,7 @@ - FL_OBJECT *label; - } FD_citation_form; - --extern FD_citation_form * create_form_citation_form(void); -+ - typedef struct { - FL_FORM *bibitem_form; - void *vdata; -@@ -27,7 +21,5 @@ - FL_OBJECT *key; - FL_OBJECT *label; - } FD_bibitem_form; -- --extern FD_bibitem_form * create_form_bibitem_form(void); - - #endif /* FD_citation_form_h_ */ diff --git a/forms/lyx.fd b/forms/lyx.fd index 6914a1d961..6756b5d736 100644 --- a/forms/lyx.fd +++ b/forms/lyx.fd @@ -3,51 +3,9 @@ Magic: 13000 Internal Form Definition File (do not change) -Number of forms: 3 +Number of forms: 2 Unit of measure: FL_COORD_PIXEL -=============== FORM =============== -Name: form_title -Width: 420 -Height: 290 -Number of Objects: 2 - --------------------- -class: FL_BOX -type: UP_BOX -box: 0 0 420 290 -boxtype: FL_UP_BOX -colors: FL_BLACK FL_TOP_BCOL -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - --------------------- -class: FL_TIMER -type: HIDDEN_TIMER -box: 110 170 190 60 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_RED -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: timer_title -callback: TimerCB -argument: 0 - =============== FORM =============== Name: form_figure Width: 340 diff --git a/po/POTFILES.in b/po/POTFILES.in index 28523b982e..97ee17de5f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -34,6 +34,7 @@ src/frontends/kde/dlg/doclanguagedlgdata.C src/frontends/kde/dlg/docsettingsdlgdata.C src/frontends/kde/dlg/indexdlgdata.C src/frontends/kde/dlg/lengthentry.C +src/frontends/kde/dlg/logdlgdata.C src/frontends/kde/dlg/paraabovedlgdata.C src/frontends/kde/dlg/parabelowdlgdata.C src/frontends/kde/dlg/paradlgdata.C @@ -46,12 +47,14 @@ src/frontends/kde/FormCitation.C src/frontends/kde/FormCopyright.C src/frontends/kde/FormDocument.C src/frontends/kde/FormIndex.C +src/frontends/kde/FormLog.C src/frontends/kde/FormParagraph.C src/frontends/kde/FormPrint.C src/frontends/kde/FormRef.C src/frontends/kde/FormTabularCreate.C src/frontends/kde/FormToc.C src/frontends/kde/FormUrl.C +src/frontends/kde/FormVCLog.C src/frontends/kde/indexdlg.C src/frontends/kde/paradlg.C src/frontends/kde/paraextradlg.C @@ -62,38 +65,47 @@ src/frontends/kde/tabcreatedlg.C src/frontends/kde/tocdlg.C src/frontends/kde/urldlg.C src/frontends/qt2/FormCopyright.C +src/frontends/qt2/FormParagraph.C +src/frontends/qt2/FormPrint.C +src/frontends/qt2/FormTabularCreate.C +src/frontends/qt2/paragraphdlgimpl.C +src/frontends/qt2/tabularcreatedlgimpl.C src/frontends/xforms/FormBase.h +src/frontends/xforms/FormBibitem.C +src/frontends/xforms/form_bibitem.C +src/frontends/xforms/FormBibtex.C +src/frontends/xforms/form_bibtex.C src/frontends/xforms/form_browser.C -src/frontends/xforms/FormCitation.C src/frontends/xforms/form_citation.C -src/frontends/xforms/FormCopyright.C +src/frontends/xforms/FormCitation.C src/frontends/xforms/form_copyright.C -src/frontends/xforms/FormDocument.C +src/frontends/xforms/FormCopyright.C src/frontends/xforms/form_document.C -src/frontends/xforms/FormError.C +src/frontends/xforms/FormDocument.C src/frontends/xforms/form_error.C -src/frontends/xforms/FormGraphics.C +src/frontends/xforms/FormError.C src/frontends/xforms/form_graphics.C -src/frontends/xforms/FormIndex.C +src/frontends/xforms/FormGraphics.C src/frontends/xforms/form_index.C +src/frontends/xforms/FormIndex.C src/frontends/xforms/FormInset.h src/frontends/xforms/FormLog.C -src/frontends/xforms/FormParagraph.C src/frontends/xforms/form_paragraph.C -src/frontends/xforms/FormPreferences.C +src/frontends/xforms/FormParagraph.C src/frontends/xforms/form_preferences.C -src/frontends/xforms/FormPrint.C +src/frontends/xforms/FormPreferences.C src/frontends/xforms/form_print.C -src/frontends/xforms/FormRef.C +src/frontends/xforms/FormPrint.C src/frontends/xforms/form_ref.C -src/frontends/xforms/FormTabular.C +src/frontends/xforms/FormRef.C src/frontends/xforms/form_tabular.C -src/frontends/xforms/FormTabularCreate.C +src/frontends/xforms/FormTabular.C src/frontends/xforms/form_tabular_create.C -src/frontends/xforms/FormToc.C +src/frontends/xforms/FormTabularCreate.C src/frontends/xforms/form_toc.C -src/frontends/xforms/FormUrl.C +src/frontends/xforms/FormToc.C src/frontends/xforms/form_url.C +src/frontends/xforms/FormUrl.C src/frontends/xforms/FormVCLog.C src/frontends/xforms/input_validators.C src/frontends/xforms/Menubar_pimpl.C diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 5162dc6110..0f049d25c9 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -43,7 +43,6 @@ bool selection_possible = false; extern BufferList bufferlist; extern char ascii_type; -extern "C" void TimerCB(FL_OBJECT *, long); extern void sigchldhandler(pid_t pid, int * status); extern int bibitemMaxWidth(BufferView *, LyXFont const &); @@ -312,9 +311,8 @@ int BufferView::Pimpl::resizeCurrentBuffer() bv_->setState(); AllowInput(bv_); - // Now if the title form still exist kill it - TimerCB(0, 0); - + owner_->getDialogs()->hideSplash(); + return 0; } diff --git a/src/ChangeLog b/src/ChangeLog index f910fa6b61..f7eed40965 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2001-02-12 John Levon + + * BufferView_pimpl.C: call hideSplash() + + * LyXAction.C: make buffer-child-insert use LFUN_CHILD_CREATE + + * include_form.h: + * bibforms.h: remove + + * lyxfunc.C: + * src/commandtags.h: LFUN_CHILDINSERT -> LFUN_CHILD_INSERT, + add LFUN_CHILD_CREATE + + * counters.h: fix tiny typo + + * lyx_cb.C: + * lyx.h: + * lyx_gui.C: + * lyx.C: move splash to frontends/xforms/ + + * lyx_gui_misc.C: move Include and Bibform to frontends + + * lyxvc.h: clarify comment + + * vspace.C: tiny housekeeping + 2001-02-10 Dekel Tsur * text.C (PrepareToPrint): RTL Fix. diff --git a/src/LyXAction.C b/src/LyXAction.C index 84617186b7..f6313f3b5e 100644 --- a/src/LyXAction.C +++ b/src/LyXAction.C @@ -119,7 +119,7 @@ void LyXAction::init() N_("Go to beginning of document"), ReadOnly }, { LFUN_BEGINNINGBUFSEL, "buffer-begin-select", N_("Select to beginning of document"), ReadOnly }, - { LFUN_CHILDINSERT, "buffer-child-insert", "", Noop }, + { LFUN_CHILD_CREATE, "buffer-child-insert", "", Noop }, { LFUN_CHILDOPEN, "buffer-child-open", "", ReadOnly }, { LFUN_RUNCHKTEX, "buffer-chktex", N_("Check TeX"), ReadOnly }, { LFUN_CLOSEBUFFER, "buffer-close", N_("Close"), ReadOnly }, diff --git a/src/bibforms.h b/src/bibforms.h deleted file mode 100644 index 88ad552bf8..0000000000 --- a/src/bibforms.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef FD_bibitem_form_h_ -#define FD_bibitem_form_h_ -/* Header file generated with fdesign. */ - - -/**** Forms and Objects ****/ - -struct FD_bibitem_form { - FL_FORM *bibitem_form; - void *vdata; - long ldata; - FL_OBJECT *key; - FL_OBJECT *label; -}; - -#endif /* FD_bibitem_form_h_ */ diff --git a/src/commandtags.h b/src/commandtags.h index 1bbc5a385e..7f827c750b 100644 --- a/src/commandtags.h +++ b/src/commandtags.h @@ -202,7 +202,7 @@ enum kb_action { LFUN_LAYOUT_COPY, // Asger 1997-05-04 LFUN_LAYOUT_PASTE, // Asger 1997-05-04 LFUN_TABINSERT, // 180 // Ale 970515 - LFUN_CHILDINSERT, // Ale 970521 + LFUN_CHILD_INSERT, // Ale 970521 LFUN_CHILDOPEN, // Ale 970528 LFUN_TOC_INSERT, // Lgb 97-05-27 LFUN_LOA_INSERT, // Bernhard 97-08-07 @@ -276,6 +276,7 @@ enum kb_action { LFUN_REFERENCE_GOTO, // Dekel 20010114 LFUN_BOOKMARK_SAVE, // Dekel 20010127 LFUN_BOOKMARK_GOTO, // Dekel 20010127 + LFUN_CHILD_CREATE, // Levon 20010207 LFUN_LASTACTION /* this marks the end of the table */ }; diff --git a/src/counters.h b/src/counters.h index fcfeef73dc..fc0e82a2ac 100644 --- a/src/counters.h +++ b/src/counters.h @@ -12,7 +12,7 @@ #ifndef COUNTERS_H -#define COUTNERS_H +#define COUNTERS_H #ifdef __GNUG__ #pragma interface diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index 5ee907d7ba..664f1bca8f 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,10 @@ +2001-02-12 John Levon + + * DialogBase.C: add close(), non-pure. This is + useful for logdlg.C in the KDE frontend. + + * Dialogs.h: splash, include, and bib forms + 2001-02-07 John Levon * ButtonPolicies.C: diff --git a/src/frontends/DialogBase.h b/src/frontends/DialogBase.h index 07fa8732cd..126968b4c5 100644 --- a/src/frontends/DialogBase.h +++ b/src/frontends/DialogBase.h @@ -52,6 +52,8 @@ public: virtual void hide() = 0; /// virtual void update() {}; + /// + virtual void close() {}; //@} }; diff --git a/src/frontends/Dialogs.h b/src/frontends/Dialogs.h index 1e66fd118b..94fc479904 100644 --- a/src/frontends/Dialogs.h +++ b/src/frontends/Dialogs.h @@ -84,10 +84,10 @@ public: //@{ /// Do we really have to push this? Signal1 const &> SetDocumentClassChoice; - /// - Signal1 showBibkey; - /// - Signal1 showBibtex; + /// show the key and label of a bibliography entry + Signal1 showBibitem; + /// show the bibtex dialog + Signal1 showBibtex; /// Signal0 showCharacter; /// @@ -102,8 +102,10 @@ public: Signal1 showError; /// Signal1 showGraphics; - /// - Signal1 showInclude; + /// show the details of a LyX file include inset + Signal1 showInclude; + /// create a LyX file include inset + Signal1 createInclude; /// Signal1 showIndex; /// @@ -128,6 +130,10 @@ public: Signal1 showRef; /// Signal1 createRef; + /// pop up the splash + Signal0 showSplash; + /// hide the splash immediately + Signal0 hideSplash; /// Signal1 showTabular; /// diff --git a/src/frontends/kde/ChangeLog b/src/frontends/kde/ChangeLog index 478e2db474..3540d4989a 100644 --- a/src/frontends/kde/ChangeLog +++ b/src/frontends/kde/ChangeLog @@ -1,3 +1,28 @@ +2001-02-12 John Levon + + * : move to house style + + * Dialogs.C: add bib, splash, include, logs + + * dlg/README: update + + * Makefile.am: + * FormLog.C: + * FormLog.h: + * FormVCLog.C: + * FormVCLog.h: + * logdlg.C: + * logdlg.h: + * dlg/logdlgdata.C: + * dlg/logdlgdata.h: + * dlg/dialogs/log.dlg: new Log and VCLog dialogs + + * dlg/dialogs/para*.dlg: fix tab order + + * docdlg.C: + * docdlg.h: + * dlg/dialogs/doc*.dlg: tab order, UI improvements + 2001-02-07 John Levon * Timeout_pimpl.h: diff --git a/src/frontends/kde/Dialogs.C b/src/frontends/kde/Dialogs.C index 7c3eddc345..d2e932df8f 100644 --- a/src/frontends/kde/Dialogs.C +++ b/src/frontends/kde/Dialogs.C @@ -1,21 +1,36 @@ +/** + * \file Dialogs.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Jürgen Vigna + * \author John Levon + */ + #include #include FORMS_H_LOCATION #include "Dialogs.h" +#include "FormBibitem.h" +#include "FormBibtex.h" #include "FormCitation.h" #include "FormCopyright.h" #include "FormDocument.h" #include "FormError.h" #include "FormGraphics.h" +#include "FormInclude.h" #include "FormIndex.h" +#include "FormLog.h" #include "FormParagraph.h" #include "FormPreferences.h" #include "FormPrint.h" #include "FormRef.h" +#include "FormSplash.h" #include "FormTabular.h" #include "FormTabularCreate.h" #include "FormToc.h" #include "FormUrl.h" +#include "FormVCLog.h" #ifdef __GNUG__ #pragma implementation @@ -24,27 +39,33 @@ // temporary till ported extern void ShowCredits(); -// Signal enabling all visible popups to be redrawn if so desired. -// E.g., when the GUI colours have been remapped. This will probably -// work out different when xforms is gone +/* We don't implement this, but it's needed whilst we + * still rely on xforms + */ Signal0 Dialogs::redrawGUI; Dialogs::Dialogs(LyXView * lv) { + dialogs_.push_back(new FormBibitem(lv, this)); + dialogs_.push_back(new FormBibtex(lv, this)); dialogs_.push_back(new FormCitation(lv, this)); dialogs_.push_back(new FormCopyright(lv, this)); dialogs_.push_back(new FormDocument(lv, this)); dialogs_.push_back(new FormError(lv, this)); dialogs_.push_back(new FormGraphics(lv, this)); + dialogs_.push_back(new FormInclude(lv, this)); dialogs_.push_back(new FormIndex(lv, this)); + dialogs_.push_back(new FormLog(lv, this)); dialogs_.push_back(new FormParagraph(lv, this)); dialogs_.push_back(new FormPreferences(lv, this)); dialogs_.push_back(new FormPrint(lv, this)); dialogs_.push_back(new FormRef(lv, this)); + dialogs_.push_back(new FormSplash(lv, this)); dialogs_.push_back(new FormTabular(lv, this)); dialogs_.push_back(new FormTabularCreate(lv, this)); dialogs_.push_back(new FormToc(lv, this)); dialogs_.push_back(new FormUrl(lv, this)); + dialogs_.push_back(new FormVCLog(lv, this)); showCredits.connect(slot(ShowCredits)); @@ -53,6 +74,7 @@ Dialogs::Dialogs(LyXView * lv) hideAll.connect(hideBufferDependent.slot()); } + Dialogs::~Dialogs() { for (vector::iterator iter = dialogs_.begin(); @@ -61,80 +83,3 @@ Dialogs::~Dialogs() delete *iter; } } - - -/***************************************************************************** - -Q. WHY does Dialogs::Dialogs pass `this' to dialog constructors? - -A. To avoid a segfault. - The dialog constructors need to connect to their - respective showSomeDialog signal(*) but in order to do - that they need to get the address of the Dialogs instance - from LyXView::getDialogs(). However, since the Dialogs - instance is still being constructed at that time - LyXView::getDialogs() will *not* return the correct - address because it hasn't finished being constructed. - A Catch-22 situation (or is that the chicken and the egg...). - So to get around the problem we pass the address of - the newly created Dialogs instance using `this'. - -(*) -- I'm using signals exclusively to guarantee that the gui code - remains hidden from the rest of the system. In fact the only - header related to dialogs that anything in the non-gui-specific - code gets to see is Dialogs.h! Even Dialogs.h doesn't know what a - FormCopyright class looks like or that its even going to be used! - - No other gui dialog headers are seen outside of the gui-specific - directories! This ensures that the gui is completely separate from - the rest of LyX. All this through the use of a few simple signals. - BUT, the price is that during construction we need to connect the - implementations show() method to the showSomeDialog signal and this - requires that we have an instance of Dialogs and the problem mentioned - above. - - Almost all other dialogs should be able to operate using the same style - of signalling used for Copyright. Exceptions should be handled - by adding a specific show or update signal. For example, spellchecker - needs to set the next suspect word and its options/replacements so we - need a: - Signal0 updateSpellChecker; - - Since we would have to have a - Signal0 showSpellChecker; - - in order to just see the spellchecker and let the user push the [Start] - button then the updateSpellChecker signal will make the SpellChecker - dialog get the new word and replacements list from LyX. If you really, - really wanted to you could define a signal that would pass the new - word and replacements: - Signal2 > updateSpellChecker; - - (or something similar) but, why bother when the spellchecker can get - it anyway with a LyXFunc call or two. Besides if someone extends - what a dialog does then they also have to change code in the rest of - LyX to pass more parameters or get the extra info via a function - call anyway. Thus reducing the independence of the two code bases. - - We don't need a separate update signal for each dialog because most of - them will be changed only when the buffer is changed (either by closing - the current open buffer or switching to another buffer in the current - LyXView -- different BufferView same LyXView or same BufferView same - LyXView). - - So we minimise signals but maximise independence and programming - simplicity, understandability and maintainability. It's also - extremely easy to add support for Qt or gtk-- because they use - signals already. Guis that use callbacks, like xforms, must have their - code wrapped up like that in the form_copyright.[Ch] which is awkward - but will at least allow multiple instances of the same dialog. - - Signals will also be a great help in controlling the splashscreen -- - once signalled to hide it can disconnect from the signal and remove - itself from memory. - - LyXFuncs will be used for requesting/setting LyX internal info. This - will ensure that scripts or LyXServer-connected applications can all - have access to the same calls as the internal user-interface. - -******************************************************************************/ diff --git a/src/frontends/kde/FormCitation.C b/src/frontends/kde/FormCitation.C index 9634a2572f..0a5d88d732 100644 --- a/src/frontends/kde/FormCitation.C +++ b/src/frontends/kde/FormCitation.C @@ -1,21 +1,14 @@ -/* - * FormCitation.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormCitation.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include -#include +#include #include "Dialogs.h" #include "FormCitation.h" @@ -24,27 +17,26 @@ #include "LyXView.h" #include "lyxfunc.h" #include "citationdlg.h" - + using std::vector; using std::pair; using std::find; - + FormCitation::FormCitation(LyXView *v, Dialogs *d) - : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0), + : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0), keys(0), chosenkeys(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showCitation.connect(slot(this, &FormCitation::showCitation)); d->createCitation.connect(slot(this, &FormCitation::createCitation)); } + FormCitation::~FormCitation() { delete dialog_; } + void FormCitation::showCitation(InsetCommand * const inset) { // FIXME: when could inset be 0 here ? @@ -59,6 +51,7 @@ void FormCitation::showCitation(InsetCommand * const inset) show(); } + void FormCitation::createCitation(string const & arg) { // we could already be showing stuff, clear it out @@ -70,8 +63,9 @@ void FormCitation::createCitation(string const & arg) show(); } + void FormCitation::updateButtons() -{ +{ if (readonly) { dialog_->add->setEnabled(false); dialog_->remove->setEnabled(false); @@ -81,8 +75,8 @@ void FormCitation::updateButtons() } bool ischosenkey = !selectedChosenKey.empty(); - - vector::const_iterator iter = + + vector::const_iterator iter = find(chosenkeys.begin(), chosenkeys.end(), selectedKey); dialog_->add->setEnabled(!selectedKey.empty() && iter == chosenkeys.end()); @@ -90,7 +84,8 @@ void FormCitation::updateButtons() dialog_->up->setEnabled(ischosenkey); dialog_->down->setEnabled(ischosenkey); } - + + void FormCitation::updateChosenList() { dialog_->chosen->setAutoUpdate(false); @@ -104,6 +99,7 @@ void FormCitation::updateChosenList() dialog_->chosen->update(); } + void FormCitation::updateAvailableList() { dialog_->keys->setAutoUpdate(false); @@ -116,25 +112,25 @@ void FormCitation::updateAvailableList() dialog_->keys->setAutoUpdate(true); dialog_->keys->update(); } - + // we can safely ignore the parameter because we can always update void FormCitation::update(bool) { keys.clear(); - - vector < pair > ckeys = lv_->buffer()->getBibkeyList(); + + vector < pair > const ckeys = lv_->buffer()->getBibkeyList(); for (vector< pair >::const_iterator iter = ckeys.begin(); iter != ckeys.end(); ++iter) { keys.push_back(*iter); } - + updateAvailableList(); selectedKey.erase(); - + chosenkeys.clear(); - + string tmp, paramkeys(params.getContents()); paramkeys = frontStrip(split(paramkeys, tmp, ',')); @@ -145,13 +141,13 @@ void FormCitation::update(bool) updateChosenList(); selectedChosenKey.erase(); - + dialog_->entry->setText(""); dialog_->after->setText(params.getOptions().c_str()); updateButtons(); - + if (readonly) { dialog_->keys->setFocusPolicy(QWidget::NoFocus); dialog_->chosen->setFocusPolicy(QWidget::NoFocus); @@ -183,7 +179,7 @@ void FormCitation::apply() params.setContents(contents); params.setOptions(dialog_->after->text()); - + if (inset_ != 0) { if (params != inset_->params()) { inset_->setParams(params); @@ -234,20 +230,20 @@ void FormCitation::selectChosen() } } } - + void FormCitation::add() { if (selectedKey.empty()) return; - for (vector< pair >::const_iterator iter = keys.begin(); + for (vector< pair >::const_iterator iter = keys.begin(); iter != keys.end(); ++iter) { if (iter->first == selectedKey) { chosenkeys.push_back(iter->first); - break; + break; } } - + selectedChosenKey.erase(); updateChosenList(); updateButtons(); @@ -256,7 +252,7 @@ void FormCitation::add() void FormCitation::remove() { if (selectedChosenKey.empty()) - return; + return; for (vector< string >::iterator iter = chosenkeys.begin(); iter != chosenkeys.end(); ++iter) { @@ -275,9 +271,9 @@ void FormCitation::up() if (selectedChosenKey.empty()) return; - // Qt will select the first one on redo, so we need this + // Qt will select the first one on redo, so we need this string tmp = selectedChosenKey; - + vector< string >::iterator iter = chosenkeys.begin(); for (; iter != chosenkeys.end(); ++iter) { @@ -290,47 +286,49 @@ void FormCitation::up() } if (iter==chosenkeys.end()) return; - + updateChosenList(); selectedChosenKey=tmp; selectChosen(); } + void FormCitation::down() { if (selectedChosenKey.empty()) return; - // Qt will select the first one on redo, so we need this + // Qt will select the first one on redo, so we need this string tmp = selectedChosenKey; - + vector< string >::iterator iter = chosenkeys.begin(); for (; iter != chosenkeys.end(); ++iter) { - if (*iter==selectedChosenKey && (iter+1)!=chosenkeys.end()) { + if (*iter == selectedChosenKey && (iter+1)!=chosenkeys.end()) { string tmp = *iter; chosenkeys.erase(iter); chosenkeys.insert(iter+1, tmp); break; } } - if (iter==chosenkeys.end()) + if (iter == chosenkeys.end()) return; - + updateChosenList(); selectedChosenKey=tmp; selectChosen(); } + -void FormCitation::select_key(const char *key) +void FormCitation::select_key(char const * key) { if (readonly) return; - vector::const_iterator iter = + vector::const_iterator iter = find(chosenkeys.begin(), chosenkeys.end(), key); - if (iter!=chosenkeys.end()) + if (iter != chosenkeys.end()) return; selectedKey.erase(); @@ -338,8 +336,9 @@ void FormCitation::select_key(const char *key) add(); } + -void FormCitation::highlight_key(const char *key) +void FormCitation::highlight_key(char const * key) { if (readonly) return; @@ -348,7 +347,7 @@ void FormCitation::highlight_key(const char *key) selectedKey = key; for (unsigned int i=0; i < keys.size(); i++) { - if (keys[i].first==key) { + if (keys[i].first == key) { dialog_->entry->setText(keys[i].second.c_str()); dialog_->chosen->clearFocus(); dialog_->chosen->clearSelection(); @@ -360,15 +359,16 @@ void FormCitation::highlight_key(const char *key) updateButtons(); } -void FormCitation::highlight_chosen(const char *key) + +void FormCitation::highlight_chosen(char const * key) { selectedChosenKey.erase(); selectedChosenKey = key; - + unsigned int i; for (i=0; i < keys.size(); i++) { - if (keys[i].first==key) { + if (keys[i].first == key) { if (keys[i].second.compare(dialog_->entry->text())) dialog_->entry->setText(keys[i].second.c_str()); dialog_->keys->clearFocus(); @@ -378,8 +378,8 @@ void FormCitation::highlight_chosen(const char *key) } } - if (i==keys.size()) + if (i == keys.size()) dialog_->entry->setText(_("Key not found in references.")); - + updateButtons(); } diff --git a/src/frontends/kde/FormCitation.h b/src/frontends/kde/FormCitation.h index 5e3a79987f..3b7fc4b9d4 100644 --- a/src/frontends/kde/FormCitation.h +++ b/src/frontends/kde/FormCitation.h @@ -1,40 +1,30 @@ -/* FormCitation.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormCitation.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMCITATION_H #define FORMCITATION_H #include "DialogBase.h" #include "support/lstrings.h" #include "boost/utility.hpp" -#include "insets/insetcommand.h" +#include "insets/insetcommand.h" + +#include -#include - class Dialogs; class LyXView; class CitationDialog; class FormCitation : public DialogBase, public noncopyable { -public: - /**@name Constructors and Destructors */ - //@{ - /// +public: FormCitation(LyXView *, Dialogs *); - /// + ~FormCitation(); - //@} /// Apply changes void apply(); @@ -47,15 +37,15 @@ public: /// move a key up void up(); /// move a key down - void down(); + void down(); /// a key has been highlighted - void highlight_key(const char *key); + void highlight_key(char const * key); /// a chosen key has been highlighted - void highlight_chosen(const char *key); + void highlight_chosen(char const * key); /// a key has been double-clicked - void select_key(const char *key); - -private: + void select_key(char const * key); + +private: /// Create the dialog if necessary, update it and display it. void show(); /// Hide the dialog. @@ -67,22 +57,22 @@ private: void createCitation(string const &); /// edit a Citation inset void showCitation(InsetCommand * const); - + /// update add,remove,up,down void updateButtons(); /// update the available keys list void updateAvailableList(); /// update the chosen keys list void updateChosenList(); - /// select the currently chosen key + /// select the currently chosen key void selectChosen(); - + /// Real GUI implementation. CitationDialog * dialog_; /// the LyXView we belong to LyXView * lv_; - + /** Which Dialogs do we belong to? Used so we can get at the signals we have to connect to. */ @@ -105,7 +95,7 @@ private: std::vector > keys; /// chosen citation keys std::vector chosenkeys; - + /// currently selected key string selectedKey; @@ -113,4 +103,4 @@ private: string selectedChosenKey; }; -#endif +#endif // FORMCITATION_H diff --git a/src/frontends/kde/FormCopyright.C b/src/frontends/kde/FormCopyright.C index 40f991da9c..fafc9c54eb 100644 --- a/src/frontends/kde/FormCopyright.C +++ b/src/frontends/kde/FormCopyright.C @@ -1,20 +1,10 @@ -/*************************************************************************** - formcopyright.cpp - description - ------------------- - begin : Thu Feb 3 2000 - copyright : (C) 2000 by Jürgen Vigna - email : jug@sad.it - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - +/** + * \file FormCopyright.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Jürgen Vigna + */ #include #include "Dialogs.h" @@ -25,17 +15,16 @@ FormCopyright::FormCopyright(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showCopyright.connect(slot(this, &FormCopyright::show)); } + FormCopyright::~FormCopyright() { delete dialog_; } + void FormCopyright::show() { if (!dialog_) @@ -43,9 +32,11 @@ void FormCopyright::show() if (!dialog_->isVisible()) h_ = d_->hideAll.connect(slot(this, &FormCopyright::hide)); + dialog_->show(); } + void FormCopyright::hide() { dialog_->hide(); diff --git a/src/frontends/kde/FormCopyright.h b/src/frontends/kde/FormCopyright.h index 5cce61f953..abcecbc0d0 100644 --- a/src/frontends/kde/FormCopyright.h +++ b/src/frontends/kde/FormCopyright.h @@ -1,20 +1,10 @@ -/*************************************************************************** - formcopyright.h - description - ------------------- - begin : Thu Feb 3 2000 - copyright : (C) 2000 by Jürgen Vigna - email : jug@sad.it - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - +/** + * \file FormCopyright.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Jürgen Vigna + */ #ifndef FORMCOPYRIGHT_H #define FORMCOPYRIGHT_H @@ -25,35 +15,28 @@ class Dialogs; class LyXView; class CopyrightDialog; -/** - @author Jürgen Vigna - */ class FormCopyright : public DialogBase, public noncopyable { public: FormCopyright(LyXView *, Dialogs *); + ~FormCopyright(); private: - /// Create the dialog if necessary, update it and display it. + /// Create the dialog if necessary, update it and display it void show(); - /// Hide the dialog. + /// Hide the dialog void hide(); - /// Not used but we've got to implement it. + /// Not used but we've got to implement it void update(bool) {} - /// Real GUI implementation. + /// Real GUI implementation CopyrightDialog * dialog_; - /** Which LyXFunc do we use? - We could modify Dialogs to have a visible LyXFunc* instead and - save a couple of bytes per dialog. - */ + /// Which LyXFunc do we use ? LyXView * lv_; - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ + /// dialogs object Dialogs * d_; /// Hide connection. Connection h_; }; -#endif +#endif // FORMCOPYRIGHT_H diff --git a/src/frontends/kde/FormDocument.C b/src/frontends/kde/FormDocument.C index 38b97fb610..8e49a249b2 100644 --- a/src/frontends/kde/FormDocument.C +++ b/src/frontends/kde/FormDocument.C @@ -1,18 +1,11 @@ -/* - * FormDocument.C - * (C) 2001 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormDocument.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "docdlg.h" @@ -34,24 +27,18 @@ using Liason::setMinibuffer; FormDocument::FormDocument(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showLayoutDocument.connect(slot(this, &FormDocument::show)); } + FormDocument::~FormDocument() { delete dialog_; } -void FormDocument::update(bool switched) + +void FormDocument::update(bool) { - if (switched) { - hide(); - return; - } - if (!lv_->view()->available()) return; @@ -65,6 +52,7 @@ void FormDocument::update(bool switched) dialog_->setFromParams(buf->params); } + void FormDocument::apply() { if (readonly) @@ -81,6 +69,7 @@ void FormDocument::apply() lv_->buffer()->markDirty(); setMinibuffer(lv_, _("Document layout set")); } + void FormDocument::show() { @@ -98,6 +87,7 @@ void FormDocument::show() dialog_->show(); } + bool FormDocument::changeClass(BufferParams & params, int new_class) { if (textclasslist.Load(new_class)) { @@ -118,12 +108,14 @@ bool FormDocument::changeClass(BufferParams & params, int new_class) return true; } + void FormDocument::close() { h_.disconnect(); } + void FormDocument::hide() { dialog_->hide(); diff --git a/src/frontends/kde/FormDocument.h b/src/frontends/kde/FormDocument.h index 22d0de1e2c..dd0f74710d 100644 --- a/src/frontends/kde/FormDocument.h +++ b/src/frontends/kde/FormDocument.h @@ -1,17 +1,10 @@ -/* FormDocument.h - * (C) 2001 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormDocument.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMDOCUMENT_H #define FORMDOCUMENT_H @@ -31,13 +24,9 @@ class BufferParams; */ class FormDocument : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormDocument(LyXView *, Dialogs *); - /// + ~FormDocument(); - //@} /// Apply changes void apply(); @@ -70,4 +59,4 @@ private: bool readonly; }; -#endif +#endif // FORMDOCUMENT_H diff --git a/src/frontends/kde/FormIndex.C b/src/frontends/kde/FormIndex.C index 30dadef97c..daac49f01b 100644 --- a/src/frontends/kde/FormIndex.C +++ b/src/frontends/kde/FormIndex.C @@ -1,17 +1,10 @@ -/* - * FormIndex.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormIndex.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ #include @@ -26,18 +19,17 @@ FormIndex::FormIndex(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showIndex.connect(slot(this, &FormIndex::showIndex)); d->createIndex.connect(slot(this, &FormIndex::createIndex)); } + FormIndex::~FormIndex() { delete dialog_; } + void FormIndex::showIndex(InsetCommand * const inset) { // FIXME: when could inset be 0 here ? @@ -51,6 +43,7 @@ void FormIndex::showIndex(InsetCommand * const inset) show(); } + void FormIndex::createIndex(string const & arg) { @@ -62,6 +55,7 @@ void FormIndex::createIndex(string const & arg) params.setFromString(arg); show(); } + void FormIndex::update(bool switched) { @@ -73,6 +67,7 @@ void FormIndex::update(bool switched) dialog_->setIndexText(params.getContents().c_str()); dialog_->setReadOnly(readonly); } + void FormIndex::apply() { @@ -89,6 +84,7 @@ void FormIndex::apply() } else lv_->getLyXFunc()->Dispatch(LFUN_INDEX_INSERT, params.getAsString().c_str()); } + void FormIndex::show() { @@ -107,6 +103,7 @@ void FormIndex::show() dialog_->show(); } + void FormIndex::close() { h_.disconnect(); @@ -114,6 +111,7 @@ void FormIndex::close() ih_.disconnect(); inset_ = 0; } + void FormIndex::hide() { diff --git a/src/frontends/kde/FormIndex.h b/src/frontends/kde/FormIndex.h index 4455fc8708..f413e2dc81 100644 --- a/src/frontends/kde/FormIndex.h +++ b/src/frontends/kde/FormIndex.h @@ -1,17 +1,11 @@ -/* FormIndex.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormIndex.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - + #ifndef FORMINDEX_H #define FORMINDEX_H @@ -26,13 +20,9 @@ class IndexDialog; class FormIndex : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormIndex(LyXView *, Dialogs *); - /// + ~FormIndex(); - //@} /// Apply changes void apply(); @@ -58,9 +48,7 @@ private: /// the LyXView we belong to LyXView * lv_; - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ + /// the Dialogs object we belong to Dialogs * d_; /// pointer to the inset if any InsetCommand * inset_; @@ -77,4 +65,4 @@ private: Connection ih_; }; -#endif +#endif // FORMINDEX_H diff --git a/src/frontends/kde/FormLog.C b/src/frontends/kde/FormLog.C new file mode 100644 index 0000000000..42850c9583 --- /dev/null +++ b/src/frontends/kde/FormLog.C @@ -0,0 +1,104 @@ +/** + * \file FormLog.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + +#include +#include + +#include "Dialogs.h" +#include "FormLog.h" +#include "gettext.h" +#include "buffer.h" +#include "support/lstrings.h" +#include "LyXView.h" +#include "lyxfunc.h" +#include "logdlg.h" +#include "lyxrc.h" + +using std::ifstream; +using std::getline; + +FormLog::FormLog(LyXView *v, Dialogs *d) + : dialog_(0), lv_(v), d_(d), h_(0), u_(0) +{ + d->showLogFile.connect(slot(this, &FormLog::show)); +} + + +FormLog::~FormLog() +{ + delete dialog_; +} + + +void FormLog::update() +{ + supdate(); +} + + +void FormLog::supdate(bool) +{ + std::pair const logfile + = lv_->view()->buffer()->getLogName(); + + if (logfile.first == Buffer::buildlog) + dialog_->setCaption(_("Build log")); + else + dialog_->setCaption(_("LaTeX log")); + + dialog_->setLogText(""); + + ifstream ifstr(logfile.second.c_str()); + if (!ifstr) { + if (logfile.first == Buffer::buildlog) + dialog_->setLogText(_("No build log file found")); + else + dialog_->setLogText(_("No LaTeX log file found")); + return; + } + + string text; + string line; + + while (getline(ifstr, line)) + text += line + "\n"; + + dialog_->setLogText(text); +} + + +void FormLog::show() +{ + if (!dialog_) + dialog_ = new LogDialog(this, 0, _("LyX: LaTeX Log")); + + if (!dialog_->isVisible()) { + h_ = d_->hideBufferDependent.connect(slot(this, &FormLog::hide)); + u_ = d_->updateBufferDependent.connect(slot(this, &FormLog::supdate)); + } + + dialog_->raise(); + dialog_->setActiveWindow(); + + update(); + dialog_->show(); +} + + +void FormLog::close() +{ + h_.disconnect(); + u_.disconnect(); +} + + +void FormLog::hide() +{ + dialog_->hide(); + close(); +} diff --git a/src/frontends/kde/FormLog.h b/src/frontends/kde/FormLog.h new file mode 100644 index 0000000000..1ca8e5e0b9 --- /dev/null +++ b/src/frontends/kde/FormLog.h @@ -0,0 +1,55 @@ +/** + * \file FormLog.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + + +#ifndef FORMLOG_H +#define FORMLOG_H + +#include "DialogBase.h" +#include "LString.h" +#include "boost/utility.hpp" + +class Dialogs; +class LyXView; +class LogDialog; + +class FormLog : public DialogBase, public noncopyable { +public: + FormLog(LyXView *, Dialogs *); + + ~FormLog(); + + /// close the connections + virtual void close(); + /// Update the dialog + virtual void update(); + /// Update the dialog from slot + virtual void supdate(bool = false); + +protected: + /// Create the dialog if necessary, update it and display it + virtual void show(); + /// Hide the dialog + virtual void hide(); + + /// Real GUI implementation. + LogDialog * dialog_; + + /// the LyXView we belong to + LyXView * lv_; + + /// the Dialogs object we belong to + Dialogs * d_; + + /// Hide connection. + Connection h_; + /// Update connection. + Connection u_; +}; + +#endif // FORMLOG_H diff --git a/src/frontends/kde/FormParagraph.C b/src/frontends/kde/FormParagraph.C index f81fa5f30d..879aeecb74 100644 --- a/src/frontends/kde/FormParagraph.C +++ b/src/frontends/kde/FormParagraph.C @@ -1,18 +1,11 @@ -/* - * FormParagraph.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormParagraph.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "paradlg.h" @@ -35,17 +28,16 @@ using std::endl; FormParagraph::FormParagraph(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showLayoutParagraph.connect(slot(this, &FormParagraph::show)); } + FormParagraph::~FormParagraph() { delete dialog_; } + void FormParagraph::update(bool switched) { if (switched) { @@ -58,12 +50,12 @@ void FormParagraph::update(bool switched) Buffer *buf = lv_->view()->buffer(); - if (readonly!=buf->isReadonly()) { + if (readonly != buf->isReadonly()) { readonly = buf->isReadonly(); dialog_->setReadOnly(readonly); } - LyXText *text = 0; + LyXText * text = 0; if (lv_->view()->theLockingInset()) text = lv_->view()->theLockingInset()->getLyXText(lv_->view()); @@ -71,7 +63,7 @@ void FormParagraph::update(bool switched) if (!text) text = lv_->view()->text; - LyXParagraph *par = text->cursor.par(); + LyXParagraph const * par = text->cursor.par(); int align = par->GetAlign(); @@ -79,22 +71,26 @@ void FormParagraph::update(bool switched) align = textclasslist.Style(buf->params.textclass, par->GetLayout()).align; #ifndef NEW_INSETS - LyXParagraph *physpar = par->FirstPhysicalPar(); + LyXParagraph const * physpar = par->FirstPhysicalPar(); #else - LyXParagraph *physpar = par; + LyXParagraph const * physpar = par; #endif - if (physpar->added_space_top.kind()==VSpace::LENGTH) { + if (physpar->added_space_top.kind() == VSpace::LENGTH) { LyXGlueLength above = physpar->added_space_top.length(); - lyxerr[Debug::GUI] << "Reading above space : \"" << physpar->added_space_top.length().asString() << "\"" << endl; + lyxerr[Debug::GUI] << "Reading above space : \"" + << physpar->added_space_top.length().asString() << "\"" << endl; + dialog_->setAboveLength(above.value(), above.plusValue(), above.minusValue(), above.unit(), above.plusUnit(), above.minusUnit()); } else dialog_->setAboveLength(0.0, 0.0, 0.0, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE); - if (physpar->added_space_bottom.kind()==VSpace::LENGTH) { + if (physpar->added_space_bottom.kind() == VSpace::LENGTH) { LyXGlueLength below = physpar->added_space_bottom.length(); - lyxerr[Debug::GUI] << "Reading below space : \"" << physpar->added_space_bottom.length().asString() << "\"" << endl; + lyxerr[Debug::GUI] << "Reading below space : \"" + << physpar->added_space_bottom.length().asString() << "\"" << endl; + dialog_->setBelowLength(below.value(), below.plusValue(), below.minusValue(), below.unit(), below.plusUnit(), below.minusUnit()); } else @@ -102,8 +98,10 @@ void FormParagraph::update(bool switched) dialog_->setLabelWidth(text->cursor.par()->GetLabelWidthString().c_str()); dialog_->setAlign(align); + dialog_->setChecks(physpar->line_top, physpar->line_bottom, physpar->pagebreak_top, physpar->pagebreak_bottom, physpar->noindent); + dialog_->setSpace(physpar->added_space_top.kind(), physpar->added_space_bottom.kind(), physpar->added_space_top.keep(), physpar->added_space_bottom.keep()); @@ -128,6 +126,7 @@ void FormParagraph::update(bool switched) static_cast(par->pextra_type)); } + void FormParagraph::apply() { if (readonly) @@ -136,12 +135,12 @@ void FormParagraph::apply() VSpace spaceabove; VSpace spacebelow; - if (dialog_->getSpaceAboveKind()==VSpace::LENGTH) + if (dialog_->getSpaceAboveKind() == VSpace::LENGTH) spaceabove = VSpace(dialog_->getAboveLength()); else spaceabove = VSpace(dialog_->getSpaceAboveKind()); - if (dialog_->getSpaceBelowKind()==VSpace::LENGTH) + if (dialog_->getSpaceBelowKind() == VSpace::LENGTH) spacebelow = VSpace(dialog_->getBelowLength()); else spacebelow = VSpace(dialog_->getSpaceBelowKind()); @@ -149,8 +148,10 @@ void FormParagraph::apply() spaceabove.setKeep(dialog_->getAboveKeep()); spacebelow.setKeep(dialog_->getBelowKeep()); - lyxerr[Debug::GUI] << "Setting above space \"" << LyXGlueLength(spaceabove.length().asString()).asString() << "\"" << endl; - lyxerr[Debug::GUI] << "Setting below space \"" << LyXGlueLength(spacebelow.length().asString()).asString() << "\"" << endl; + lyxerr[Debug::GUI] << "Setting above space \"" + << LyXGlueLength(spaceabove.length().asString()).asString() << "\"" << endl; + lyxerr[Debug::GUI] << "Setting below space \"" + << LyXGlueLength(spacebelow.length().asString()).asString() << "\"" << endl; lv_->view()->text->SetParagraph(lv_->view(), dialog_->getLineAbove(), dialog_->getLineBelow(), @@ -164,7 +165,7 @@ void FormParagraph::apply() string widthp(""); LyXLength extrawidth(dialog_->getExtraWidth()); - if (extrawidth.unit()==LyXLength::UNIT_NONE) { + if (extrawidth.unit() == LyXLength::UNIT_NONE) { widthp = dialog_->getExtraWidthPercent(); } else width = extrawidth.asString(); @@ -183,6 +184,7 @@ void FormParagraph::apply() setMinibuffer(lv_, _("Paragraph layout set")); } + void FormParagraph::show() { if (!dialog_) @@ -191,7 +193,6 @@ void FormParagraph::show() if (!dialog_->isVisible()) h_ = d_->hideBufferDependent.connect(slot(this, &FormParagraph::hide)); - dialog_->raise(); dialog_->setActiveWindow(); update(); @@ -199,11 +200,13 @@ void FormParagraph::show() dialog_->show(); } + void FormParagraph::close() { h_.disconnect(); } + void FormParagraph::hide() { dialog_->hide(); diff --git a/src/frontends/kde/FormParagraph.h b/src/frontends/kde/FormParagraph.h index b0951c7dfa..b00dde16fe 100644 --- a/src/frontends/kde/FormParagraph.h +++ b/src/frontends/kde/FormParagraph.h @@ -1,17 +1,11 @@ -/* FormParagraph.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormParagraph.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMPARAGRAPH_H #define FORMPARAGRAPH_H @@ -25,13 +19,9 @@ class ParaDialog; class FormParagraph : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormParagraph(LyXView *, Dialogs *); - /// + ~FormParagraph(); - //@} /// Apply changes void apply(); @@ -62,4 +52,4 @@ private: bool readonly; }; -#endif +#endif // FORMPARAGRAPH_H diff --git a/src/frontends/kde/FormPrint.C b/src/frontends/kde/FormPrint.C index b28c77f1f9..852b107e86 100644 --- a/src/frontends/kde/FormPrint.C +++ b/src/frontends/kde/FormPrint.C @@ -1,17 +1,10 @@ -/* - * FormPrint.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormPrint.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ #include @@ -42,17 +35,16 @@ using std::max; FormPrint::FormPrint(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0), u_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showPrint.connect(slot(this, &FormPrint::show)); } + FormPrint::~FormPrint() { delete dialog_; } + // we can safely ignore the parameter because we can always update void FormPrint::update(bool) { @@ -80,6 +72,7 @@ void FormPrint::update(bool) dialog_->setTo(""); } } + void FormPrint::print() { @@ -112,6 +105,7 @@ void FormPrint::print() } } + void FormPrint::show() { if (!dialog_) @@ -129,11 +123,13 @@ void FormPrint::show() dialog_->show(); } + void FormPrint::close() { h_.disconnect(); u_.disconnect(); } + void FormPrint::hide() { diff --git a/src/frontends/kde/FormPrint.h b/src/frontends/kde/FormPrint.h index e87ea18880..4d640873e2 100644 --- a/src/frontends/kde/FormPrint.h +++ b/src/frontends/kde/FormPrint.h @@ -1,17 +1,11 @@ -/* FormPrint.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormPrint.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMPRINT_H #define FORMPRINT_H @@ -28,13 +22,9 @@ using SigC::Connection; class FormPrint : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormPrint(LyXView *, Dialogs *); - /// + ~FormPrint(); - //@} /// start print void print(); @@ -66,4 +56,4 @@ private: Connection u_; }; -#endif +#endif // FORMPRINT_H diff --git a/src/frontends/kde/FormRef.C b/src/frontends/kde/FormRef.C index 89d4e6432b..48a750e9e0 100644 --- a/src/frontends/kde/FormRef.C +++ b/src/frontends/kde/FormRef.C @@ -1,18 +1,11 @@ -/* - * FormRef.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormRef.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "Dialogs.h" @@ -33,18 +26,17 @@ FormRef::FormRef(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0), sort(0), gotowhere(GOTOREF), refs(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showRef.connect(slot(this, &FormRef::showRef)); d->createRef.connect(slot(this, &FormRef::createRef)); } + FormRef::~FormRef() { delete dialog_; } + void FormRef::showRef(InsetCommand * const inset) { // FIXME: when could inset be 0 here ? @@ -59,6 +51,7 @@ void FormRef::showRef(InsetCommand * const inset) show(); } + void FormRef::createRef(string const & arg) { if (inset_) @@ -69,13 +62,15 @@ void FormRef::createRef(string const & arg) show(); } -void FormRef::select(const char *text) + +void FormRef::select(char const * text) { highlight(text); goto_ref(); } -void FormRef::highlight(const char *text) + +void FormRef::highlight(char const * text) { if (gotowhere==GOTOBACK) goto_ref(); @@ -88,15 +83,17 @@ void FormRef::highlight(const char *text) } } + void FormRef::set_sort(bool on) { - if (on!=sort) { + if (on != sort) { sort=on; dialog_->refs->clear(); updateRefs(); } } + void FormRef::goto_ref() { switch (gotowhere) { @@ -117,10 +114,11 @@ void FormRef::goto_ref() } } + void FormRef::updateRefs() { // list will be re-done, should go back if necessary - if (gotowhere==GOTOBACK) { + if (gotowhere == GOTOBACK) { lv_->getLyXFunc()->Dispatch(LFUN_BOOKMARK_GOTO, "0"); gotowhere = GOTOREF; dialog_->buttonGoto->setText(_("&Goto reference")); @@ -144,7 +142,7 @@ void FormRef::updateRefs() dialog_->reference->setText(tmp.c_str()); - for (unsigned int i = 0; i < dialog_->refs->count(); ++i) { + for (unsigned int i=0; i < dialog_->refs->count(); ++i) { if (!strcmp(dialog_->reference->text(),dialog_->refs->text(i))) dialog_->refs->setCurrentItem(i); } @@ -153,6 +151,7 @@ void FormRef::updateRefs() dialog_->refs->update(); } + void FormRef::do_ref_update() { refs.clear(); @@ -163,6 +162,7 @@ void FormRef::do_ref_update() updateRefs(); } + void FormRef::update(bool switched) { if (switched) { @@ -201,6 +201,7 @@ void FormRef::update(bool switched) dialog_->buttonCancel->setText(_("&Cancel")); } + void FormRef::apply() { if (readonly) @@ -222,6 +223,7 @@ void FormRef::apply() lv_->getLyXFunc()->Dispatch(LFUN_REF_INSERT, params.getAsString().c_str()); } + void FormRef::show() { if (!dialog_) @@ -239,6 +241,7 @@ void FormRef::show() dialog_->show(); } + void FormRef::close() { h_.disconnect(); @@ -247,6 +250,7 @@ void FormRef::close() inset_ = 0; } + void FormRef::hide() { dialog_->hide(); diff --git a/src/frontends/kde/FormRef.h b/src/frontends/kde/FormRef.h index 12fa636b56..110a8d1ed3 100644 --- a/src/frontends/kde/FormRef.h +++ b/src/frontends/kde/FormRef.h @@ -1,17 +1,11 @@ -/* FormRef.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormRef.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMREF_H #define FORMREF_H @@ -26,18 +20,14 @@ class RefDialog; class FormRef : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormRef(LyXView *, Dialogs *); - /// + ~FormRef(); - //@} /// double-click a ref - void select(const char *); + void select(char const *); /// highlight a ref - void highlight(const char *); + void highlight(char const *); /// set sort void set_sort(bool); /// goto a ref (or back) @@ -75,10 +65,9 @@ private: /// the LyXView we belong to LyXView * lv_; - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ + /// dialogs object Dialogs * d_; + /// pointer to the inset if any InsetCommand * inset_; /// insets params @@ -103,4 +92,4 @@ private: std::vector< string > refs; }; -#endif +#endif // FORMREF_H diff --git a/src/frontends/kde/FormTabularCreate.C b/src/frontends/kde/FormTabularCreate.C index ddab584b0d..89633f4139 100644 --- a/src/frontends/kde/FormTabularCreate.C +++ b/src/frontends/kde/FormTabularCreate.C @@ -1,18 +1,11 @@ -/* - * FormTabularCreate.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormTabularCreate.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "tabcreatedlg.h" @@ -27,17 +20,16 @@ FormTabularCreate::FormTabularCreate(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), h_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showTabularCreate.connect(slot(this, &FormTabularCreate::show)); } + FormTabularCreate::~FormTabularCreate() { delete dialog_; } + void FormTabularCreate::apply(unsigned int rows, unsigned cols) { if (!lv_->view()->available()) @@ -47,6 +39,7 @@ void FormTabularCreate::apply(unsigned int rows, unsigned cols) lv_->getLyXFunc()->Dispatch(LFUN_INSET_TABULAR, tmp); } + void FormTabularCreate::show() { if (!dialog_) @@ -63,11 +56,13 @@ void FormTabularCreate::show() dialog_->show(); } + void FormTabularCreate::close() { h_.disconnect(); } + void FormTabularCreate::hide() { dialog_->hide(); diff --git a/src/frontends/kde/FormTabularCreate.h b/src/frontends/kde/FormTabularCreate.h index 9210a50602..d250aaf999 100644 --- a/src/frontends/kde/FormTabularCreate.h +++ b/src/frontends/kde/FormTabularCreate.h @@ -1,17 +1,11 @@ -/* FormTabularCreate.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormTabularCreate.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMTABULARCREATE_H #define FORMTABULARCREATE_H @@ -23,13 +17,9 @@ class TabularCreateDialog; class FormTabularCreate : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormTabularCreate(LyXView *, Dialogs *); - /// + ~FormTabularCreate(); - //@} /// create the table void apply(unsigned int rows, unsigned int cols); @@ -48,13 +38,11 @@ private: /// the LyXView we belong to LyXView * lv_; - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ + /// Dialogs object Dialogs * d_; /// Hide connection. Connection h_; }; -#endif +#endif // FORMTABULARCREATE_H diff --git a/src/frontends/kde/FormToc.C b/src/frontends/kde/FormToc.C index 7ff3ebdf80..d4c229655d 100644 --- a/src/frontends/kde/FormToc.C +++ b/src/frontends/kde/FormToc.C @@ -1,18 +1,11 @@ -/* - * FormToc.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormToc.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include @@ -33,7 +26,7 @@ using std::pair; using std::stack; using std::endl; -// FIXME: we should be able to move sections around like klyx can. +// FIXME: we should be able to move sections around like klyx1 can FormToc::FormToc(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0), @@ -46,15 +39,17 @@ FormToc::FormToc(LyXView *v, Dialogs *d) d->createTOC.connect(slot(this, &FormToc::createTOC)); } + FormToc::~FormToc() { delete dialog_; } + void FormToc::showTOC(InsetCommand * const inset) { // FIXME: when could inset be 0 here ? - if (inset==0) + if (inset == 0) return; inset_ = inset; @@ -64,6 +59,7 @@ void FormToc::showTOC(InsetCommand * const inset) show(); } + void FormToc::createTOC(string const & arg) { if (inset_) @@ -73,6 +69,7 @@ void FormToc::createTOC(string const & arg) show(); } + void FormToc::updateToc(int newdepth) { if (!lv_->view()->available()) { @@ -85,7 +82,7 @@ void FormToc::updateToc(int newdepth) lv_->view()->buffer()->getTocList(); // Check if all elements are the same. - if (newdepth==depth && toclist.size() == tmp[type].size()) { + if (newdepth == depth && toclist.size() == tmp[type].size()) { unsigned int i = 0; for (; i < toclist.size(); ++i) { if (toclist[i] != tmp[type][i]) @@ -107,9 +104,9 @@ void FormToc::updateToc(int newdepth) int curdepth = 0; stack< pair< QListViewItem *, QListViewItem *> > istack; - QListViewItem *last = 0; - QListViewItem *parent = 0; - QListViewItem *item; + QListViewItem * last = 0; + QListViewItem * parent = 0; + QListViewItem * item; // Yes, it is this ugly. Two reasons - root items must have a QListView parent, // rather than QListViewItem; and the TOC can move in and out an arbitrary number @@ -159,6 +156,7 @@ void FormToc::updateToc(int newdepth) dialog_->tree->update(); } + void FormToc::setType(Buffer::TocType toctype) { type = toctype; @@ -186,22 +184,24 @@ void FormToc::setType(Buffer::TocType toctype) } } + void FormToc::set_depth(int newdepth) { - if (newdepth!=depth) + if (newdepth != depth) updateToc(newdepth); } + // we can safely ignore the parameter because we can always update void FormToc::update(bool) { - if (params.getCmdName()=="tableofcontents") { + if (params.getCmdName() == "tableofcontents") { setType(Buffer::TOC_TOC); dialog_->menu->setCurrentItem(0); - } else if (params.getCmdName()=="listoffigures") { + } else if (params.getCmdName() == "listoffigures") { setType(Buffer::TOC_LOF); dialog_->menu->setCurrentItem(1); - } else if (params.getCmdName()=="listoftables") { + } else if (params.getCmdName() == "listoftables") { setType(Buffer::TOC_LOT); dialog_->menu->setCurrentItem(2); } else { @@ -212,18 +212,19 @@ void FormToc::update(bool) updateToc(depth); } -void FormToc::select(const char *text) + +void FormToc::select(char const * text) { if (!lv_->view()->available()) return; vector ::const_iterator iter = toclist.begin(); for (; iter != toclist.end(); ++iter) { - if (iter->str==text) + if (iter->str == text) break; } - if (iter==toclist.end()) { + if (iter == toclist.end()) { lyxerr[Debug::GUI] << "Couldn't find highlighted TOC entry : " << text << endl; return; } @@ -231,15 +232,17 @@ void FormToc::select(const char *text) lv_->getLyXFunc()->Dispatch(LFUN_GOTO_PARAGRAPH, tostr(iter->par->id()).c_str()); } + void FormToc::set_type(Buffer::TocType toctype) { - if (toctype==type) + if (toctype == type) return; setType(toctype); updateToc(depth); } + void FormToc::show() { if (!dialog_) @@ -257,6 +260,7 @@ void FormToc::show() dialog_->show(); } + void FormToc::close() { h_.disconnect(); @@ -265,6 +269,7 @@ void FormToc::close() inset_ = 0; } + void FormToc::hide() { dialog_->hide(); diff --git a/src/frontends/kde/FormToc.h b/src/frontends/kde/FormToc.h index 78e6ab123e..426ddfd203 100644 --- a/src/frontends/kde/FormToc.h +++ b/src/frontends/kde/FormToc.h @@ -1,17 +1,11 @@ -/* FormToc.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormToc.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMTOC_H #define FORMTOC_H @@ -26,16 +20,12 @@ class TocDialog; class FormToc : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormToc(LyXView *, Dialogs *); - /// + ~FormToc(); - //@} /// Selected a tree item - void select(const char *); + void select(char const *); /// Choose which type void set_type(Buffer::TocType); /// Update the dialog. @@ -68,10 +58,9 @@ private: /// the LyXView we belong to LyXView * lv_; - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ + /// Dialogs object Dialogs * d_; + /// pointer to the inset if any InsetCommand * inset_; /// insets params @@ -94,4 +83,4 @@ private: int depth; }; -#endif +#endif // FORMTOC_H diff --git a/src/frontends/kde/FormUrl.C b/src/frontends/kde/FormUrl.C index 09e7de0164..eb421eb40f 100644 --- a/src/frontends/kde/FormUrl.C +++ b/src/frontends/kde/FormUrl.C @@ -1,17 +1,10 @@ -/* - * FormUrl.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormUrl.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ #include @@ -26,22 +19,21 @@ FormUrl::FormUrl(LyXView *v, Dialogs *d) : dialog_(0), lv_(v), d_(d), inset_(0), h_(0), u_(0), ih_(0) { - // let the dialog be shown - // This is a permanent connection so we won't bother - // storing a copy because we won't be disconnecting. d->showUrl.connect(slot(this, &FormUrl::showUrl)); d->createUrl.connect(slot(this, &FormUrl::createUrl)); } + FormUrl::~FormUrl() { delete dialog_; } + void FormUrl::showUrl(InsetCommand * const inset) { // FIXME: when could inset be 0 here ? - if (inset==0) + if (inset == 0) return; inset_ = inset; @@ -51,6 +43,7 @@ void FormUrl::showUrl(InsetCommand * const inset) show(); } + void FormUrl::createUrl(string const & arg) { @@ -62,11 +55,11 @@ void FormUrl::createUrl(string const & arg) params.setFromString(arg); show(); } + void FormUrl::update(bool switched) { if (switched) { - // I suspect a buffer switch should cause hide() here. ARRae hide(); return; } @@ -74,7 +67,7 @@ void FormUrl::update(bool switched) dialog_->url->setText(params.getContents().c_str()); dialog_->urlname->setText(params.getOptions().c_str()); - if (params.getCmdName()=="url") + if (params.getCmdName() == "url") dialog_->htmlurl->setChecked(0); else dialog_->htmlurl->setChecked(1); @@ -94,6 +87,7 @@ void FormUrl::update(bool switched) dialog_->htmlurl->setEnabled(true); } } + void FormUrl::apply() { @@ -116,6 +110,7 @@ void FormUrl::apply() } else lv_->getLyXFunc()->Dispatch(LFUN_INSERT_URL, params.getAsString().c_str()); } + void FormUrl::show() { @@ -134,6 +129,7 @@ void FormUrl::show() dialog_->show(); } + void FormUrl::close() { h_.disconnect(); @@ -141,6 +137,7 @@ void FormUrl::close() ih_.disconnect(); inset_ = 0; } + void FormUrl::hide() { diff --git a/src/frontends/kde/FormUrl.h b/src/frontends/kde/FormUrl.h index 7fd152d34e..c882722d9a 100644 --- a/src/frontends/kde/FormUrl.h +++ b/src/frontends/kde/FormUrl.h @@ -1,17 +1,11 @@ -/* FormUrl.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file FormUrl.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef FORMURL_H #define FORMURL_H @@ -26,13 +20,9 @@ class UrlDialog; class FormUrl : public DialogBase, public noncopyable { public: - /**@name Constructors and Destructors */ - //@{ - /// FormUrl(LyXView *, Dialogs *); - /// + ~FormUrl(); - //@} /// Apply changes void apply(); @@ -58,10 +48,9 @@ private: /// the LyXView we belong to LyXView * lv_; - /** Which Dialogs do we belong to? - Used so we can get at the signals we have to connect to. - */ + /// Dialogs object Dialogs * d_; + /// pointer to the inset if any InsetCommand * inset_; /// insets params @@ -77,4 +66,4 @@ private: Connection ih_; }; -#endif +#endif // FORMURL_H diff --git a/src/frontends/kde/FormVCLog.C b/src/frontends/kde/FormVCLog.C new file mode 100644 index 0000000000..802e1a5791 --- /dev/null +++ b/src/frontends/kde/FormVCLog.C @@ -0,0 +1,100 @@ +/** + * \file FormVCLog.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + +#include +#include + +#include "Dialogs.h" +#include "FormVCLog.h" +#include "gettext.h" +#include "buffer.h" +#include "support/lstrings.h" +#include "LyXView.h" +#include "lyxfunc.h" +#include "logdlg.h" +#include "lyxvc.h" + +using std::ifstream; +using std::getline; + +FormVCLog::FormVCLog(LyXView *v, Dialogs *d) + : dialog_(0), lv_(v), d_(d), h_(0), u_(0) +{ + d->showVCLogFile.connect(slot(this, &FormVCLog::show)); +} + + +FormVCLog::~FormVCLog() +{ + delete dialog_; +} + + +void FormVCLog::update() +{ + supdate(); +} + + +void FormVCLog::supdate(bool) +{ + const string logfile = lv_->view()->buffer()->lyxvc.getLogFile(); + + dialog_->setCaption(string(_("Version control log for ") + lv_->view()->buffer()->fileName()).c_str()); + + dialog_->setLogText(""); + + ifstream ifstr(logfile.c_str()); + if (!ifstr) { + dialog_->setLogText(_("No version control log file found")); + lyx::unlink(logfile); + return; + } + + string text; + string line; + + while (getline(ifstr, line)) + text += line + "\n"; + + dialog_->setLogText(text); + + lyx::unlink(logfile); +} + + +void FormVCLog::show() +{ + if (!dialog_) + dialog_ = new LogDialog(this, 0, _("LyX: Version Control Log")); + + if (!dialog_->isVisible()) { + h_ = d_->hideBufferDependent.connect(slot(this, &FormVCLog::hide)); + u_ = d_->updateBufferDependent.connect(slot(this, &FormVCLog::supdate)); + } + + dialog_->raise(); + dialog_->setActiveWindow(); + + update(); + dialog_->show(); +} + + +void FormVCLog::close() +{ + h_.disconnect(); + u_.disconnect(); +} + + +void FormVCLog::hide() +{ + dialog_->hide(); + close(); +} diff --git a/src/frontends/kde/FormVCLog.h b/src/frontends/kde/FormVCLog.h new file mode 100644 index 0000000000..1fc349650f --- /dev/null +++ b/src/frontends/kde/FormVCLog.h @@ -0,0 +1,55 @@ +/** + * \file FormVCLog.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + + +#ifndef FORMVCLOG_H +#define FORMVCLOG_H + +#include "DialogBase.h" +#include "LString.h" +#include "boost/utility.hpp" + +class Dialogs; +class LyXView; +class LogDialog; + +class FormVCLog : public DialogBase, public noncopyable { +public: + FormVCLog(LyXView *, Dialogs *); + + ~FormVCLog(); + + /// close the connections + virtual void close(); + /// Update the dialog + virtual void update(); + /// Update the dialog from slot + virtual void supdate(bool = false); + +protected: + /// Create the dialog if necessary, update it and display it + virtual void show(); + /// Hide the dialog + virtual void hide(); + + /// Real GUI implementation. + LogDialog * dialog_; + + /// the LyXView we belong to + LyXView * lv_; + + /// the Dialogs object we belong to + Dialogs * d_; + + /// Hide connection. + Connection h_; + /// Update connection. + Connection u_; +}; + +#endif // FORMVCLOG_H diff --git a/src/frontends/kde/GUIRunTime.C b/src/frontends/kde/GUIRunTime.C index 96f3dbd6e1..acff883a3e 100644 --- a/src/frontends/kde/GUIRunTime.C +++ b/src/frontends/kde/GUIRunTime.C @@ -1,11 +1,10 @@ -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 2000 The LyX Team. +/** + * \file GUIRunTime.C + * Copyright 2001 the LyX Team + * Read the file COPYING * - * ====================================================== */ + * \author Jürgen Vigna + */ #include @@ -22,10 +21,8 @@ using std::endl; -// For now we need this here as long as we use xforms components! - -// I keep these here so that it will be processed as early in -// the compilation process as possible. +// tell me again why this test is cluttering up the source rather than +// being in lyxinclude.m4 ? - jbl #if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0 #error LyX will not compile with this version of XForms.\ Please get version 0.89.\ @@ -38,20 +35,7 @@ static int const xforms_include_version = FL_INCLUDE_VERSION; int GUIRunTime::initApplication(int argc, char * argv[]) { - // Check the XForms version in the forms.h header against - // the one in the libforms. If they don't match quit the - // execution of LyX. Better with a clean fast exit than - // a strange segfault later. - // I realize that this check have to be moved when we - // support several toolkits, but IMO all the toolkits - // should try to have the same kind of check. This could - // be done by having a CheckHeaderAndLib function in - // all the toolkit implementations, this function is - // responsible for notifing the user. - // if (!CheckHeaderAndLib()) { - // // header vs. lib version failed - // return 1; - // } + // same here, this is clearly a configure-time test - jbl int xforms_lib_version = fl_library_version(0, 0); if (xforms_include_version != xforms_lib_version) { lyxerr << "You are either running LyX with wrong " @@ -70,6 +54,7 @@ int GUIRunTime::initApplication(int argc, char * argv[]) return 0; } + void GUIRunTime::processEvents() { kapp->processEvents(); @@ -110,4 +95,3 @@ void GUIRunTime::setDefaults() | FL_PDMenuFontSize | FL_PDBorderWidth, &cntl); } - diff --git a/src/frontends/kde/Makefile.am b/src/frontends/kde/Makefile.am index c1870e8568..d46953e75e 100644 --- a/src/frontends/kde/Makefile.am +++ b/src/frontends/kde/Makefile.am @@ -16,13 +16,21 @@ libkde_la_OBJADD = \ dlg/libkdedlg.la \ dlg/moc/libkdedlgmoc.la \ ../xforms/FormBase.lo \ + ../xforms/FormBibitem.lo \ + ../xforms/form_bibitem.lo \ + ../xforms/FormBibtex.lo \ + ../xforms/form_bibtex.lo \ ../xforms/FormError.lo \ ../xforms/form_error.lo \ ../xforms/FormGraphics.lo \ ../xforms/form_graphics.lo \ + ../xforms/FormInclude.lo \ + ../xforms/form_include.lo \ ../xforms/FormInset.lo \ ../xforms/FormPreferences.lo \ ../xforms/form_preferences.lo \ + ../xforms/FormSplash.lo \ + ../xforms/form_splash.lo \ ../xforms/FormTabular.lo \ ../xforms/form_tabular.lo \ ../xforms/ButtonController.lo \ @@ -50,6 +58,8 @@ libkde_la_SOURCES = \ FormDocument.h \ FormIndex.C \ FormIndex.h \ + FormLog.C \ + FormLog.h \ FormParagraph.C \ FormParagraph.h \ FormPrint.C \ @@ -62,6 +72,8 @@ libkde_la_SOURCES = \ FormToc.h \ FormUrl.C \ FormUrl.h \ + FormVCLog.C \ + FormVCLog.h \ citationdlg.C \ citationdlg.h \ copyrightdlg.C \ @@ -70,6 +82,8 @@ libkde_la_SOURCES = \ docdlg.h \ indexdlg.C \ indexdlg.h \ + logdlg.C \ + logdlg.h \ paradlg.C \ paradlg.h \ parageneraldlg.C \ @@ -90,6 +104,7 @@ libkde_la_SOURCES = \ moc/citationdlg_moc.C: citationdlg.C citationdlg.h moc/copyrightdlg_moc.C: copyrightdlg.C copyrightdlg.h moc/docdlg_moc.C: docdlg.C docdlg.h +moc/logdlg_moc.C: logdlg.C logdlg.h moc/indexdlg_moc.C: indexdlg.C indexdlg.h moc/paradlg_moc.C: paradlg.C paradlg.h moc/parageneraldlg_moc.C: parageneraldlg.C parageneraldlg.h diff --git a/src/frontends/kde/QtLyXView.h b/src/frontends/kde/QtLyXView.h index d9081cbcc9..6bba75ccdb 100644 --- a/src/frontends/kde/QtLyXView.h +++ b/src/frontends/kde/QtLyXView.h @@ -1,12 +1,13 @@ -/* - * QtLyXView.h - * (C) 2000 LyX Team - * moz@compsoc.man.ac.uk +/** + * \file QtLyXView.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/* Qt 1.x has a messy namespace which conflicts with 'emit' in - * src/Timeout.h. This can go away when Qt 2.x happens. +/* Qt has a messy namespace which conflicts with 'emit' in + * Timeout. Yep, they #define emit to nothing. */ - #undef emit #include "LyXView.h" diff --git a/src/frontends/kde/citationdlg.C b/src/frontends/kde/citationdlg.C index e1584b867f..69716446ab 100644 --- a/src/frontends/kde/citationdlg.C +++ b/src/frontends/kde/citationdlg.C @@ -1,18 +1,11 @@ -/* - * citationdlg.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file citationdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "dlg/helpers.h" @@ -22,8 +15,8 @@ using kde_helpers::setSizeHint; #endif -CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, const char *name, bool, WFlags) - : QWidget(parent,name,0), form_(form) +CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, char const * name, bool, WFlags) + : QDialog(parent,name,0), form_(form) { setCaption(name); setMinimumWidth(500); @@ -62,7 +55,6 @@ CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, const char * setSizeHint(labelafter); labelafter->setMaximumSize(labelafter->sizeHint()); - /* FIXME: icons */ add = new QPushButton(this); add->setText(_("&Add")); setSizeHint(add); @@ -171,11 +163,13 @@ CitationDialog::CitationDialog(FormCitation *form, QWidget *parent, const char * resize(sizeHint()); } + CitationDialog::~CitationDialog() { } -void CitationDialog::closeEvent(QCloseEvent *e) + +void CitationDialog::closeEvent(QCloseEvent * e) { form_->close(); e->accept(); diff --git a/src/frontends/kde/citationdlg.h b/src/frontends/kde/citationdlg.h index 5e1e00b1e8..e076b4c8b6 100644 --- a/src/frontends/kde/citationdlg.h +++ b/src/frontends/kde/citationdlg.h @@ -1,18 +1,11 @@ -/* - * citationdlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file citationdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef CITATIONDLG_H #define CITATIONDLG_H @@ -22,55 +15,56 @@ // to connect apply() and hide() #include "FormCitation.h" -#include +#include +#include #include #include #include #include -#include +#include #include -class CitationDialog : public QWidget { +class CitationDialog : public QDialog { Q_OBJECT public: - CitationDialog(FormCitation *form, QWidget *parent=0, const char *name=0, + CitationDialog(FormCitation *form, QWidget *parent=0, char const * name=0, bool modal=false, WFlags f=0); ~CitationDialog(); // widgets - - QLabel *labelchosen; - QListBox *chosen; - QLabel *labelkeys; - QListBox *keys; - QLabel *labelentry; - QMultiLineEdit *entry; - QLabel *labelafter; - QLineEdit *after; - QPushButton *add; - QPushButton *up; - QPushButton *down; - QPushButton *remove; - QPushButton *buttonOk; - QPushButton *buttonCancel; - + + QLabel * labelchosen; + QListBox * chosen; + QLabel * labelkeys; + QListBox * keys; + QLabel * labelentry; + QMultiLineEdit * entry; + QLabel * labelafter; + QLineEdit * after; + QPushButton * add; + QPushButton * up; + QPushButton * down; + QPushButton * remove; + QPushButton * buttonOk; + QPushButton * buttonCancel; + protected: - void closeEvent(QCloseEvent *e); - + void closeEvent(QCloseEvent * e); + private: - FormCitation *form_; + FormCitation * form_; // layouts - - QHBoxLayout *topLayout; - QVBoxLayout *layout; - QHBoxLayout *browserLayout; - QVBoxLayout *chosenLayout; - QVBoxLayout *iconLayout; - QVBoxLayout *keysLayout; - QVBoxLayout *entryLayout; - QHBoxLayout *afterLayout; - QHBoxLayout *buttonLayout; + + QHBoxLayout * topLayout; + QVBoxLayout * layout; + QHBoxLayout * browserLayout; + QVBoxLayout * chosenLayout; + QVBoxLayout * iconLayout; + QVBoxLayout * keysLayout; + QVBoxLayout * entryLayout; + QHBoxLayout * afterLayout; + QHBoxLayout * buttonLayout; private slots: void apply_adaptor(void) { @@ -100,18 +94,17 @@ private slots: form_->remove(); } - void select_key_adaptor(const char *key) { + void select_key_adaptor(const char * key) { form_->select_key(key); } - - void highlight_key_adaptor(const char *key) { + + void highlight_key_adaptor(const char * key) { form_->highlight_key(key); } - void highlight_chosen_adaptor(const char *key) { + void highlight_chosen_adaptor(const char * key) { form_->highlight_chosen(key); } - }; -#endif +#endif // CITATIONDLG_H diff --git a/src/frontends/kde/copyrightdlg.C b/src/frontends/kde/copyrightdlg.C index ddfaa09edf..fa718b43de 100644 --- a/src/frontends/kde/copyrightdlg.C +++ b/src/frontends/kde/copyrightdlg.C @@ -1,24 +1,16 @@ -/********************************************************************** - - --- Qt Architect generated file --- - - File: copyrightdlg.C - Last generated: Thu Oct 12 18:32:40 2000 - - *********************************************************************/ +/** + * \file copyrightdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ #include #include "copyrightdlg.h" -#define Inherited CopyrightDialogData - -CopyrightDialog::CopyrightDialog -( - QWidget* parent, - const char* name -) - : - Inherited( parent, name ) +CopyrightDialog::CopyrightDialog(QWidget * parent, char const * name) + : CopyrightDialogData(parent, name) { setCaption(name); } @@ -28,6 +20,7 @@ CopyrightDialog::~CopyrightDialog() { } + void CopyrightDialog::clickedOK() { hide(); diff --git a/src/frontends/kde/copyrightdlg.h b/src/frontends/kde/copyrightdlg.h index df85e38dfc..3072c1233d 100644 --- a/src/frontends/kde/copyrightdlg.h +++ b/src/frontends/kde/copyrightdlg.h @@ -1,33 +1,28 @@ -/********************************************************************** +/** + * \file copyrightdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ - --- Qt Architect generated file --- - - File: copyrightdlg.h - Last generated: Thu Oct 12 18:32:40 2000 - - *********************************************************************/ - -#ifndef CopyrightDialog_included -#define CopyrightDialog_included +#ifndef COPYRIGHTDIALOG_H +#define COPYRIGHTDIALOG_H #include "dlg/copyrightdlgdata.h" class CopyrightDialog : public CopyrightDialogData { - Q_OBJECT - + Q_OBJECT + public: + CopyrightDialog (QWidget * parent = NULL, char const * name = NULL); - CopyrightDialog - ( - QWidget* parent = NULL, - const char* name = NULL - ); - - virtual ~CopyrightDialog(); + virtual ~CopyrightDialog(); protected slots: - virtual void clickedOK(); + virtual void clickedOK(); }; -#endif // CopyrightDialog_included + +#endif // COPYRIGHTDIALOG_H diff --git a/src/frontends/kde/dlg/Makefile.am b/src/frontends/kde/dlg/Makefile.am index bbd13a82dc..265a1d7431 100644 --- a/src/frontends/kde/dlg/Makefile.am +++ b/src/frontends/kde/dlg/Makefile.am @@ -23,6 +23,8 @@ GENSOURCES = copyrightdlgdata.C \ docbulletsdlgadat.h \ indexdlgdata.C \ indexdlgdata.h \ + logdlgdata.C \ + logdlgdata.h \ paradlgdata.C \ paradlgdata.h \ parageneraldlgdata.C \ @@ -62,6 +64,7 @@ moc/docextradlgdata_moc.C: docextradlgdata.C docextradlgdata.h moc/docbulletsdlgdata_moc.C: docbulletsdlgdata.C docbulletsdlgdata.h moc/emptytable_moc.C: emptytable.C emptytable.h moc/indexdlgdata_moc.C: indexdlgdata.C indexdlgdata.h +moc/logdlgdata_moc.C: logdlgdata.C logdlgdata.h moc/paradlgdata_moc.C: paradlgdata.C paradlgdata.h moc/parageneraldlgdata_moc.C: parageneraldlgdata.C parageneraldlgdata.h moc/paraabovedlgdata_moc.C: paraabovedlgdata.C paraabovedlgdata.h diff --git a/src/frontends/kde/dlg/README b/src/frontends/kde/dlg/README index f4aa9260ba..f01cadea42 100644 --- a/src/frontends/kde/dlg/README +++ b/src/frontends/kde/dlg/README @@ -3,13 +3,13 @@ from http://qtarch.sourceforge.net/ -Currently you also need this patch : +Currently you also need this patch : http://www.movement.uklinux.net/patches/lyx/qtarch-1.4.6.diff Eventually the intent is to fold this patch into the official qtarch and release a qtarch-1.4-6 tarball. -Note this is *not* the latest version, as they only support Qt 2.0. +Note this is *not* the latest version, as they only support Qt 2. You should compile in the KDE module when you compile qtarch-1.4. For me this was just a case of a make in the module/kde/ directory, @@ -70,10 +70,14 @@ o do the geometry layouts last. you cannot alter the geometry of widgets whilst they're being managed which makes any settings a pain, which are useful mainly while editing the dialog in qtarch +o remember tab order, and keyboard access in general. Tab order is decided by + instantation order of each widget, NOT the heirarchical layout. This translates + to ordering the widget descriptions in the qtarch .dlg file correctly. + o when doing layout, add all the layouts before any of the widgets otherwise qtarch has a tendency to get confused -o qtarch often produces code that initialises stuff in the wrong order. +o qtarch can produce code that initialises stuff in the wrong order. This is nasty, but usually dumps core so is noticable. Either way, the cheesy perl script checkinitorder.pl will verify the produced files for you - if it complains you need to hack the .dlg file to re-arrange the order. diff --git a/src/frontends/kde/dlg/copyrightdlgdata.C b/src/frontends/kde/dlg/copyrightdlgdata.C index efc7de1e29..e396ff4597 100644 --- a/src/frontends/kde/dlg/copyrightdlgdata.C +++ b/src/frontends/kde/dlg/copyrightdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: copyrightdlgdata.C - Last generated: Wed Jan 24 06:43:16 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -16,7 +16,7 @@ #include #include "copyrightdlgdata.h" -#define Inherited QWidget +#define Inherited QDialog #include @@ -26,7 +26,7 @@ CopyrightDialogData::CopyrightDialogData const char* name ) : - Inherited( parent, name, 53248 ) + Inherited( parent, name, TRUE, 53248 ) { buttonOk = new QPushButton( this, "PushButton_OK" ); buttonOk->setGeometry( 157, 343, 151, 107 ); @@ -41,7 +41,7 @@ CopyrightDialogData::CopyrightDialogData buttonOk->setAutoRepeat( false ); buttonOk->setAutoResize( false ); buttonOk->setToggleButton( false ); - buttonOk->setDefault( false ); + buttonOk->setDefault( true ); buttonOk->setAutoDefault( true ); buttonOk->setIsMenuButton( false ); diff --git a/src/frontends/kde/dlg/copyrightdlgdata.h b/src/frontends/kde/dlg/copyrightdlgdata.h index 07e12749d1..b40e459d61 100644 --- a/src/frontends/kde/dlg/copyrightdlgdata.h +++ b/src/frontends/kde/dlg/copyrightdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: copyrightdlgdata.h - Last generated: Wed Jan 24 06:43:16 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -13,10 +13,10 @@ #ifndef CopyrightDialogData_included #define CopyrightDialogData_included -#include +#include #include -class CopyrightDialogData : public QWidget +class CopyrightDialogData : public QDialog { Q_OBJECT diff --git a/src/frontends/kde/dlg/dialogs/copyright.dlg b/src/frontends/kde/dlg/dialogs/copyright.dlg index 0d2f8c62d7..f3ccca2e5f 100644 --- a/src/frontends/kde/dlg/dialogs/copyright.dlg +++ b/src/frontends/kde/dlg/dialogs/copyright.dlg @@ -6,7 +6,7 @@ Dialog { DataHeader {copyrightdlgdata.h} DataSource {copyrightdlgdata.C} DataName {CopyrightDialogData} - WindowBaseClass {QWidget} + WindowBaseClass {QDialog} UseGetText {true} WindowFlags {53248} } @@ -19,7 +19,7 @@ Grid {5} PushButton { ToggleButton {false} - Default {false} + Default {true} AutoDefault {true} IsMenuButton {false} Text {&OK} diff --git a/src/frontends/kde/dlg/dialogs/doc.dlg b/src/frontends/kde/dlg/dialogs/doc.dlg index d1aa72accb..846dd1a02f 100644 --- a/src/frontends/kde/dlg/dialogs/doc.dlg +++ b/src/frontends/kde/dlg/dialogs/doc.dlg @@ -6,7 +6,7 @@ Dialog { DataHeader {docdlgdata.h} DataSource {docdlgdata.C} DataName {DocDialogData} - WindowBaseClass {QWidget} + WindowBaseClass {QDialog} UseGetText {true} WindowFlags {0} } @@ -46,29 +46,6 @@ PushButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -User { - UserClassHeader {tabstack.h} - UserClassName {TabStack} - Rect {5 5 630 545} - Name {User_1} - Variable {tabstack} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {false} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} PushButton { ToggleButton {false} Default {false} @@ -156,6 +133,29 @@ PushButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +User { + UserClassHeader {tabstack.h} + UserClassName {TabStack} + Rect {5 5 630 545} + Name {User_1} + Variable {tabstack} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {false} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} Box_Layout-1{ Direction {TopToBottom} diff --git a/src/frontends/kde/dlg/dialogs/docextra.dlg b/src/frontends/kde/dlg/dialogs/docextra.dlg index 6e572638a1..df16f26fb0 100644 --- a/src/frontends/kde/dlg/dialogs/docextra.dlg +++ b/src/frontends/kde/dlg/dialogs/docextra.dlg @@ -12,23 +12,21 @@ Dialog { } WidgetLayout { InitialPos {-1 -1} -Size {545 460} +Size {635 640} MinSize {0 0} MaxSize {32767 32767} Grid {5} -Label { - Text {Float placement : (FIXME)} - Alignment {289} - AutoResize {false} - Margin {-1} - Style {0} +GroupBox { + Title {Float Placement} + Alignment {Left} + Style {49} LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {5 5 105 86} - Name {labelFloatplacement} - MinimumSize {0 0} + Rect {5 5 625 378} + Name {placementBox} + MinimumSize {25 30} MaximumSize {32767 32767} BackgroundPixmap {} UseBackgroundPixmap {false} @@ -38,21 +36,23 @@ Label { DataLenName {} minWidthSizeHint {true} minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {false} FocusPolicy {NoFocus} BackgroundMode {PaletteBackground} FontPropagation {NoChildren} PalettePropagation {NoChildren} } -LineEdit { - Text {} - EchoMode {Normal} - MaxLength {32767} - FrameShown {true} - Rect {225 5 205 86} - Name {floatplacement} - Variable {floatplacement} +ComboBox { + Style {ReadOnly} + SizeLimit {10} + Policy {AtBottom} + AutoResize {false} + MaxCount {2147483647} + AutoCompletion {false} + Rect {320 10 150 65} + Name {first} + Variable {first} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -66,7 +66,113 @@ LineEdit { maxWidthSizeHint {false} maxHeightSizeHint {true} FocusPolicy {StrongFocus} - BackgroundMode {PaletteBase} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +ComboBox { + Style {ReadOnly} + SizeLimit {10} + Policy {AtBottom} + AutoResize {false} + MaxCount {2147483647} + AutoCompletion {false} + Rect {320 80 150 66} + Name {second} + Variable {second} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +ComboBox { + Style {ReadOnly} + SizeLimit {10} + Policy {AtBottom} + AutoResize {false} + MaxCount {2147483647} + AutoCompletion {false} + Rect {320 151 150 65} + Name {third} + Variable {third} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +ComboBox { + Style {ReadOnly} + SizeLimit {10} + Policy {AtBottom} + AutoResize {false} + MaxCount {2147483647} + AutoCompletion {false} + Rect {320 221 150 65} + Name {fourth} + Variable {fourth} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +CheckBox { + Checked {false} + Text {Ignore LaTeX placement rules} + AutoRepeat {false} + AutoResize {false} + Rect {10 291 615 87} + Name {ignore} + Variable {ignore} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} FontPropagation {NoChildren} PalettePropagation {NoChildren} } @@ -79,7 +185,7 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {5 96 105 86} + Rect {5 388 153 58} Name {labelsectiondepth} MinimumSize {0 0} MaximumSize {32767 32767} @@ -107,7 +213,7 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {5 187 105 86} + Rect {5 451 153 58} Name {labeltocdepth} MinimumSize {0 0} MaximumSize {32767 32767} @@ -135,7 +241,7 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {5 278 105 86} + Rect {5 514 153 58} Name {labelPSDriver} MinimumSize {0 0} MaximumSize {32767 32767} @@ -154,31 +260,6 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -CheckBox { - Checked {false} - Text {Use AMS Math} - AutoRepeat {false} - AutoResize {false} - Rect {5 369 105 86} - Name {amsmath} - Variable {amsmath} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} SpinBox { MinValue {-2} MaxValue {5} @@ -191,7 +272,7 @@ SpinBox { LineWidth {2} MidLineWidth {0} FrameMargin {0} - Rect {225 96 205 86} + Rect {320 388 153 58} Name {sectiondepth} Variable {sectiondepth} MinimumSize {0 0} @@ -223,7 +304,7 @@ SpinBox { LineWidth {2} MidLineWidth {0} FrameMargin {0} - Rect {225 187 205 86} + Rect {320 451 153 58} Name {tocdepth} Variable {tocdepth} MinimumSize {0 0} @@ -250,7 +331,7 @@ ComboBox { AutoResize {true} MaxCount {2147483647} AutoCompletion {false} - Rect {225 278 205 86} + Rect {320 514 153 58} Name {psdriver} Variable {psdriver} MinimumSize {0 0} @@ -270,96 +351,331 @@ ComboBox { FontPropagation {AllChildren} PalettePropagation {AllChildren} } +CheckBox { + Checked {false} + Text {Use AMS Math} + AutoRepeat {false} + AutoResize {false} + Rect {5 577 153 58} + Name {amsmath} + Variable {amsmath} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {First try :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 10 150 65} + Name {labelFirst} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {then :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 80 150 66} + Name {labelSecond} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {then :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 151 150 65} + Name {labelThird} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {then :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 221 150 65} + Name {labelFourth} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} -Grid_Layout-1{ +Box_Layout-1{ + Direction {TopToBottom} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {1} +} +Layout_Widget-1.1{ + Widget {placementBox} + BoxStretch {3} + Alignment {36} +} +Box_Layout-1.1.1{ + Direction {TopToBottom} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {1} +} +Grid_Layout-1.1.1.1{ Border {5} AutoBorder {5} Name {} ColumnInfo {5 1} ColumnInfo {5 1} - ColumnInfo {5 2} ColumnInfo {5 1} - BoxStretch {1} + ColumnInfo {5 1} + BoxStretch {3} } -Grid_Row-1.1{ +Grid_Row-1.1.1.1.1{ Stretch {1} Spacing {0} } -Layout_Widget-1.1.1{ - Widget {labelFloatplacement} +Layout_Widget-1.1.1.1.1.1{ + Widget {labelFirst} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.1.2{ +Grid_Spacer-1.1.1.1.1.2{ } -Layout_Widget-1.1.3{ - Widget {floatplacement} +Layout_Widget-1.1.1.1.1.3{ + Widget {first} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.1.4{ +Grid_Spacer-1.1.1.1.1.4{ } -Grid_Row-1.2{ +Grid_Row-1.1.1.1.2{ Stretch {1} Spacing {0} } -Layout_Widget-1.2.1{ +Layout_Widget-1.1.1.1.2.1{ + Widget {labelSecond} + BoxStretch {1} + Alignment {36} +} +Grid_Spacer-1.1.1.1.2.2{ +} +Layout_Widget-1.1.1.1.2.3{ + Widget {second} + BoxStretch {1} + Alignment {36} +} +Grid_Spacer-1.1.1.1.2.4{ +} +Grid_Row-1.1.1.1.3{ + Stretch {1} + Spacing {0} +} +Layout_Widget-1.1.1.1.3.1{ + Widget {labelThird} + BoxStretch {1} + Alignment {36} +} +Grid_Spacer-1.1.1.1.3.2{ +} +Layout_Widget-1.1.1.1.3.3{ + Widget {third} + BoxStretch {1} + Alignment {36} +} +Grid_Spacer-1.1.1.1.3.4{ +} +Grid_Row-1.1.1.1.4{ + Stretch {1} + Spacing {0} +} +Layout_Widget-1.1.1.1.4.1{ + Widget {labelFourth} + BoxStretch {1} + Alignment {36} +} +Grid_Spacer-1.1.1.1.4.2{ +} +Layout_Widget-1.1.1.1.4.3{ + Widget {fourth} + BoxStretch {1} + Alignment {36} +} +Grid_Spacer-1.1.1.1.4.4{ +} +Box_Layout-1.1.1.2{ + Direction {LeftToRight} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {1} +} +Layout_Widget-1.1.1.2.1{ + Widget {ignore} + BoxStretch {1} + Alignment {36} +} +Grid_Layout-1.2{ + Border {5} + AutoBorder {5} + Name {} + ColumnInfo {5 1} + ColumnInfo {5 1} + ColumnInfo {5 1} + ColumnInfo {5 1} + BoxStretch {2} +} +Grid_Row-1.2.1{ + Stretch {1} + Spacing {0} +} +Layout_Widget-1.2.1.1{ Widget {labelsectiondepth} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.2.2{ +Grid_Spacer-1.2.1.2{ } -Layout_Widget-1.2.3{ +Layout_Widget-1.2.1.3{ Widget {sectiondepth} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.2.4{ +Grid_Spacer-1.2.1.4{ } -Grid_Row-1.3{ +Grid_Row-1.2.2{ Stretch {1} Spacing {0} } -Layout_Widget-1.3.1{ +Layout_Widget-1.2.2.1{ Widget {labeltocdepth} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.3.2{ +Grid_Spacer-1.2.2.2{ } -Layout_Widget-1.3.3{ +Layout_Widget-1.2.2.3{ Widget {tocdepth} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.3.4{ +Grid_Spacer-1.2.2.4{ } -Grid_Row-1.4{ +Grid_Row-1.2.3{ Stretch {1} Spacing {0} } -Layout_Widget-1.4.1{ +Layout_Widget-1.2.3.1{ Widget {labelPSDriver} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.4.2{ +Grid_Spacer-1.2.3.2{ } -Layout_Widget-1.4.3{ +Layout_Widget-1.2.3.3{ Widget {psdriver} BoxStretch {1} - Alignment {33} + Alignment {36} } -Grid_Spacer-1.4.4{ +Grid_Spacer-1.2.3.4{ } -Grid_Row-1.5{ +Grid_Row-1.2.4{ Stretch {1} Spacing {0} } -Layout_Widget-1.5.1{ +Layout_Widget-1.2.4.1{ Widget {amsmath} BoxStretch {1} - Alignment {33} + Alignment {36} } } diff --git a/src/frontends/kde/dlg/dialogs/docgeometry.dlg b/src/frontends/kde/dlg/dialogs/docgeometry.dlg index 066f1d8ee0..606c7fcc35 100644 --- a/src/frontends/kde/dlg/dialogs/docgeometry.dlg +++ b/src/frontends/kde/dlg/dialogs/docgeometry.dlg @@ -178,6 +178,121 @@ ComboBox { FontPropagation {AllChildren} PalettePropagation {AllChildren} } +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {10 140 285 35} + Name {width} + Variable {width} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {10 255 285 35} + Name {height} + Variable {height} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {310 85 285 28} + Name {headheight} + Variable {headheight} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {310 178 285 27} + Name {headsep} + Variable {headsep} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {310 270 285 28} + Name {footskip} + Variable {footskip} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} Label { Text {Margins :} Alignment {0} @@ -206,34 +321,6 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -ComboBox { - Style {ReadOnly} - SizeLimit {30} - Policy {AtBottom} - AutoResize {true} - MaxCount {2147483647} - AutoCompletion {false} - Rect {241 355 112 54} - Name {margins} - Variable {margins} - Signal {[Protected] highlighted --> marginsChanged (const char*)} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {StrongFocus} - BackgroundMode {PaletteBackground} - FontPropagation {AllChildren} - PalettePropagation {AllChildren} -} Label { Text {Width :} Alignment {0} @@ -402,56 +489,6 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -RadioButton { - Checked {true} - Text {Portrait} - AutoRepeat {false} - AutoResize {false} - Rect {481 412 1 57} - Name {portrait} - Variable {portrait} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -RadioButton { - Checked {false} - Text {Landscape} - AutoRepeat {false} - AutoResize {false} - Rect {481 531 1 57} - Name {landscape} - Variable {landscape} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} Label { Text {Header height :} Alignment {0} @@ -536,12 +573,17 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -User { - UserClassHeader {lengthentry.h} - UserClassName {LengthEntry} - Rect {10 140 285 35} - Name {width} - Variable {width} +ComboBox { + Style {ReadOnly} + SizeLimit {30} + Policy {AtBottom} + AutoResize {true} + MaxCount {2147483647} + AutoCompletion {false} + Rect {241 355 112 54} + Name {margins} + Variable {margins} + Signal {[Protected] highlighted --> marginsChanged (const char*)} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -554,33 +596,10 @@ User { minHeightSizeHint {true} maxWidthSizeHint {false} maxHeightSizeHint {true} - FocusPolicy {NoFocus} + FocusPolicy {StrongFocus} BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -User { - UserClassHeader {lengthentry.h} - UserClassName {LengthEntry} - Rect {10 255 285 35} - Name {height} - Variable {height} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} } User { UserClassHeader {lengthentry.h} @@ -651,75 +670,6 @@ User { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -User { - UserClassHeader {lengthentry.h} - UserClassName {LengthEntry} - Rect {310 85 285 28} - Name {headheight} - Variable {headheight} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -User { - UserClassHeader {lengthentry.h} - UserClassName {LengthEntry} - Rect {310 178 285 27} - Name {headsep} - Variable {headsep} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -User { - UserClassHeader {lengthentry.h} - UserClassName {LengthEntry} - Rect {310 270 285 28} - Name {footskip} - Variable {footskip} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} User { UserClassHeader {lengthentry.h} UserClassName {LengthEntry} @@ -743,6 +693,56 @@ User { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +RadioButton { + Checked {true} + Text {Portrait} + AutoRepeat {false} + AutoResize {false} + Rect {481 412 1 57} + Name {portrait} + Variable {portrait} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +RadioButton { + Checked {false} + Text {Landscape} + AutoRepeat {false} + AutoResize {false} + Rect {481 531 1 57} + Name {landscape} + Variable {landscape} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} Box_Layout-1{ Direction {TopToBottom} diff --git a/src/frontends/kde/dlg/dialogs/docsettings.dlg b/src/frontends/kde/dlg/dialogs/docsettings.dlg index f56c356082..5cb72caa78 100644 --- a/src/frontends/kde/dlg/dialogs/docsettings.dlg +++ b/src/frontends/kde/dlg/dialogs/docsettings.dlg @@ -12,51 +12,21 @@ Dialog { } WidgetLayout { InitialPos {0 0} -Size {455 505} +Size {550 515} MinSize {0 0} MaxSize {32767 32767} Grid {5} -Label { - Text {Document class :} - Alignment {289} - AutoResize {false} - Margin {-1} - Style {0} +GroupBox { + Title {Paragraph spacing} + Alignment {Left} + Style {49} LineWidth {1} MidLineWidth {0} - FrameMargin {0} - Rect {95 5 85 23} - Name {labelClass} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -ComboBox { - Style {ReadOnly} - SizeLimit {30} - Policy {AtBottom} - AutoResize {false} - MaxCount {2147483647} - AutoCompletion {false} - Rect {275 5 85 23} - Name {docclass} - Variable {docclass} - Signal {[Protected] highlighted --> classChanged (const char*)} - MinimumSize {0 0} + FrameMargin {17} + Rect {5 180 540 220} + Name {paraspacingbox} + MinimumSize {35 69} MaximumSize {32767 32767} BackgroundPixmap {} UseBackgroundPixmap {false} @@ -67,14 +37,14 @@ ComboBox { minWidthSizeHint {true} minHeightSizeHint {true} maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {StrongFocus} + maxHeightSizeHint {false} + FocusPolicy {NoFocus} BackgroundMode {PaletteBackground} - FontPropagation {AllChildren} - PalettePropagation {AllChildren} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} } Label { - Text {Page style :} + Text {Font size :} Alignment {289} AutoResize {false} Margin {-1} @@ -82,8 +52,8 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {95 33 85 23} - Name {labelPagestyle} + Rect {114 95 104 25} + Name {labelFontSize} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -110,7 +80,7 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {95 61 85 22} + Rect {114 65 104 25} Name {labelFont} MinimumSize {0 0} MaximumSize {32767 32767} @@ -130,7 +100,7 @@ Label { PalettePropagation {NoChildren} } Label { - Text {Font size :} + Text {Page style :} Alignment {289} AutoResize {false} Margin {-1} @@ -138,8 +108,36 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {95 88 85 23} - Name {labelFontSize} + Rect {114 35 104 25} + Name {labelPagestyle} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {Document class :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {114 5 104 25} + Name {labelClass} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -164,7 +162,35 @@ ComboBox { AutoResize {false} MaxCount {2147483647} AutoCompletion {false} - Rect {275 33 85 23} + Rect {332 5 104 25} + Name {docclass} + Variable {docclass} + Signal {[Protected] highlighted --> classChanged (const char*)} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +ComboBox { + Style {ReadOnly} + SizeLimit {30} + Policy {AtBottom} + AutoResize {false} + MaxCount {2147483647} + AutoCompletion {false} + Rect {332 35 104 25} Name {pagestyle} Variable {pagestyle} MinimumSize {0 0} @@ -191,7 +217,7 @@ ComboBox { AutoResize {false} MaxCount {2147483647} AutoCompletion {false} - Rect {275 61 85 22} + Rect {332 65 104 25} Name {font} Variable {font} MinimumSize {0 0} @@ -218,7 +244,7 @@ ComboBox { AutoResize {false} MaxCount {2147483647} AutoCompletion {false} - Rect {275 88 85 23} + Rect {332 95 104 25} Name {fontsize} Variable {fontsize} MinimumSize {0 0} @@ -243,7 +269,7 @@ CheckBox { Text {Two-sided} AutoRepeat {false} AutoResize {false} - Rect {93 116 88 91} + Rect {112 125 107 50} Name {sides} Variable {sides} MinimumSize {0 0} @@ -268,7 +294,7 @@ CheckBox { Text {Two column pages} AutoRepeat {false} AutoResize {false} - Rect {274 116 88 91} + Rect {331 125 107 50} Name {columns} Variable {columns} MinimumSize {0 0} @@ -288,31 +314,6 @@ CheckBox { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -CheckBox { - Checked {false} - Text {Skip separation (FIXME)} - AutoRepeat {false} - AutoResize {false} - Rect {153 212 149 91} - Name {separation} - Variable {separation} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} Label { Text {Inter-line spacing :} Alignment {289} @@ -322,7 +323,7 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {5 308 145 46} + Rect {5 405 177 50} Name {labelSpacing} MinimumSize {0 0} MaximumSize {32767 32767} @@ -341,6 +342,146 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +Label { + Text {Extra options :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {5 460 268 50} + Name {labelExtraoptions} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {Default paragraph spacing :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 247 128 30} + Name {labelSkip} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {Size :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 294 173 30} + Name {labelparasize} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {Shrink :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 365 173 30} + Name {paralabelShrink} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +Label { + Text {Stretch :} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {10 329 173 31} + Name {paralabelStretch} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} ComboBox { Style {ReadOnly} SizeLimit {30} @@ -348,7 +489,104 @@ ComboBox { AutoResize {false} MaxCount {2147483647} AutoCompletion {false} - Rect {155 308 215 46} + Rect {284 247 128 30} + Name {paraspacing} + Variable {paraspacing} + Signal {[Protected] highlighted --> paraspacingChanged (const char*)} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {188 294 174 30} + Name {paraspacingValue} + Variable {paraspacingValue} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {188 329 174 31} + Name {paraspacingStretch} + Variable {paraspacingStretch} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +User { + UserClassHeader {lengthentry.h} + UserClassName {LengthEntry} + Rect {188 365 174 30} + Name {paraspacingShrink} + Variable {paraspacingShrink} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +ComboBox { + Style {ReadOnly} + SizeLimit {30} + Policy {AtBottom} + AutoResize {false} + MaxCount {2147483647} + AutoCompletion {false} + Rect {187 405 176 50} Name {linespacing} Variable {linespacing} MinimumSize {0 0} @@ -368,121 +606,13 @@ ComboBox { FontPropagation {AllChildren} PalettePropagation {AllChildren} } -Label { - Text {Default skip spacing :} - Alignment {289} - AutoResize {false} - Margin {-1} - Style {0} - LineWidth {1} - MidLineWidth {0} - FrameMargin {0} - Rect {5 359 145 45} - Name {labelSkip} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -ComboBox { - Style {ReadOnly} - SizeLimit {30} - Policy {AtBottom} - AutoResize {false} - MaxCount {2147483647} - AutoCompletion {false} - Rect {155 359 215 45} - Name {skipspacing} - Variable {skipspacing} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {StrongFocus} - BackgroundMode {PaletteBackground} - FontPropagation {AllChildren} - PalettePropagation {AllChildren} -} -LineEdit { - Text {} - EchoMode {Normal} - MaxLength {32767} - FrameShown {true} - Rect {230 409 220 91} - Name {extraoptions} - Variable {extraoptions} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {StrongFocus} - BackgroundMode {PaletteBase} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -Label { - Text {Extra options :} - Alignment {289} - AutoResize {false} - Margin {-1} - Style {0} - LineWidth {1} - MidLineWidth {0} - FrameMargin {0} - Rect {5 409 220 91} - Name {labelExtraoptions} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} KDE::KRestrictedLine { ValidChars {0123456789.,} Text {} EchoMode {Normal} MaxLength {32767} FrameShown {true} - Rect {375 308 75 46} + Rect {368 405 177 50} Name {linespacingVal} Variable {linespacingVal} MinimumSize {0 0} @@ -502,17 +632,14 @@ KDE::KRestrictedLine { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -Label { - Text {FIXME} - Alignment {289} - AutoResize {false} - Margin {-1} - Style {0} - LineWidth {1} - MidLineWidth {0} - FrameMargin {0} - Rect {375 359 75 45} - Name {FIXME} +LineEdit { + Text {} + EchoMode {Normal} + MaxLength {32767} + FrameShown {true} + Rect {278 460 267 50} + Name {extraoptions} + Variable {extraoptions} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -521,11 +648,37 @@ Label { ReadPixmapFromData {false} DataVarName {} DataLenName {} - minWidthSizeHint {false} - minHeightSizeHint {false} + minWidthSizeHint {true} + minHeightSizeHint {true} maxWidthSizeHint {false} - maxHeightSizeHint {false} - FocusPolicy {NoFocus} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBase} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +CheckBox { + Checked {false} + Text {Add space} + AutoRepeat {false} + AutoResize {false} + Rect {10 200 398 30} + Name {addspace} + Variable {addspace} + Signal {[Protected] toggled --> addspaceChanged (bool)} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} BackgroundMode {PaletteBackground} FontPropagation {NoChildren} PalettePropagation {NoChildren} @@ -548,7 +701,7 @@ Grid_Layout-1.1{ ColumnInfo {5 1} ColumnInfo {5 1} ColumnInfo {5 1} - BoxStretch {1} + BoxStretch {2} } Grid_Row-1.1.1{ Stretch {1} @@ -657,7 +810,23 @@ Layout_Widget-1.2.4{ Box_Stretch-1.2.5{ Stretch {1} } -Box_Layout-1.3{ +Layout_Widget-1.3{ + Widget {paraspacingbox} + BoxStretch {3} + Alignment {33} +} +Box_Layout-1.3.1{ + Direction {TopToBottom} + Border {5} + AutoBorder {17} + Name {} + Strut {0} + Stretch {1} +} +Box_Spacing-1.3.1.1{ + Spacing {15} +} +Box_Layout-1.3.1.2{ Direction {LeftToRight} Border {5} AutoBorder {5} @@ -665,63 +834,116 @@ Box_Layout-1.3{ Strut {0} Stretch {1} } -Box_Stretch-1.3.1{ - Stretch {1} -} -Layout_Widget-1.3.2{ - Widget {separation} - BoxStretch {1} +Layout_Widget-1.3.1.2.1{ + BoxStretch {3} Alignment {33} } -Box_Stretch-1.3.3{ +Box_Stretch-1.3.1.2.2{ Stretch {1} } -Grid_Layout-1.4{ +Box_Layout-1.3.1.3{ + Direction {LeftToRight} + Border {5} + AutoBorder {17} + Name {} + Strut {0} + Stretch {1} +} +Layout_Widget-1.3.1.3.1{ + Widget {labelSkip} + BoxStretch {1} + Alignment {36} +} +Box_Stretch-1.3.1.3.2{ + Stretch {1} +} +Layout_Widget-1.3.1.3.3{ + Widget {paraspacing} + BoxStretch {1} + Alignment {36} +} +Box_Stretch-1.3.1.3.4{ + Stretch {1} +} +Grid_Layout-1.3.1.4{ Border {5} AutoBorder {5} Name {} - ColumnInfo {5 2} - ColumnInfo {5 3} ColumnInfo {5 1} - BoxStretch {1} + ColumnInfo {5 1} + ColumnInfo {5 1} + BoxStretch {3} } -Grid_Row-1.4.1{ +Grid_Row-1.3.1.4.1{ Stretch {1} Spacing {0} } -Layout_Widget-1.4.1.1{ +Layout_Widget-1.3.1.4.1.1{ + Widget {labelparasize} + BoxStretch {1} + Alignment {33} +} +Layout_Widget-1.3.1.4.1.2{ + Widget {paraspacingValue} + BoxStretch {1} + Alignment {33} +} +Grid_Spacer-1.3.1.4.1.3{ +} +Grid_Row-1.3.1.4.2{ + Stretch {1} + Spacing {0} +} +Layout_Widget-1.3.1.4.2.1{ + Widget {paralabelStretch} + BoxStretch {1} + Alignment {33} +} +Layout_Widget-1.3.1.4.2.2{ + Widget {paraspacingStretch} + BoxStretch {1} + Alignment {33} +} +Grid_Spacer-1.3.1.4.2.3{ +} +Grid_Row-1.3.1.4.3{ + Stretch {1} + Spacing {0} +} +Layout_Widget-1.3.1.4.3.1{ + Widget {paralabelShrink} + BoxStretch {1} + Alignment {33} +} +Layout_Widget-1.3.1.4.3.2{ + Widget {paraspacingShrink} + BoxStretch {1} + Alignment {33} +} +Grid_Spacer-1.3.1.4.3.3{ +} +Box_Layout-1.4{ + Direction {LeftToRight} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {1} +} +Layout_Widget-1.4.1{ Widget {labelSpacing} BoxStretch {1} - Alignment {33} + Alignment {36} } -Layout_Widget-1.4.1.2{ +Layout_Widget-1.4.2{ Widget {linespacing} BoxStretch {1} - Alignment {33} + Alignment {36} } -Layout_Widget-1.4.1.3{ +Layout_Widget-1.4.3{ Widget {linespacingVal} BoxStretch {1} - Alignment {33} -} -Grid_Row-1.4.2{ - Stretch {1} - Spacing {0} -} -Layout_Widget-1.4.2.1{ - Widget {labelSkip} - BoxStretch {1} - Alignment {33} -} -Layout_Widget-1.4.2.2{ - Widget {skipspacing} - BoxStretch {1} - Alignment {33} -} -Layout_Widget-1.4.2.3{ - Widget {FIXME} - BoxStretch {1} - Alignment {33} + Alignment {36} } Box_Layout-1.5{ Direction {LeftToRight} diff --git a/src/frontends/kde/dlg/dialogs/index.dlg b/src/frontends/kde/dlg/dialogs/index.dlg index 8043cefb78..954fca8575 100644 --- a/src/frontends/kde/dlg/dialogs/index.dlg +++ b/src/frontends/kde/dlg/dialogs/index.dlg @@ -6,7 +6,7 @@ Dialog { DataHeader {indexdlgdata.h} DataSource {indexdlgdata.C} DataName {IndexDialogData} - WindowBaseClass {QWidget} + WindowBaseClass {QDialog} UseGetText {true} WindowFlags {53248} } diff --git a/src/frontends/kde/dlg/dialogs/log.dlg b/src/frontends/kde/dlg/dialogs/log.dlg new file mode 100644 index 0000000000..34c1cc8639 --- /dev/null +++ b/src/frontends/kde/dlg/dialogs/log.dlg @@ -0,0 +1,157 @@ +DlgEdit:v1.2:Dialog: +Dialog { + ClassHeader {logdlg.h} + ClassSource {logdlg.C} + ClassName {LogDialog} + DataHeader {logdlgdata.h} + DataSource {logdlgdata.C} + DataName {LogDialogData} + WindowBaseClass {QDialog} + IsModal {false} + UseGetText {true} + WindowFlags {0} +} +WidgetLayout { +InitialPos {-1 -1} +Size {400 300} +MinSize {0 0} +MaxSize {32767 32767} +Grid {5} + +PushButton { + ToggleButton {false} + Default {true} + AutoDefault {false} + IsMenuButton {false} + Text {&Close} + AutoRepeat {false} + AutoResize {false} + Rect {241 269 77 26} + Name {close} + Variable {close} + Signal {[Protected] clicked --> closePressed ()} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +PushButton { + ToggleButton {false} + Default {false} + AutoDefault {false} + IsMenuButton {false} + Text {&Update} + AutoRepeat {false} + AutoResize {false} + Rect {82 269 77 26} + Name {updateb} + Variable {updateb} + Signal {[Protected] clicked --> updatePressed ()} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +MultiLineEdit { + Line {} + ReadOnly {true} + OverwriteMode {false} + AutoUpdate {true} + Style {51} + LineWidth {2} + MidLineWidth {0} + FrameMargin {0} + Rect {5 5 390 259} + Name {viewer} + Variable {viewer} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {false} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBase} + FontPropagation {SameFont} + PalettePropagation {SameFont} +} + +Box_Layout-1{ + Direction {TopToBottom} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {1} +} +Box_Layout-1.1{ + Direction {LeftToRight} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {10} +} +Layout_Widget-1.1.1{ + Widget {viewer} + BoxStretch {1} + Alignment {36} +} +Box_Layout-1.2{ + Direction {LeftToRight} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {1} +} +Box_Stretch-1.2.1{ + Stretch {1} +} +Layout_Widget-1.2.2{ + Widget {updateb} + BoxStretch {1} + Alignment {36} +} +Box_Stretch-1.2.3{ + Stretch {1} +} +Layout_Widget-1.2.4{ + Widget {close} + BoxStretch {1} + Alignment {36} +} +Box_Stretch-1.2.5{ + Stretch {1} +} +} diff --git a/src/frontends/kde/dlg/dialogs/para.dlg b/src/frontends/kde/dlg/dialogs/para.dlg index df6a6d4143..83f873cd21 100644 --- a/src/frontends/kde/dlg/dialogs/para.dlg +++ b/src/frontends/kde/dlg/dialogs/para.dlg @@ -6,7 +6,7 @@ Dialog { DataHeader {paradlgdata.h} DataSource {paradlgdata.C} DataName {ParaDialogData} - WindowBaseClass {QWidget} + WindowBaseClass {QDialog} UseGetText {true} WindowFlags {0} } @@ -46,29 +46,6 @@ PushButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -User { - UserClassHeader {tabstack.h} - UserClassName {TabStack} - Rect {5 5 630 545} - Name {User_1} - Variable {tabstack} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {false} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} PushButton { ToggleButton {false} Default {false} @@ -156,6 +133,29 @@ PushButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +User { + UserClassHeader {tabstack.h} + UserClassName {TabStack} + Rect {5 5 630 545} + Name {User_1} + Variable {tabstack} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {false} + FocusPolicy {NoFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} Box_Layout-1{ Direction {TopToBottom} diff --git a/src/frontends/kde/dlg/dialogs/paraabove.dlg b/src/frontends/kde/dlg/dialogs/paraabove.dlg index f96b89703a..a8e8fb18f4 100644 --- a/src/frontends/kde/dlg/dialogs/paraabove.dlg +++ b/src/frontends/kde/dlg/dialogs/paraabove.dlg @@ -124,7 +124,7 @@ ComboBox { PalettePropagation {AllChildren} } Label { - Text {Value} + Text {Size} Alignment {289} AutoResize {false} Margin {-1} @@ -152,7 +152,7 @@ Label { PalettePropagation {NoChildren} } Label { - Text {Plus} + Text {Stretch} Alignment {289} AutoResize {false} Margin {-1} @@ -180,7 +180,7 @@ Label { PalettePropagation {NoChildren} } Label { - Text {Minus} + Text {Shrink} Alignment {289} AutoResize {false} Margin {-1} diff --git a/src/frontends/kde/dlg/dialogs/parabelow.dlg b/src/frontends/kde/dlg/dialogs/parabelow.dlg index f9bf5e7188..5b3c01709d 100644 --- a/src/frontends/kde/dlg/dialogs/parabelow.dlg +++ b/src/frontends/kde/dlg/dialogs/parabelow.dlg @@ -124,7 +124,7 @@ ComboBox { PalettePropagation {AllChildren} } Label { - Text {Value} + Text {Size} Alignment {289} AutoResize {false} Margin {-1} @@ -152,7 +152,7 @@ Label { PalettePropagation {NoChildren} } Label { - Text {Plus} + Text {Stretch} Alignment {289} AutoResize {false} Margin {-1} @@ -180,7 +180,7 @@ Label { PalettePropagation {NoChildren} } Label { - Text {Minus} + Text {Shrink} Alignment {289} AutoResize {false} Margin {-1} diff --git a/src/frontends/kde/dlg/dialogs/paraextra.dlg b/src/frontends/kde/dlg/dialogs/paraextra.dlg index aca84413cc..7600b059f1 100644 --- a/src/frontends/kde/dlg/dialogs/paraextra.dlg +++ b/src/frontends/kde/dlg/dialogs/paraextra.dlg @@ -17,34 +17,6 @@ MinSize {0 0} MaxSize {32767 32767} Grid {5} -ButtonGroup { - Exclusive {true} - Title {Alignment} - Alignment {Left} - Style {49} - LineWidth {1} - MidLineWidth {0} - FrameMargin {0} - Rect {5 124 265 331} - Name {specialalignment} - Variable {specialalignment} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {false} - minHeightSizeHint {false} - maxWidthSizeHint {false} - maxHeightSizeHint {false} - FocusPolicy {NoFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} ComboBox { Style {ReadOnly} SizeLimit {10} @@ -129,6 +101,32 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +KDE::KRestrictedLine { + ValidChars {0123456789.-,} + Text {} + EchoMode {Normal} + MaxLength {32767} + FrameShown {true} + Rect {275 65 87 54} + Name {widthvalue} + Variable {widthvalue} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBase} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} ComboBox { Style {ReadOnly} SizeLimit {10} @@ -156,14 +154,17 @@ ComboBox { FontPropagation {AllChildren} PalettePropagation {AllChildren} } -CheckBox { - Checked {false} - Text {&HFill between minipage paragraphs} - AutoRepeat {false} - AutoResize {false} - Rect {275 189 265 65} - Name {hfillbetween} - Variable {hfillbetween} +ButtonGroup { + Exclusive {true} + Title {Alignment} + Alignment {Left} + Style {49} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {5 124 265 331} + Name {specialalignment} + Variable {specialalignment} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -172,36 +173,11 @@ CheckBox { ReadPixmapFromData {false} DataVarName {} DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -CheckBox { - Checked {false} - Text {&Start new minipage} - AutoRepeat {false} - AutoResize {false} - Rect {275 325 265 65} - Name {startnewminipage} - Variable {startnewminipage} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} + minWidthSizeHint {false} + minHeightSizeHint {false} + maxWidthSizeHint {false} + maxHeightSizeHint {false} + FocusPolicy {NoFocus} BackgroundMode {PaletteBackground} FontPropagation {NoChildren} PalettePropagation {NoChildren} @@ -281,15 +257,14 @@ RadioButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -KDE::KRestrictedLine { - ValidChars {0123456789.-,} - Text {} - EchoMode {Normal} - MaxLength {32767} - FrameShown {true} - Rect {275 65 87 54} - Name {widthvalue} - Variable {widthvalue} +CheckBox { + Checked {false} + Text {&HFill between minipage paragraphs} + AutoRepeat {false} + AutoResize {false} + Rect {275 189 265 65} + Name {hfillbetween} + Variable {hfillbetween} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -300,10 +275,35 @@ KDE::KRestrictedLine { DataLenName {} minWidthSizeHint {true} minHeightSizeHint {true} - maxWidthSizeHint {false} + maxWidthSizeHint {true} maxHeightSizeHint {true} - FocusPolicy {StrongFocus} - BackgroundMode {PaletteBase} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +CheckBox { + Checked {false} + Text {&Start new minipage} + AutoRepeat {false} + AutoResize {false} + Rect {275 325 265 65} + Name {startnewminipage} + Variable {startnewminipage} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} FontPropagation {NoChildren} PalettePropagation {NoChildren} } diff --git a/src/frontends/kde/dlg/dialogs/parageneral.dlg b/src/frontends/kde/dlg/dialogs/parageneral.dlg index e75e001fc8..6a12f012bd 100644 --- a/src/frontends/kde/dlg/dialogs/parageneral.dlg +++ b/src/frontends/kde/dlg/dialogs/parageneral.dlg @@ -12,22 +12,44 @@ Dialog { } WidgetLayout { InitialPos {-1 -1} -Size {750 550} +Size {615 500} MinSize {0 0} MaxSize {32767 32767} Grid {5} -ButtonGroup { - Exclusive {true} - Title {Alignment} - Alignment {Left} - Style {49} - LineWidth {1} - MidLineWidth {0} - FrameMargin {0} - Rect {5 5 123 375} - Name {alignment} - Variable {alignment} +ComboBox { + Style {ReadOnly} + SizeLimit {4} + Policy {AtBottom} + AutoResize {false} + MaxCount {4} + AutoCompletion {false} + Rect {130 5 120 59} + Name {justification} + Variable {justification} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBackground} + FontPropagation {AllChildren} + PalettePropagation {AllChildren} +} +User { + UserClassHeader {tabstack.h} + UserClassName {TabStack} + Rect {5 69 605 294} + Name {spacetab} + Variable {spacetab} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -50,7 +72,7 @@ CheckBox { Text {Draw line above paragraph} AutoRepeat {false} AutoResize {false} - Rect {5 385 365 50} + Rect {5 368 298 39} Name {lineabove} Variable {lineabove} MinimumSize {0 0} @@ -75,7 +97,7 @@ CheckBox { Text {Draw line below paragraph} AutoRepeat {false} AutoResize {false} - Rect {5 440 365 50} + Rect {5 412 298 39} Name {linebelow} Variable {linebelow} MinimumSize {0 0} @@ -100,7 +122,7 @@ CheckBox { Text {Don't indent paragraph} AutoRepeat {false} AutoResize {false} - Rect {5 495 365 50} + Rect {5 456 298 39} Name {noindent} Variable {noindent} MinimumSize {0 0} @@ -120,106 +142,6 @@ CheckBox { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -RadioButton { - Checked {false} - Text {Block} - AutoRepeat {false} - AutoResize {false} - Rect {10 62 113 37} - Name {block} - Variable {block} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -RadioButton { - Checked {false} - Text {Center} - AutoRepeat {false} - AutoResize {false} - Rect {10 142 113 37} - Name {center} - Variable {center} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -RadioButton { - Checked {false} - Text {Left} - AutoRepeat {false} - AutoResize {false} - Rect {10 221 113 37} - Name {left} - Variable {left} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} -RadioButton { - Checked {false} - Text {Right} - AutoRepeat {false} - AutoResize {false} - Rect {10 301 113 37} - Name {right} - Variable {right} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} Label { Text {Label width} Alignment {289} @@ -229,7 +151,7 @@ Label { LineWidth {1} MidLineWidth {0} FrameMargin {0} - Rect {375 385 183 160} + Rect {308 368 149 127} Name {labelwidthlabel} MinimumSize {0 0} MaximumSize {32767 32767} @@ -253,7 +175,7 @@ LineEdit { EchoMode {Normal} MaxLength {32767} FrameShown {true} - Rect {563 385 182 160} + Rect {462 368 148 127} Name {labelwidth} Variable {labelwidth} MinimumSize {0 0} @@ -273,12 +195,17 @@ LineEdit { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -User { - UserClassHeader {tabstack.h} - UserClassName {TabStack} - Rect {133 5 612 375} - Name {spacetab} - Variable {spacetab} +Label { + Text {Justification} + Alignment {289} + AutoResize {false} + Margin {-1} + Style {0} + LineWidth {1} + MidLineWidth {0} + FrameMargin {0} + Rect {5 5 120 59} + Name {labelJustification} MinimumSize {0 0} MaximumSize {32767 32767} BackgroundPixmap {} @@ -289,8 +216,8 @@ User { DataLenName {} minWidthSizeHint {true} minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {false} + maxWidthSizeHint {true} + maxHeightSizeHint {true} FocusPolicy {NoFocus} BackgroundMode {PaletteBackground} FontPropagation {NoChildren} @@ -311,65 +238,35 @@ Box_Layout-1.1{ AutoBorder {5} Name {} Strut {0} - Stretch {5} + Stretch {1} } Layout_Widget-1.1.1{ - Widget {alignment} + Widget {labelJustification} BoxStretch {1} - Alignment {33} -} -Box_Layout-1.1.1.1{ - Direction {TopToBottom} - Border {5} - AutoBorder {5} - Name {} - Strut {0} - Stretch {1} -} -Box_Spacing-1.1.1.1.1{ - Spacing {15} -} -Box_Stretch-1.1.1.1.2{ - Stretch {1} -} -Layout_Widget-1.1.1.1.3{ - Widget {block} - BoxStretch {1} - Alignment {1} -} -Box_Stretch-1.1.1.1.4{ - Stretch {1} -} -Layout_Widget-1.1.1.1.5{ - Widget {center} - BoxStretch {1} - Alignment {1} -} -Box_Stretch-1.1.1.1.6{ - Stretch {1} -} -Layout_Widget-1.1.1.1.7{ - Widget {left} - BoxStretch {1} - Alignment {1} -} -Box_Stretch-1.1.1.1.8{ - Stretch {1} -} -Layout_Widget-1.1.1.1.9{ - Widget {right} - BoxStretch {1} - Alignment {1} -} -Box_Stretch-1.1.1.1.10{ - Stretch {1} + Alignment {36} } Layout_Widget-1.1.2{ - Widget {spacetab} - BoxStretch {5} + Widget {justification} + BoxStretch {1} Alignment {36} } +Box_Stretch-1.1.3{ + Stretch {3} +} Box_Layout-1.2{ + Direction {LeftToRight} + Border {5} + AutoBorder {5} + Name {} + Strut {0} + Stretch {5} +} +Layout_Widget-1.2.1{ + Widget {spacetab} + BoxStretch {5} + Alignment {36} +} +Box_Layout-1.3{ Direction {LeftToRight} Border {5} AutoBorder {5} @@ -377,7 +274,7 @@ Box_Layout-1.2{ Strut {0} Stretch {2} } -Box_Layout-1.2.1{ +Box_Layout-1.3.1{ Direction {TopToBottom} Border {5} AutoBorder {5} @@ -385,22 +282,22 @@ Box_Layout-1.2.1{ Strut {0} Stretch {1} } -Layout_Widget-1.2.1.1{ +Layout_Widget-1.3.1.1{ Widget {lineabove} BoxStretch {1} Alignment {1} } -Layout_Widget-1.2.1.2{ +Layout_Widget-1.3.1.2{ Widget {linebelow} BoxStretch {1} Alignment {1} } -Layout_Widget-1.2.1.3{ +Layout_Widget-1.3.1.3{ Widget {noindent} BoxStretch {1} Alignment {1} } -Box_Layout-1.2.2{ +Box_Layout-1.3.2{ Direction {LeftToRight} Border {5} AutoBorder {5} @@ -408,12 +305,12 @@ Box_Layout-1.2.2{ Strut {0} Stretch {1} } -Layout_Widget-1.2.2.1{ +Layout_Widget-1.3.2.1{ Widget {labelwidthlabel} BoxStretch {1} Alignment {36} } -Layout_Widget-1.2.2.2{ +Layout_Widget-1.3.2.2{ Widget {labelwidth} BoxStretch {1} Alignment {36} diff --git a/src/frontends/kde/dlg/dialogs/print.dlg b/src/frontends/kde/dlg/dialogs/print.dlg index 8afd894399..20e3249403 100644 --- a/src/frontends/kde/dlg/dialogs/print.dlg +++ b/src/frontends/kde/dlg/dialogs/print.dlg @@ -6,7 +6,7 @@ Dialog { DataHeader {printdlgdata.h} DataSource {printdlgdata.C} DataName {PrintDialogData} - WindowBaseClass {QWidget} + WindowBaseClass {QDialog} UseGetText {true} WindowFlags {0} } @@ -185,7 +185,7 @@ PushButton { } PushButton { ToggleButton {false} - Default {false} + Default {true} AutoDefault {false} IsMenuButton {false} Text {&Cancel} @@ -237,6 +237,31 @@ RadioButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +RadioButton { + Checked {false} + Text {&Odd pages} + AutoRepeat {false} + AutoResize {false} + Rect {15 96 142 14} + Name {oddpages} + Variable {oddpages} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} RadioButton { Checked {false} Text {&Even pages} @@ -287,6 +312,107 @@ KDE::KIntLineEdit { FontPropagation {NoChildren} PalettePropagation {NoChildren} } +KDE::KIntLineEdit { + Text {} + EchoMode {Normal} + MaxLength {32767} + FrameShown {true} + Rect {113 204 49 31} + Name {to} + Variable {to} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBase} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +CheckBox { + Checked {false} + Text {&Reverse order} + AutoRepeat {false} + AutoResize {true} + Rect {10 240 152 30} + Name {reverse} + Variable {reverse} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +KDE::KIntLineEdit { + Text {} + EchoMode {Normal} + MaxLength {32767} + FrameShown {true} + Rect {334 17 50 46} + Name {count} + Variable {count} + Signal {[Protected] textChanged --> changedCount (const char*)} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {false} + maxHeightSizeHint {true} + FocusPolicy {StrongFocus} + BackgroundMode {PaletteBase} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} +CheckBox { + Checked {false} + Text {Co&llate} + AutoRepeat {false} + AutoResize {true} + Rect {440 17 50 46} + Name {sort} + Variable {sort} + MinimumSize {0 0} + MaximumSize {32767 32767} + BackgroundPixmap {} + UseBackgroundPixmap {false} + AdjustSize {false} + ReadPixmapFromData {false} + DataVarName {} + DataLenName {} + minWidthSizeHint {true} + minHeightSizeHint {true} + maxWidthSizeHint {true} + maxHeightSizeHint {true} + FocusPolicy {TabFocus} + BackgroundMode {PaletteBackground} + FontPropagation {NoChildren} + PalettePropagation {NoChildren} +} Label { Text {From} Alignment {289} @@ -345,31 +471,6 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -RadioButton { - Checked {false} - Text {&Odd pages} - AutoRepeat {false} - AutoResize {false} - Rect {15 96 142 14} - Name {oddpages} - Variable {oddpages} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} RadioButton { Checked {false} Text {&Printer} @@ -445,31 +546,6 @@ LineEdit { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -CheckBox { - Checked {false} - Text {&Reverse order} - AutoRepeat {false} - AutoResize {true} - Rect {10 240 152 30} - Name {reverse} - Variable {reverse} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} LineEdit { Text {} EchoMode {Normal} @@ -495,31 +571,6 @@ LineEdit { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -CheckBox { - Checked {false} - Text {Co&llate} - AutoRepeat {false} - AutoResize {true} - Rect {440 17 50 46} - Name {sort} - Variable {sort} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {true} - maxHeightSizeHint {true} - FocusPolicy {TabFocus} - BackgroundMode {PaletteBackground} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} PushButton { ToggleButton {false} Default {false} @@ -549,32 +600,6 @@ PushButton { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -KDE::KIntLineEdit { - Text {} - EchoMode {Normal} - MaxLength {32767} - FrameShown {true} - Rect {334 17 50 46} - Name {count} - Variable {count} - Signal {[Protected] textChanged --> changedCount (const char*)} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {StrongFocus} - BackgroundMode {PaletteBase} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} Label { Text {Count} Alignment {289} @@ -604,31 +629,6 @@ Label { FontPropagation {NoChildren} PalettePropagation {NoChildren} } -KDE::KIntLineEdit { - Text {} - EchoMode {Normal} - MaxLength {32767} - FrameShown {true} - Rect {113 204 49 31} - Name {to} - Variable {to} - MinimumSize {0 0} - MaximumSize {32767 32767} - BackgroundPixmap {} - UseBackgroundPixmap {false} - AdjustSize {false} - ReadPixmapFromData {false} - DataVarName {} - DataLenName {} - minWidthSizeHint {true} - minHeightSizeHint {true} - maxWidthSizeHint {false} - maxHeightSizeHint {true} - FocusPolicy {StrongFocus} - BackgroundMode {PaletteBase} - FontPropagation {NoChildren} - PalettePropagation {NoChildren} -} Grid_Layout-1{ Border {5} diff --git a/src/frontends/kde/dlg/dialogs/tabcreate.dlg b/src/frontends/kde/dlg/dialogs/tabcreate.dlg index 49782c2ba4..857cd051dd 100644 --- a/src/frontends/kde/dlg/dialogs/tabcreate.dlg +++ b/src/frontends/kde/dlg/dialogs/tabcreate.dlg @@ -6,7 +6,7 @@ Dialog { DataHeader {tabcreatedlgdata.h} DataSource {tabcreatedlgdata.C} DataName {TabularCreateDialogData} - WindowBaseClass {QWidget} + WindowBaseClass {QDialog} UseGetText {true} WindowFlags {0} } @@ -19,7 +19,7 @@ Grid {5} PushButton { ToggleButton {false} - Default {false} + Default {true} AutoDefault {false} IsMenuButton {false} Text {&Insert} diff --git a/src/frontends/kde/dlg/docbulletsdlgdata.C b/src/frontends/kde/dlg/docbulletsdlgdata.C index afd24128af..41e199d43e 100644 --- a/src/frontends/kde/dlg/docbulletsdlgdata.C +++ b/src/frontends/kde/dlg/docbulletsdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docbulletsdlgdata.C - Last generated: Wed Jan 24 06:43:27 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/docbulletsdlgdata.h b/src/frontends/kde/dlg/docbulletsdlgdata.h index 219c256eaf..ba93c382d7 100644 --- a/src/frontends/kde/dlg/docbulletsdlgdata.h +++ b/src/frontends/kde/dlg/docbulletsdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docbulletsdlgdata.h - Last generated: Wed Jan 24 06:43:27 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/docdlgdata.C b/src/frontends/kde/dlg/docdlgdata.C index d64170a322..212de311ca 100644 --- a/src/frontends/kde/dlg/docdlgdata.C +++ b/src/frontends/kde/dlg/docdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docdlgdata.C - Last generated: Wed Jan 24 06:43:22 2001 + Last generated: Sat Feb 10 21:28:59 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -16,7 +16,7 @@ #include #include "docdlgdata.h" -#define Inherited QWidget +#define Inherited QDialog DocDialogData::DocDialogData @@ -25,7 +25,7 @@ DocDialogData::DocDialogData const char* name ) : - Inherited( parent, name, 0 ) + Inherited( parent, name, TRUE, 0 ) { ok = new QPushButton( this, "OK" ); ok->setGeometry( 73, 555, 69, 55 ); @@ -44,15 +44,6 @@ DocDialogData::DocDialogData ok->setAutoDefault( false ); ok->setIsMenuButton( false ); - tabstack = new TabStack( this, "User_1" ); - tabstack->setGeometry( 5, 5, 630, 545 ); - tabstack->setMinimumSize( 0, 0 ); - tabstack->setMaximumSize( 32767, 32767 ); - tabstack->setFocusPolicy( QWidget::NoFocus ); - tabstack->setBackgroundMode( QWidget::PaletteBackground ); - tabstack->setFontPropagation( QWidget::NoChildren ); - tabstack->setPalettePropagation( QWidget::NoChildren ); - apply = new QPushButton( this, "apply" ); apply->setGeometry( 215, 555, 68, 55 ); apply->setMinimumSize( 0, 0 ); @@ -104,6 +95,15 @@ DocDialogData::DocDialogData cancel->setAutoDefault( false ); cancel->setIsMenuButton( false ); + tabstack = new TabStack( this, "User_1" ); + tabstack->setGeometry( 5, 5, 630, 545 ); + tabstack->setMinimumSize( 0, 0 ); + tabstack->setMaximumSize( 32767, 32767 ); + tabstack->setFocusPolicy( QWidget::NoFocus ); + tabstack->setBackgroundMode( QWidget::PaletteBackground ); + tabstack->setFontPropagation( QWidget::NoChildren ); + tabstack->setPalettePropagation( QWidget::NoChildren ); + if (ok->sizeHint().width()!=-1) ok->setMinimumWidth(ok->sizeHint().width()); if (ok->sizeHint().height()!=-1) @@ -112,10 +112,6 @@ DocDialogData::DocDialogData ok->setMaximumWidth(ok->sizeHint().width()); if (ok->sizeHint().height()!=-1) ok->setMaximumHeight(ok->sizeHint().height()); - if (tabstack->sizeHint().width()!=-1) - tabstack->setMinimumWidth(tabstack->sizeHint().width()); - if (tabstack->sizeHint().height()!=-1) - tabstack->setMinimumHeight(tabstack->sizeHint().height()); if (apply->sizeHint().width()!=-1) apply->setMinimumWidth(apply->sizeHint().width()); if (apply->sizeHint().height()!=-1) @@ -140,6 +136,10 @@ DocDialogData::DocDialogData cancel->setMaximumWidth(cancel->sizeHint().width()); if (cancel->sizeHint().height()!=-1) cancel->setMaximumHeight(cancel->sizeHint().height()); + if (tabstack->sizeHint().width()!=-1) + tabstack->setMinimumWidth(tabstack->sizeHint().width()); + if (tabstack->sizeHint().height()!=-1) + tabstack->setMinimumHeight(tabstack->sizeHint().height()); QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); qtarch_layout_1->addStrut( 0 ); QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); diff --git a/src/frontends/kde/dlg/docdlgdata.h b/src/frontends/kde/dlg/docdlgdata.h index 0a2ae0c344..078a45a991 100644 --- a/src/frontends/kde/dlg/docdlgdata.h +++ b/src/frontends/kde/dlg/docdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docdlgdata.h - Last generated: Wed Jan 24 06:43:22 2001 + Last generated: Sat Feb 10 21:28:59 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -13,11 +13,11 @@ #ifndef DocDialogData_included #define DocDialogData_included -#include +#include #include "tabstack.h" #include -class DocDialogData : public QWidget +class DocDialogData : public QDialog { Q_OBJECT @@ -43,10 +43,10 @@ protected slots: protected: QPushButton* ok; - TabStack* tabstack; QPushButton* apply; QPushButton* restore; QPushButton* cancel; + TabStack* tabstack; }; diff --git a/src/frontends/kde/dlg/docextradlgdata.C b/src/frontends/kde/dlg/docextradlgdata.C index cb7b3afe8a..94b305a4b3 100644 --- a/src/frontends/kde/dlg/docextradlgdata.C +++ b/src/frontends/kde/dlg/docextradlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docextradlgdata.C - Last generated: Wed Jan 24 06:43:31 2001 + Last generated: Sat Feb 10 23:32:07 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -19,6 +19,7 @@ #define Inherited QWidget #include +#include DocExtraDialogData::DocExtraDialogData ( @@ -28,39 +29,90 @@ DocExtraDialogData::DocExtraDialogData : Inherited( parent, name, 0 ) { - QLabel* qtarch_labelFloatplacement; - qtarch_labelFloatplacement = new QLabel( this, "labelFloatplacement" ); - qtarch_labelFloatplacement->setGeometry( 5, 5, 105, 86 ); - qtarch_labelFloatplacement->setMinimumSize( 0, 0 ); - qtarch_labelFloatplacement->setMaximumSize( 32767, 32767 ); - qtarch_labelFloatplacement->setFocusPolicy( QWidget::NoFocus ); - qtarch_labelFloatplacement->setBackgroundMode( QWidget::PaletteBackground ); - qtarch_labelFloatplacement->setFontPropagation( QWidget::NoChildren ); - qtarch_labelFloatplacement->setPalettePropagation( QWidget::NoChildren ); - qtarch_labelFloatplacement->setFrameStyle( 0 ); - qtarch_labelFloatplacement->setLineWidth( 1 ); - qtarch_labelFloatplacement->setMidLineWidth( 0 ); - qtarch_labelFloatplacement->QFrame::setMargin( 0 ); - qtarch_labelFloatplacement->setText( _("Float placement : (FIXME)") ); - qtarch_labelFloatplacement->setAlignment( 289 ); - qtarch_labelFloatplacement->setMargin( -1 ); + QGroupBox* qtarch_placementBox; + qtarch_placementBox = new QGroupBox( this, "placementBox" ); + qtarch_placementBox->setGeometry( 5, 5, 625, 378 ); + qtarch_placementBox->setMinimumSize( 25, 30 ); + qtarch_placementBox->setMaximumSize( 32767, 32767 ); + qtarch_placementBox->setFocusPolicy( QWidget::NoFocus ); + qtarch_placementBox->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_placementBox->setFontPropagation( QWidget::NoChildren ); + qtarch_placementBox->setPalettePropagation( QWidget::NoChildren ); + qtarch_placementBox->setFrameStyle( 49 ); + qtarch_placementBox->setLineWidth( 1 ); + qtarch_placementBox->setMidLineWidth( 0 ); + qtarch_placementBox->QFrame::setMargin( 0 ); + qtarch_placementBox->setTitle( _("Float Placement") ); + qtarch_placementBox->setAlignment( 1 ); - floatplacement = new QLineEdit( this, "floatplacement" ); - floatplacement->setGeometry( 225, 5, 205, 86 ); - floatplacement->setMinimumSize( 0, 0 ); - floatplacement->setMaximumSize( 32767, 32767 ); - floatplacement->setFocusPolicy( QWidget::StrongFocus ); - floatplacement->setBackgroundMode( QWidget::PaletteBase ); - floatplacement->setFontPropagation( QWidget::NoChildren ); - floatplacement->setPalettePropagation( QWidget::NoChildren ); - floatplacement->setText( "" ); - floatplacement->setMaxLength( 32767 ); - floatplacement->setFrame( QLineEdit::Normal ); - floatplacement->setFrame( true ); + first = new QComboBox( FALSE, qtarch_placementBox, "first" ); + first->setGeometry( 315, 5, 150, 65 ); + first->setMinimumSize( 0, 0 ); + first->setMaximumSize( 32767, 32767 ); + first->setFocusPolicy( QWidget::StrongFocus ); + first->setBackgroundMode( QWidget::PaletteBackground ); + first->setFontPropagation( QWidget::AllChildren ); + first->setPalettePropagation( QWidget::AllChildren ); + first->setSizeLimit( 10 ); + first->setAutoResize( false ); + first->setMaxCount( 2147483647 ); + first->setAutoCompletion( false ); + + second = new QComboBox( FALSE, qtarch_placementBox, "second" ); + second->setGeometry( 315, 75, 150, 66 ); + second->setMinimumSize( 0, 0 ); + second->setMaximumSize( 32767, 32767 ); + second->setFocusPolicy( QWidget::StrongFocus ); + second->setBackgroundMode( QWidget::PaletteBackground ); + second->setFontPropagation( QWidget::AllChildren ); + second->setPalettePropagation( QWidget::AllChildren ); + second->setSizeLimit( 10 ); + second->setAutoResize( false ); + second->setMaxCount( 2147483647 ); + second->setAutoCompletion( false ); + + third = new QComboBox( FALSE, qtarch_placementBox, "third" ); + third->setGeometry( 315, 146, 150, 65 ); + third->setMinimumSize( 0, 0 ); + third->setMaximumSize( 32767, 32767 ); + third->setFocusPolicy( QWidget::StrongFocus ); + third->setBackgroundMode( QWidget::PaletteBackground ); + third->setFontPropagation( QWidget::AllChildren ); + third->setPalettePropagation( QWidget::AllChildren ); + third->setSizeLimit( 10 ); + third->setAutoResize( false ); + third->setMaxCount( 2147483647 ); + third->setAutoCompletion( false ); + + fourth = new QComboBox( FALSE, qtarch_placementBox, "fourth" ); + fourth->setGeometry( 315, 216, 150, 65 ); + fourth->setMinimumSize( 0, 0 ); + fourth->setMaximumSize( 32767, 32767 ); + fourth->setFocusPolicy( QWidget::StrongFocus ); + fourth->setBackgroundMode( QWidget::PaletteBackground ); + fourth->setFontPropagation( QWidget::AllChildren ); + fourth->setPalettePropagation( QWidget::AllChildren ); + fourth->setSizeLimit( 10 ); + fourth->setAutoResize( false ); + fourth->setMaxCount( 2147483647 ); + fourth->setAutoCompletion( false ); + + ignore = new QCheckBox( qtarch_placementBox, "ignore" ); + ignore->setGeometry( 5, 286, 615, 87 ); + ignore->setMinimumSize( 0, 0 ); + ignore->setMaximumSize( 32767, 32767 ); + ignore->setFocusPolicy( QWidget::TabFocus ); + ignore->setBackgroundMode( QWidget::PaletteBackground ); + ignore->setFontPropagation( QWidget::NoChildren ); + ignore->setPalettePropagation( QWidget::NoChildren ); + ignore->setText( _("Ignore LaTeX placement rules") ); + ignore->setAutoRepeat( false ); + ignore->setAutoResize( false ); + ignore->setChecked( false ); QLabel* qtarch_labelsectiondepth; qtarch_labelsectiondepth = new QLabel( this, "labelsectiondepth" ); - qtarch_labelsectiondepth->setGeometry( 5, 96, 105, 86 ); + qtarch_labelsectiondepth->setGeometry( 5, 388, 153, 58 ); qtarch_labelsectiondepth->setMinimumSize( 0, 0 ); qtarch_labelsectiondepth->setMaximumSize( 32767, 32767 ); qtarch_labelsectiondepth->setFocusPolicy( QWidget::NoFocus ); @@ -77,7 +129,7 @@ DocExtraDialogData::DocExtraDialogData QLabel* qtarch_labeltocdepth; qtarch_labeltocdepth = new QLabel( this, "labeltocdepth" ); - qtarch_labeltocdepth->setGeometry( 5, 187, 105, 86 ); + qtarch_labeltocdepth->setGeometry( 5, 451, 153, 58 ); qtarch_labeltocdepth->setMinimumSize( 0, 0 ); qtarch_labeltocdepth->setMaximumSize( 32767, 32767 ); qtarch_labeltocdepth->setFocusPolicy( QWidget::NoFocus ); @@ -94,7 +146,7 @@ DocExtraDialogData::DocExtraDialogData QLabel* qtarch_labelPSDriver; qtarch_labelPSDriver = new QLabel( this, "labelPSDriver" ); - qtarch_labelPSDriver->setGeometry( 5, 278, 105, 86 ); + qtarch_labelPSDriver->setGeometry( 5, 514, 153, 58 ); qtarch_labelPSDriver->setMinimumSize( 0, 0 ); qtarch_labelPSDriver->setMaximumSize( 32767, 32767 ); qtarch_labelPSDriver->setFocusPolicy( QWidget::NoFocus ); @@ -109,21 +161,8 @@ DocExtraDialogData::DocExtraDialogData qtarch_labelPSDriver->setAlignment( 289 ); qtarch_labelPSDriver->setMargin( -1 ); - amsmath = new QCheckBox( this, "amsmath" ); - amsmath->setGeometry( 5, 369, 105, 86 ); - amsmath->setMinimumSize( 0, 0 ); - amsmath->setMaximumSize( 32767, 32767 ); - amsmath->setFocusPolicy( QWidget::TabFocus ); - amsmath->setBackgroundMode( QWidget::PaletteBackground ); - amsmath->setFontPropagation( QWidget::NoChildren ); - amsmath->setPalettePropagation( QWidget::NoChildren ); - amsmath->setText( _("Use AMS Math") ); - amsmath->setAutoRepeat( false ); - amsmath->setAutoResize( false ); - amsmath->setChecked( false ); - sectiondepth = new QSpinBox( this, "sectiondepth" ); - sectiondepth->setGeometry( 225, 96, 205, 86 ); + sectiondepth->setGeometry( 320, 388, 153, 58 ); sectiondepth->setMinimumSize( 0, 0 ); sectiondepth->setMaximumSize( 32767, 32767 ); sectiondepth->setFocusPolicy( QWidget::StrongFocus ); @@ -142,7 +181,7 @@ DocExtraDialogData::DocExtraDialogData sectiondepth->setWrapping( false ); tocdepth = new QSpinBox( this, "tocdepth" ); - tocdepth->setGeometry( 225, 187, 205, 86 ); + tocdepth->setGeometry( 320, 451, 153, 58 ); tocdepth->setMinimumSize( 0, 0 ); tocdepth->setMaximumSize( 32767, 32767 ); tocdepth->setFocusPolicy( QWidget::StrongFocus ); @@ -161,7 +200,7 @@ DocExtraDialogData::DocExtraDialogData tocdepth->setWrapping( false ); psdriver = new QComboBox( FALSE, this, "psdriver" ); - psdriver->setGeometry( 225, 278, 205, 86 ); + psdriver->setGeometry( 320, 514, 153, 58 ); psdriver->setMinimumSize( 0, 0 ); psdriver->setMaximumSize( 32767, 32767 ); psdriver->setFocusPolicy( QWidget::StrongFocus ); @@ -173,20 +212,123 @@ DocExtraDialogData::DocExtraDialogData psdriver->setMaxCount( 2147483647 ); psdriver->setAutoCompletion( false ); - if (qtarch_labelFloatplacement->sizeHint().width()!=-1) - qtarch_labelFloatplacement->setMinimumWidth(qtarch_labelFloatplacement->sizeHint().width()); - if (qtarch_labelFloatplacement->sizeHint().height()!=-1) - qtarch_labelFloatplacement->setMinimumHeight(qtarch_labelFloatplacement->sizeHint().height()); - if (qtarch_labelFloatplacement->sizeHint().width()!=-1) - qtarch_labelFloatplacement->setMaximumWidth(qtarch_labelFloatplacement->sizeHint().width()); - if (qtarch_labelFloatplacement->sizeHint().height()!=-1) - qtarch_labelFloatplacement->setMaximumHeight(qtarch_labelFloatplacement->sizeHint().height()); - if (floatplacement->sizeHint().width()!=-1) - floatplacement->setMinimumWidth(floatplacement->sizeHint().width()); - if (floatplacement->sizeHint().height()!=-1) - floatplacement->setMinimumHeight(floatplacement->sizeHint().height()); - if (floatplacement->sizeHint().height()!=-1) - floatplacement->setMaximumHeight(floatplacement->sizeHint().height()); + amsmath = new QCheckBox( this, "amsmath" ); + amsmath->setGeometry( 5, 577, 153, 58 ); + amsmath->setMinimumSize( 0, 0 ); + amsmath->setMaximumSize( 32767, 32767 ); + amsmath->setFocusPolicy( QWidget::TabFocus ); + amsmath->setBackgroundMode( QWidget::PaletteBackground ); + amsmath->setFontPropagation( QWidget::NoChildren ); + amsmath->setPalettePropagation( QWidget::NoChildren ); + amsmath->setText( _("Use AMS Math") ); + amsmath->setAutoRepeat( false ); + amsmath->setAutoResize( false ); + amsmath->setChecked( false ); + + QLabel* qtarch_labelFirst; + qtarch_labelFirst = new QLabel( qtarch_placementBox, "labelFirst" ); + qtarch_labelFirst->setGeometry( 5, 5, 150, 65 ); + qtarch_labelFirst->setMinimumSize( 0, 0 ); + qtarch_labelFirst->setMaximumSize( 32767, 32767 ); + qtarch_labelFirst->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelFirst->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelFirst->setFontPropagation( QWidget::NoChildren ); + qtarch_labelFirst->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelFirst->setFrameStyle( 0 ); + qtarch_labelFirst->setLineWidth( 1 ); + qtarch_labelFirst->setMidLineWidth( 0 ); + qtarch_labelFirst->QFrame::setMargin( 0 ); + qtarch_labelFirst->setText( _("First try :") ); + qtarch_labelFirst->setAlignment( 289 ); + qtarch_labelFirst->setMargin( -1 ); + + QLabel* qtarch_labelSecond; + qtarch_labelSecond = new QLabel( qtarch_placementBox, "labelSecond" ); + qtarch_labelSecond->setGeometry( 5, 75, 150, 66 ); + qtarch_labelSecond->setMinimumSize( 0, 0 ); + qtarch_labelSecond->setMaximumSize( 32767, 32767 ); + qtarch_labelSecond->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelSecond->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelSecond->setFontPropagation( QWidget::NoChildren ); + qtarch_labelSecond->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelSecond->setFrameStyle( 0 ); + qtarch_labelSecond->setLineWidth( 1 ); + qtarch_labelSecond->setMidLineWidth( 0 ); + qtarch_labelSecond->QFrame::setMargin( 0 ); + qtarch_labelSecond->setText( _("then :") ); + qtarch_labelSecond->setAlignment( 289 ); + qtarch_labelSecond->setMargin( -1 ); + + QLabel* qtarch_labelThird; + qtarch_labelThird = new QLabel( qtarch_placementBox, "labelThird" ); + qtarch_labelThird->setGeometry( 5, 146, 150, 65 ); + qtarch_labelThird->setMinimumSize( 0, 0 ); + qtarch_labelThird->setMaximumSize( 32767, 32767 ); + qtarch_labelThird->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelThird->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelThird->setFontPropagation( QWidget::NoChildren ); + qtarch_labelThird->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelThird->setFrameStyle( 0 ); + qtarch_labelThird->setLineWidth( 1 ); + qtarch_labelThird->setMidLineWidth( 0 ); + qtarch_labelThird->QFrame::setMargin( 0 ); + qtarch_labelThird->setText( _("then :") ); + qtarch_labelThird->setAlignment( 289 ); + qtarch_labelThird->setMargin( -1 ); + + QLabel* qtarch_labelFourth; + qtarch_labelFourth = new QLabel( qtarch_placementBox, "labelFourth" ); + qtarch_labelFourth->setGeometry( 5, 216, 150, 65 ); + qtarch_labelFourth->setMinimumSize( 0, 0 ); + qtarch_labelFourth->setMaximumSize( 32767, 32767 ); + qtarch_labelFourth->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelFourth->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelFourth->setFontPropagation( QWidget::NoChildren ); + qtarch_labelFourth->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelFourth->setFrameStyle( 0 ); + qtarch_labelFourth->setLineWidth( 1 ); + qtarch_labelFourth->setMidLineWidth( 0 ); + qtarch_labelFourth->QFrame::setMargin( 0 ); + qtarch_labelFourth->setText( _("then :") ); + qtarch_labelFourth->setAlignment( 289 ); + qtarch_labelFourth->setMargin( -1 ); + + if (qtarch_placementBox->sizeHint().width()!=-1) + qtarch_placementBox->setMinimumWidth(qtarch_placementBox->sizeHint().width()); + if (qtarch_placementBox->sizeHint().height()!=-1) + qtarch_placementBox->setMinimumHeight(qtarch_placementBox->sizeHint().height()); + if (first->sizeHint().width()!=-1) + first->setMinimumWidth(first->sizeHint().width()); + if (first->sizeHint().height()!=-1) + first->setMinimumHeight(first->sizeHint().height()); + if (first->sizeHint().height()!=-1) + first->setMaximumHeight(first->sizeHint().height()); + if (second->sizeHint().width()!=-1) + second->setMinimumWidth(second->sizeHint().width()); + if (second->sizeHint().height()!=-1) + second->setMinimumHeight(second->sizeHint().height()); + if (second->sizeHint().height()!=-1) + second->setMaximumHeight(second->sizeHint().height()); + if (third->sizeHint().width()!=-1) + third->setMinimumWidth(third->sizeHint().width()); + if (third->sizeHint().height()!=-1) + third->setMinimumHeight(third->sizeHint().height()); + if (third->sizeHint().height()!=-1) + third->setMaximumHeight(third->sizeHint().height()); + if (fourth->sizeHint().width()!=-1) + fourth->setMinimumWidth(fourth->sizeHint().width()); + if (fourth->sizeHint().height()!=-1) + fourth->setMinimumHeight(fourth->sizeHint().height()); + if (fourth->sizeHint().height()!=-1) + fourth->setMaximumHeight(fourth->sizeHint().height()); + if (ignore->sizeHint().width()!=-1) + ignore->setMinimumWidth(ignore->sizeHint().width()); + if (ignore->sizeHint().height()!=-1) + ignore->setMinimumHeight(ignore->sizeHint().height()); + if (ignore->sizeHint().width()!=-1) + ignore->setMaximumWidth(ignore->sizeHint().width()); + if (ignore->sizeHint().height()!=-1) + ignore->setMaximumHeight(ignore->sizeHint().height()); if (qtarch_labelsectiondepth->sizeHint().width()!=-1) qtarch_labelsectiondepth->setMinimumWidth(qtarch_labelsectiondepth->sizeHint().width()); if (qtarch_labelsectiondepth->sizeHint().height()!=-1) @@ -211,14 +353,6 @@ DocExtraDialogData::DocExtraDialogData qtarch_labelPSDriver->setMaximumWidth(qtarch_labelPSDriver->sizeHint().width()); if (qtarch_labelPSDriver->sizeHint().height()!=-1) qtarch_labelPSDriver->setMaximumHeight(qtarch_labelPSDriver->sizeHint().height()); - if (amsmath->sizeHint().width()!=-1) - amsmath->setMinimumWidth(amsmath->sizeHint().width()); - if (amsmath->sizeHint().height()!=-1) - amsmath->setMinimumHeight(amsmath->sizeHint().height()); - if (amsmath->sizeHint().width()!=-1) - amsmath->setMaximumWidth(amsmath->sizeHint().width()); - if (amsmath->sizeHint().height()!=-1) - amsmath->setMaximumHeight(amsmath->sizeHint().height()); if (sectiondepth->sizeHint().width()!=-1) sectiondepth->setMinimumWidth(sectiondepth->sizeHint().width()); if (sectiondepth->sizeHint().height()!=-1) @@ -237,35 +371,107 @@ DocExtraDialogData::DocExtraDialogData psdriver->setMinimumHeight(psdriver->sizeHint().height()); if (psdriver->sizeHint().height()!=-1) psdriver->setMaximumHeight(psdriver->sizeHint().height()); - QGridLayout* qtarch_layout_1 = new QGridLayout( this, 5, 4, 5, 5, NULL ); - qtarch_layout_1->addColSpacing( 0, 5 ); - qtarch_layout_1->setColStretch( 0, 1 ); - qtarch_layout_1->addColSpacing( 1, 5 ); - qtarch_layout_1->setColStretch( 1, 1 ); - qtarch_layout_1->addColSpacing( 2, 5 ); - qtarch_layout_1->setColStretch( 2, 2 ); - qtarch_layout_1->addColSpacing( 3, 5 ); - qtarch_layout_1->setColStretch( 3, 1 ); - qtarch_layout_1->addRowSpacing( 0, 0 ); - qtarch_layout_1->setRowStretch( 0, 1 ); - qtarch_layout_1->addWidget( qtarch_labelFloatplacement, 0, 0, 33 ); - qtarch_layout_1->addWidget( floatplacement, 0, 2, 33 ); - qtarch_layout_1->addRowSpacing( 1, 0 ); - qtarch_layout_1->setRowStretch( 1, 1 ); - qtarch_layout_1->addWidget( qtarch_labelsectiondepth, 1, 0, 33 ); - qtarch_layout_1->addWidget( sectiondepth, 1, 2, 33 ); - qtarch_layout_1->addRowSpacing( 2, 0 ); - qtarch_layout_1->setRowStretch( 2, 1 ); - qtarch_layout_1->addWidget( qtarch_labeltocdepth, 2, 0, 33 ); - qtarch_layout_1->addWidget( tocdepth, 2, 2, 33 ); - qtarch_layout_1->addRowSpacing( 3, 0 ); - qtarch_layout_1->setRowStretch( 3, 1 ); - qtarch_layout_1->addWidget( qtarch_labelPSDriver, 3, 0, 33 ); - qtarch_layout_1->addWidget( psdriver, 3, 2, 33 ); - qtarch_layout_1->addRowSpacing( 4, 0 ); - qtarch_layout_1->setRowStretch( 4, 1 ); - qtarch_layout_1->addWidget( amsmath, 4, 0, 33 ); - resize( 545,460 ); + if (amsmath->sizeHint().width()!=-1) + amsmath->setMinimumWidth(amsmath->sizeHint().width()); + if (amsmath->sizeHint().height()!=-1) + amsmath->setMinimumHeight(amsmath->sizeHint().height()); + if (amsmath->sizeHint().width()!=-1) + amsmath->setMaximumWidth(amsmath->sizeHint().width()); + if (amsmath->sizeHint().height()!=-1) + amsmath->setMaximumHeight(amsmath->sizeHint().height()); + if (qtarch_labelFirst->sizeHint().width()!=-1) + qtarch_labelFirst->setMinimumWidth(qtarch_labelFirst->sizeHint().width()); + if (qtarch_labelFirst->sizeHint().height()!=-1) + qtarch_labelFirst->setMinimumHeight(qtarch_labelFirst->sizeHint().height()); + if (qtarch_labelFirst->sizeHint().width()!=-1) + qtarch_labelFirst->setMaximumWidth(qtarch_labelFirst->sizeHint().width()); + if (qtarch_labelFirst->sizeHint().height()!=-1) + qtarch_labelFirst->setMaximumHeight(qtarch_labelFirst->sizeHint().height()); + if (qtarch_labelSecond->sizeHint().width()!=-1) + qtarch_labelSecond->setMinimumWidth(qtarch_labelSecond->sizeHint().width()); + if (qtarch_labelSecond->sizeHint().height()!=-1) + qtarch_labelSecond->setMinimumHeight(qtarch_labelSecond->sizeHint().height()); + if (qtarch_labelSecond->sizeHint().width()!=-1) + qtarch_labelSecond->setMaximumWidth(qtarch_labelSecond->sizeHint().width()); + if (qtarch_labelSecond->sizeHint().height()!=-1) + qtarch_labelSecond->setMaximumHeight(qtarch_labelSecond->sizeHint().height()); + if (qtarch_labelThird->sizeHint().width()!=-1) + qtarch_labelThird->setMinimumWidth(qtarch_labelThird->sizeHint().width()); + if (qtarch_labelThird->sizeHint().height()!=-1) + qtarch_labelThird->setMinimumHeight(qtarch_labelThird->sizeHint().height()); + if (qtarch_labelThird->sizeHint().width()!=-1) + qtarch_labelThird->setMaximumWidth(qtarch_labelThird->sizeHint().width()); + if (qtarch_labelThird->sizeHint().height()!=-1) + qtarch_labelThird->setMaximumHeight(qtarch_labelThird->sizeHint().height()); + if (qtarch_labelFourth->sizeHint().width()!=-1) + qtarch_labelFourth->setMinimumWidth(qtarch_labelFourth->sizeHint().width()); + if (qtarch_labelFourth->sizeHint().height()!=-1) + qtarch_labelFourth->setMinimumHeight(qtarch_labelFourth->sizeHint().height()); + if (qtarch_labelFourth->sizeHint().width()!=-1) + qtarch_labelFourth->setMaximumWidth(qtarch_labelFourth->sizeHint().width()); + if (qtarch_labelFourth->sizeHint().height()!=-1) + qtarch_labelFourth->setMaximumHeight(qtarch_labelFourth->sizeHint().height()); + QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); + qtarch_layout_1->addStrut( 0 ); + qtarch_layout_1->addWidget( qtarch_placementBox, 3, 36 ); + QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( qtarch_placementBox, QBoxLayout::TopToBottom, 5, 5, NULL ); + qtarch_layout_1_1->addStrut( 0 ); + QGridLayout* qtarch_layout_1_1_1 = new QGridLayout( 4, 4, 5, NULL ); + qtarch_layout_1_1->addLayout( qtarch_layout_1_1_1, 3 ); + qtarch_layout_1_1_1->addColSpacing( 0, 5 ); + qtarch_layout_1_1_1->setColStretch( 0, 1 ); + qtarch_layout_1_1_1->addColSpacing( 1, 5 ); + qtarch_layout_1_1_1->setColStretch( 1, 1 ); + qtarch_layout_1_1_1->addColSpacing( 2, 5 ); + qtarch_layout_1_1_1->setColStretch( 2, 1 ); + qtarch_layout_1_1_1->addColSpacing( 3, 5 ); + qtarch_layout_1_1_1->setColStretch( 3, 1 ); + qtarch_layout_1_1_1->addRowSpacing( 0, 0 ); + qtarch_layout_1_1_1->setRowStretch( 0, 1 ); + qtarch_layout_1_1_1->addWidget( qtarch_labelFirst, 0, 0, 36 ); + qtarch_layout_1_1_1->addWidget( first, 0, 2, 36 ); + qtarch_layout_1_1_1->addRowSpacing( 1, 0 ); + qtarch_layout_1_1_1->setRowStretch( 1, 1 ); + qtarch_layout_1_1_1->addWidget( qtarch_labelSecond, 1, 0, 36 ); + qtarch_layout_1_1_1->addWidget( second, 1, 2, 36 ); + qtarch_layout_1_1_1->addRowSpacing( 2, 0 ); + qtarch_layout_1_1_1->setRowStretch( 2, 1 ); + qtarch_layout_1_1_1->addWidget( qtarch_labelThird, 2, 0, 36 ); + qtarch_layout_1_1_1->addWidget( third, 2, 2, 36 ); + qtarch_layout_1_1_1->addRowSpacing( 3, 0 ); + qtarch_layout_1_1_1->setRowStretch( 3, 1 ); + qtarch_layout_1_1_1->addWidget( qtarch_labelFourth, 3, 0, 36 ); + qtarch_layout_1_1_1->addWidget( fourth, 3, 2, 36 ); + QBoxLayout* qtarch_layout_1_1_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); + qtarch_layout_1_1->addLayout( qtarch_layout_1_1_2, 1 ); + qtarch_layout_1_1_2->addStrut( 0 ); + qtarch_layout_1_1_2->addWidget( ignore, 1, 36 ); + QGridLayout* qtarch_layout_1_2 = new QGridLayout( 4, 4, 5, NULL ); + qtarch_layout_1->addLayout( qtarch_layout_1_2, 2 ); + qtarch_layout_1_2->addColSpacing( 0, 5 ); + qtarch_layout_1_2->setColStretch( 0, 1 ); + qtarch_layout_1_2->addColSpacing( 1, 5 ); + qtarch_layout_1_2->setColStretch( 1, 1 ); + qtarch_layout_1_2->addColSpacing( 2, 5 ); + qtarch_layout_1_2->setColStretch( 2, 1 ); + qtarch_layout_1_2->addColSpacing( 3, 5 ); + qtarch_layout_1_2->setColStretch( 3, 1 ); + qtarch_layout_1_2->addRowSpacing( 0, 0 ); + qtarch_layout_1_2->setRowStretch( 0, 1 ); + qtarch_layout_1_2->addWidget( qtarch_labelsectiondepth, 0, 0, 36 ); + qtarch_layout_1_2->addWidget( sectiondepth, 0, 2, 36 ); + qtarch_layout_1_2->addRowSpacing( 1, 0 ); + qtarch_layout_1_2->setRowStretch( 1, 1 ); + qtarch_layout_1_2->addWidget( qtarch_labeltocdepth, 1, 0, 36 ); + qtarch_layout_1_2->addWidget( tocdepth, 1, 2, 36 ); + qtarch_layout_1_2->addRowSpacing( 2, 0 ); + qtarch_layout_1_2->setRowStretch( 2, 1 ); + qtarch_layout_1_2->addWidget( qtarch_labelPSDriver, 2, 0, 36 ); + qtarch_layout_1_2->addWidget( psdriver, 2, 2, 36 ); + qtarch_layout_1_2->addRowSpacing( 3, 0 ); + qtarch_layout_1_2->setRowStretch( 3, 1 ); + qtarch_layout_1_2->addWidget( amsmath, 3, 0, 36 ); + resize( 635,640 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); } diff --git a/src/frontends/kde/dlg/docextradlgdata.h b/src/frontends/kde/dlg/docextradlgdata.h index 0e3cb091d8..9e0d7265ee 100644 --- a/src/frontends/kde/dlg/docextradlgdata.h +++ b/src/frontends/kde/dlg/docextradlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docextradlgdata.h - Last generated: Wed Jan 24 06:43:31 2001 + Last generated: Sat Feb 10 23:32:07 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -17,7 +17,6 @@ #include #include #include -#include class DocExtraDialogData : public QWidget { @@ -40,11 +39,15 @@ protected slots: public: - QLineEdit* floatplacement; - QCheckBox* amsmath; + QComboBox* first; + QComboBox* second; + QComboBox* third; + QComboBox* fourth; + QCheckBox* ignore; QSpinBox* sectiondepth; QSpinBox* tocdepth; QComboBox* psdriver; + QCheckBox* amsmath; }; diff --git a/src/frontends/kde/dlg/docgeometrydlgdata.C b/src/frontends/kde/dlg/docgeometrydlgdata.C index 9615f21ce5..5d597e54f3 100644 --- a/src/frontends/kde/dlg/docgeometrydlgdata.C +++ b/src/frontends/kde/dlg/docgeometrydlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docgeometrydlgdata.C - Last generated: Wed Jan 24 06:43:37 2001 + Last generated: Sat Feb 10 21:35:53 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -126,6 +126,51 @@ DocGeometryDialogData::DocGeometryDialogData papersize->setMaxCount( 2147483647 ); papersize->setAutoCompletion( false ); + width = new LengthEntry( qtarch_paperGroup, "width" ); + width->setGeometry( 5, 135, 285, 35 ); + width->setMinimumSize( 0, 0 ); + width->setMaximumSize( 32767, 32767 ); + width->setFocusPolicy( QWidget::NoFocus ); + width->setBackgroundMode( QWidget::PaletteBackground ); + width->setFontPropagation( QWidget::NoChildren ); + width->setPalettePropagation( QWidget::NoChildren ); + + height = new LengthEntry( qtarch_paperGroup, "height" ); + height->setGeometry( 5, 250, 285, 35 ); + height->setMinimumSize( 0, 0 ); + height->setMaximumSize( 32767, 32767 ); + height->setFocusPolicy( QWidget::NoFocus ); + height->setBackgroundMode( QWidget::PaletteBackground ); + height->setFontPropagation( QWidget::NoChildren ); + height->setPalettePropagation( QWidget::NoChildren ); + + headheight = new LengthEntry( qtarch_headfootGroup, "headheight" ); + headheight->setGeometry( 5, 80, 285, 28 ); + headheight->setMinimumSize( 0, 0 ); + headheight->setMaximumSize( 32767, 32767 ); + headheight->setFocusPolicy( QWidget::NoFocus ); + headheight->setBackgroundMode( QWidget::PaletteBackground ); + headheight->setFontPropagation( QWidget::NoChildren ); + headheight->setPalettePropagation( QWidget::NoChildren ); + + headsep = new LengthEntry( qtarch_headfootGroup, "headsep" ); + headsep->setGeometry( 5, 173, 285, 27 ); + headsep->setMinimumSize( 0, 0 ); + headsep->setMaximumSize( 32767, 32767 ); + headsep->setFocusPolicy( QWidget::NoFocus ); + headsep->setBackgroundMode( QWidget::PaletteBackground ); + headsep->setFontPropagation( QWidget::NoChildren ); + headsep->setPalettePropagation( QWidget::NoChildren ); + + footskip = new LengthEntry( qtarch_headfootGroup, "footskip" ); + footskip->setGeometry( 5, 265, 285, 28 ); + footskip->setMinimumSize( 0, 0 ); + footskip->setMaximumSize( 32767, 32767 ); + footskip->setFocusPolicy( QWidget::NoFocus ); + footskip->setBackgroundMode( QWidget::PaletteBackground ); + footskip->setFontPropagation( QWidget::NoChildren ); + footskip->setPalettePropagation( QWidget::NoChildren ); + QLabel* qtarch_labelMargin; qtarch_labelMargin = new QLabel( qtarch_marginsGroup, "labelMargin" ); qtarch_labelMargin->setGeometry( 5, 20, 113, 54 ); @@ -143,20 +188,6 @@ DocGeometryDialogData::DocGeometryDialogData qtarch_labelMargin->setAlignment( 0 ); qtarch_labelMargin->setMargin( -1 ); - margins = new QComboBox( FALSE, qtarch_marginsGroup, "margins" ); - margins->setGeometry( 236, 20, 112, 54 ); - margins->setMinimumSize( 0, 0 ); - margins->setMaximumSize( 32767, 32767 ); - connect( margins, SIGNAL(highlighted(const char*)), SLOT(marginsChanged(const char*)) ); - margins->setFocusPolicy( QWidget::StrongFocus ); - margins->setBackgroundMode( QWidget::PaletteBackground ); - margins->setFontPropagation( QWidget::AllChildren ); - margins->setPalettePropagation( QWidget::AllChildren ); - margins->setSizeLimit( 30 ); - margins->setAutoResize( true ); - margins->setMaxCount( 2147483647 ); - margins->setAutoCompletion( false ); - QLabel* qtarch_labelWidth; qtarch_labelWidth = new QLabel( qtarch_paperGroup, "labelWidth" ); qtarch_labelWidth->setGeometry( 5, 95, 1, 35 ); @@ -259,32 +290,6 @@ DocGeometryDialogData::DocGeometryDialogData qtarch_labelRight->setAlignment( 0 ); qtarch_labelRight->setMargin( -1 ); - portrait = new QRadioButton( qtarch_orientation, "portrait" ); - portrait->setGeometry( 5, 77, 1, 57 ); - portrait->setMinimumSize( 0, 0 ); - portrait->setMaximumSize( 32767, 32767 ); - portrait->setFocusPolicy( QWidget::TabFocus ); - portrait->setBackgroundMode( QWidget::PaletteBackground ); - portrait->setFontPropagation( QWidget::NoChildren ); - portrait->setPalettePropagation( QWidget::NoChildren ); - portrait->setText( _("Portrait") ); - portrait->setAutoRepeat( false ); - portrait->setAutoResize( false ); - portrait->setChecked( true ); - - landscape = new QRadioButton( qtarch_orientation, "landscape" ); - landscape->setGeometry( 5, 196, 1, 57 ); - landscape->setMinimumSize( 0, 0 ); - landscape->setMaximumSize( 32767, 32767 ); - landscape->setFocusPolicy( QWidget::TabFocus ); - landscape->setBackgroundMode( QWidget::PaletteBackground ); - landscape->setFontPropagation( QWidget::NoChildren ); - landscape->setPalettePropagation( QWidget::NoChildren ); - landscape->setText( _("Landscape") ); - landscape->setAutoRepeat( false ); - landscape->setAutoResize( false ); - landscape->setChecked( false ); - QLabel* qtarch_labelheadheight; qtarch_labelheadheight = new QLabel( qtarch_headfootGroup, "labelheadheight" ); qtarch_labelheadheight->setGeometry( 5, 48, 1, 27 ); @@ -336,23 +341,19 @@ DocGeometryDialogData::DocGeometryDialogData qtarch_labelFootskip->setAlignment( 0 ); qtarch_labelFootskip->setMargin( -1 ); - width = new LengthEntry( qtarch_paperGroup, "width" ); - width->setGeometry( 5, 135, 285, 35 ); - width->setMinimumSize( 0, 0 ); - width->setMaximumSize( 32767, 32767 ); - width->setFocusPolicy( QWidget::NoFocus ); - width->setBackgroundMode( QWidget::PaletteBackground ); - width->setFontPropagation( QWidget::NoChildren ); - width->setPalettePropagation( QWidget::NoChildren ); - - height = new LengthEntry( qtarch_paperGroup, "height" ); - height->setGeometry( 5, 250, 285, 35 ); - height->setMinimumSize( 0, 0 ); - height->setMaximumSize( 32767, 32767 ); - height->setFocusPolicy( QWidget::NoFocus ); - height->setBackgroundMode( QWidget::PaletteBackground ); - height->setFontPropagation( QWidget::NoChildren ); - height->setPalettePropagation( QWidget::NoChildren ); + margins = new QComboBox( FALSE, qtarch_marginsGroup, "margins" ); + margins->setGeometry( 236, 20, 112, 54 ); + margins->setMinimumSize( 0, 0 ); + margins->setMaximumSize( 32767, 32767 ); + connect( margins, SIGNAL(highlighted(const char*)), SLOT(marginsChanged(const char*)) ); + margins->setFocusPolicy( QWidget::StrongFocus ); + margins->setBackgroundMode( QWidget::PaletteBackground ); + margins->setFontPropagation( QWidget::AllChildren ); + margins->setPalettePropagation( QWidget::AllChildren ); + margins->setSizeLimit( 30 ); + margins->setAutoResize( true ); + margins->setMaxCount( 2147483647 ); + margins->setAutoCompletion( false ); top = new LengthEntry( qtarch_marginsGroup, "top" ); top->setGeometry( 199, 133, 211, 41 ); @@ -381,33 +382,6 @@ DocGeometryDialogData::DocGeometryDialogData left->setFontPropagation( QWidget::NoChildren ); left->setPalettePropagation( QWidget::NoChildren ); - headheight = new LengthEntry( qtarch_headfootGroup, "headheight" ); - headheight->setGeometry( 5, 80, 285, 28 ); - headheight->setMinimumSize( 0, 0 ); - headheight->setMaximumSize( 32767, 32767 ); - headheight->setFocusPolicy( QWidget::NoFocus ); - headheight->setBackgroundMode( QWidget::PaletteBackground ); - headheight->setFontPropagation( QWidget::NoChildren ); - headheight->setPalettePropagation( QWidget::NoChildren ); - - headsep = new LengthEntry( qtarch_headfootGroup, "headsep" ); - headsep->setGeometry( 5, 173, 285, 27 ); - headsep->setMinimumSize( 0, 0 ); - headsep->setMaximumSize( 32767, 32767 ); - headsep->setFocusPolicy( QWidget::NoFocus ); - headsep->setBackgroundMode( QWidget::PaletteBackground ); - headsep->setFontPropagation( QWidget::NoChildren ); - headsep->setPalettePropagation( QWidget::NoChildren ); - - footskip = new LengthEntry( qtarch_headfootGroup, "footskip" ); - footskip->setGeometry( 5, 265, 285, 28 ); - footskip->setMinimumSize( 0, 0 ); - footskip->setMaximumSize( 32767, 32767 ); - footskip->setFocusPolicy( QWidget::NoFocus ); - footskip->setBackgroundMode( QWidget::PaletteBackground ); - footskip->setFontPropagation( QWidget::NoChildren ); - footskip->setPalettePropagation( QWidget::NoChildren ); - right = new LengthEntry( qtarch_marginsGroup, "right" ); right->setGeometry( 199, 270, 211, 40 ); right->setMinimumSize( 0, 0 ); @@ -417,6 +391,32 @@ DocGeometryDialogData::DocGeometryDialogData right->setFontPropagation( QWidget::NoChildren ); right->setPalettePropagation( QWidget::NoChildren ); + portrait = new QRadioButton( qtarch_orientation, "portrait" ); + portrait->setGeometry( 5, 77, 1, 57 ); + portrait->setMinimumSize( 0, 0 ); + portrait->setMaximumSize( 32767, 32767 ); + portrait->setFocusPolicy( QWidget::TabFocus ); + portrait->setBackgroundMode( QWidget::PaletteBackground ); + portrait->setFontPropagation( QWidget::NoChildren ); + portrait->setPalettePropagation( QWidget::NoChildren ); + portrait->setText( _("Portrait") ); + portrait->setAutoRepeat( false ); + portrait->setAutoResize( false ); + portrait->setChecked( true ); + + landscape = new QRadioButton( qtarch_orientation, "landscape" ); + landscape->setGeometry( 5, 196, 1, 57 ); + landscape->setMinimumSize( 0, 0 ); + landscape->setMaximumSize( 32767, 32767 ); + landscape->setFocusPolicy( QWidget::TabFocus ); + landscape->setBackgroundMode( QWidget::PaletteBackground ); + landscape->setFontPropagation( QWidget::NoChildren ); + landscape->setPalettePropagation( QWidget::NoChildren ); + landscape->setText( _("Landscape") ); + landscape->setAutoRepeat( false ); + landscape->setAutoResize( false ); + landscape->setChecked( false ); + if (qtarch_orientation->sizeHint().width()!=-1) qtarch_orientation->setMinimumWidth(qtarch_orientation->sizeHint().width()); if (qtarch_orientation->sizeHint().height()!=-1) @@ -438,6 +438,36 @@ DocGeometryDialogData::DocGeometryDialogData papersize->setMinimumHeight(papersize->sizeHint().height()); if (papersize->sizeHint().height()!=-1) papersize->setMaximumHeight(papersize->sizeHint().height()); + if (width->sizeHint().width()!=-1) + width->setMinimumWidth(width->sizeHint().width()); + if (width->sizeHint().height()!=-1) + width->setMinimumHeight(width->sizeHint().height()); + if (width->sizeHint().height()!=-1) + width->setMaximumHeight(width->sizeHint().height()); + if (height->sizeHint().width()!=-1) + height->setMinimumWidth(height->sizeHint().width()); + if (height->sizeHint().height()!=-1) + height->setMinimumHeight(height->sizeHint().height()); + if (height->sizeHint().height()!=-1) + height->setMaximumHeight(height->sizeHint().height()); + if (headheight->sizeHint().width()!=-1) + headheight->setMinimumWidth(headheight->sizeHint().width()); + if (headheight->sizeHint().height()!=-1) + headheight->setMinimumHeight(headheight->sizeHint().height()); + if (headheight->sizeHint().height()!=-1) + headheight->setMaximumHeight(headheight->sizeHint().height()); + if (headsep->sizeHint().width()!=-1) + headsep->setMinimumWidth(headsep->sizeHint().width()); + if (headsep->sizeHint().height()!=-1) + headsep->setMinimumHeight(headsep->sizeHint().height()); + if (headsep->sizeHint().height()!=-1) + headsep->setMaximumHeight(headsep->sizeHint().height()); + if (footskip->sizeHint().width()!=-1) + footskip->setMinimumWidth(footskip->sizeHint().width()); + if (footskip->sizeHint().height()!=-1) + footskip->setMinimumHeight(footskip->sizeHint().height()); + if (footskip->sizeHint().height()!=-1) + footskip->setMaximumHeight(footskip->sizeHint().height()); if (qtarch_labelMargin->sizeHint().width()!=-1) qtarch_labelMargin->setMinimumWidth(qtarch_labelMargin->sizeHint().width()); if (qtarch_labelMargin->sizeHint().height()!=-1) @@ -446,12 +476,6 @@ DocGeometryDialogData::DocGeometryDialogData qtarch_labelMargin->setMaximumWidth(qtarch_labelMargin->sizeHint().width()); if (qtarch_labelMargin->sizeHint().height()!=-1) qtarch_labelMargin->setMaximumHeight(qtarch_labelMargin->sizeHint().height()); - if (margins->sizeHint().width()!=-1) - margins->setMinimumWidth(margins->sizeHint().width()); - if (margins->sizeHint().height()!=-1) - margins->setMinimumHeight(margins->sizeHint().height()); - if (margins->sizeHint().height()!=-1) - margins->setMaximumHeight(margins->sizeHint().height()); if (qtarch_labelWidth->sizeHint().width()!=-1) qtarch_labelWidth->setMinimumWidth(qtarch_labelWidth->sizeHint().width()); if (qtarch_labelWidth->sizeHint().height()!=-1) @@ -500,22 +524,6 @@ DocGeometryDialogData::DocGeometryDialogData qtarch_labelRight->setMaximumWidth(qtarch_labelRight->sizeHint().width()); if (qtarch_labelRight->sizeHint().height()!=-1) qtarch_labelRight->setMaximumHeight(qtarch_labelRight->sizeHint().height()); - if (portrait->sizeHint().width()!=-1) - portrait->setMinimumWidth(portrait->sizeHint().width()); - if (portrait->sizeHint().height()!=-1) - portrait->setMinimumHeight(portrait->sizeHint().height()); - if (portrait->sizeHint().width()!=-1) - portrait->setMaximumWidth(portrait->sizeHint().width()); - if (portrait->sizeHint().height()!=-1) - portrait->setMaximumHeight(portrait->sizeHint().height()); - if (landscape->sizeHint().width()!=-1) - landscape->setMinimumWidth(landscape->sizeHint().width()); - if (landscape->sizeHint().height()!=-1) - landscape->setMinimumHeight(landscape->sizeHint().height()); - if (landscape->sizeHint().width()!=-1) - landscape->setMaximumWidth(landscape->sizeHint().width()); - if (landscape->sizeHint().height()!=-1) - landscape->setMaximumHeight(landscape->sizeHint().height()); if (qtarch_labelheadheight->sizeHint().width()!=-1) qtarch_labelheadheight->setMinimumWidth(qtarch_labelheadheight->sizeHint().width()); if (qtarch_labelheadheight->sizeHint().height()!=-1) @@ -540,18 +548,12 @@ DocGeometryDialogData::DocGeometryDialogData qtarch_labelFootskip->setMaximumWidth(qtarch_labelFootskip->sizeHint().width()); if (qtarch_labelFootskip->sizeHint().height()!=-1) qtarch_labelFootskip->setMaximumHeight(qtarch_labelFootskip->sizeHint().height()); - if (width->sizeHint().width()!=-1) - width->setMinimumWidth(width->sizeHint().width()); - if (width->sizeHint().height()!=-1) - width->setMinimumHeight(width->sizeHint().height()); - if (width->sizeHint().height()!=-1) - width->setMaximumHeight(width->sizeHint().height()); - if (height->sizeHint().width()!=-1) - height->setMinimumWidth(height->sizeHint().width()); - if (height->sizeHint().height()!=-1) - height->setMinimumHeight(height->sizeHint().height()); - if (height->sizeHint().height()!=-1) - height->setMaximumHeight(height->sizeHint().height()); + if (margins->sizeHint().width()!=-1) + margins->setMinimumWidth(margins->sizeHint().width()); + if (margins->sizeHint().height()!=-1) + margins->setMinimumHeight(margins->sizeHint().height()); + if (margins->sizeHint().height()!=-1) + margins->setMaximumHeight(margins->sizeHint().height()); if (top->sizeHint().width()!=-1) top->setMinimumWidth(top->sizeHint().width()); if (top->sizeHint().height()!=-1) @@ -570,30 +572,28 @@ DocGeometryDialogData::DocGeometryDialogData left->setMinimumHeight(left->sizeHint().height()); if (left->sizeHint().height()!=-1) left->setMaximumHeight(left->sizeHint().height()); - if (headheight->sizeHint().width()!=-1) - headheight->setMinimumWidth(headheight->sizeHint().width()); - if (headheight->sizeHint().height()!=-1) - headheight->setMinimumHeight(headheight->sizeHint().height()); - if (headheight->sizeHint().height()!=-1) - headheight->setMaximumHeight(headheight->sizeHint().height()); - if (headsep->sizeHint().width()!=-1) - headsep->setMinimumWidth(headsep->sizeHint().width()); - if (headsep->sizeHint().height()!=-1) - headsep->setMinimumHeight(headsep->sizeHint().height()); - if (headsep->sizeHint().height()!=-1) - headsep->setMaximumHeight(headsep->sizeHint().height()); - if (footskip->sizeHint().width()!=-1) - footskip->setMinimumWidth(footskip->sizeHint().width()); - if (footskip->sizeHint().height()!=-1) - footskip->setMinimumHeight(footskip->sizeHint().height()); - if (footskip->sizeHint().height()!=-1) - footskip->setMaximumHeight(footskip->sizeHint().height()); if (right->sizeHint().width()!=-1) right->setMinimumWidth(right->sizeHint().width()); if (right->sizeHint().height()!=-1) right->setMinimumHeight(right->sizeHint().height()); if (right->sizeHint().height()!=-1) right->setMaximumHeight(right->sizeHint().height()); + if (portrait->sizeHint().width()!=-1) + portrait->setMinimumWidth(portrait->sizeHint().width()); + if (portrait->sizeHint().height()!=-1) + portrait->setMinimumHeight(portrait->sizeHint().height()); + if (portrait->sizeHint().width()!=-1) + portrait->setMaximumWidth(portrait->sizeHint().width()); + if (portrait->sizeHint().height()!=-1) + portrait->setMaximumHeight(portrait->sizeHint().height()); + if (landscape->sizeHint().width()!=-1) + landscape->setMinimumWidth(landscape->sizeHint().width()); + if (landscape->sizeHint().height()!=-1) + landscape->setMinimumHeight(landscape->sizeHint().height()); + if (landscape->sizeHint().width()!=-1) + landscape->setMaximumWidth(landscape->sizeHint().width()); + if (landscape->sizeHint().height()!=-1) + landscape->setMaximumHeight(landscape->sizeHint().height()); QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); qtarch_layout_1->addStrut( 0 ); QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); diff --git a/src/frontends/kde/dlg/docgeometrydlgdata.h b/src/frontends/kde/dlg/docgeometrydlgdata.h index 338af008a0..13fdfd28a4 100644 --- a/src/frontends/kde/dlg/docgeometrydlgdata.h +++ b/src/frontends/kde/dlg/docgeometrydlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docgeometrydlgdata.h - Last generated: Wed Jan 24 06:43:37 2001 + Last generated: Sat Feb 10 21:35:53 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -42,18 +42,18 @@ protected slots: public: QComboBox* papersize; - QComboBox* margins; - QRadioButton* portrait; - QRadioButton* landscape; LengthEntry* width; LengthEntry* height; - LengthEntry* top; - LengthEntry* bottom; - LengthEntry* left; LengthEntry* headheight; LengthEntry* headsep; LengthEntry* footskip; + QComboBox* margins; + LengthEntry* top; + LengthEntry* bottom; + LengthEntry* left; LengthEntry* right; + QRadioButton* portrait; + QRadioButton* landscape; }; diff --git a/src/frontends/kde/dlg/doclanguagedlgdata.C b/src/frontends/kde/dlg/doclanguagedlgdata.C index b57493a864..771109bfe0 100644 --- a/src/frontends/kde/dlg/doclanguagedlgdata.C +++ b/src/frontends/kde/dlg/doclanguagedlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: doclanguagedlgdata.C - Last generated: Wed Jan 24 06:43:17 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/doclanguagedlgdata.h b/src/frontends/kde/dlg/doclanguagedlgdata.h index 8878aeee27..733a811c2f 100644 --- a/src/frontends/kde/dlg/doclanguagedlgdata.h +++ b/src/frontends/kde/dlg/doclanguagedlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: doclanguagedlgdata.h - Last generated: Wed Jan 24 06:43:17 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/docsettingsdlgdata.C b/src/frontends/kde/dlg/docsettingsdlgdata.C index a1d5760f50..2a852253d9 100644 --- a/src/frontends/kde/dlg/docsettingsdlgdata.C +++ b/src/frontends/kde/dlg/docsettingsdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docsettingsdlgdata.C - Last generated: Wed Jan 24 06:43:24 2001 + Last generated: Sun Feb 11 00:57:35 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -19,6 +19,7 @@ #define Inherited QWidget #include +#include DocSettingsDialogData::DocSettingsDialogData ( @@ -28,9 +29,76 @@ DocSettingsDialogData::DocSettingsDialogData : Inherited( parent, name, 0 ) { + QGroupBox* qtarch_paraspacingbox; + qtarch_paraspacingbox = new QGroupBox( this, "paraspacingbox" ); + qtarch_paraspacingbox->setGeometry( 5, 180, 540, 220 ); + qtarch_paraspacingbox->setMinimumSize( 35, 69 ); + qtarch_paraspacingbox->setMaximumSize( 32767, 32767 ); + qtarch_paraspacingbox->setFocusPolicy( QWidget::NoFocus ); + qtarch_paraspacingbox->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_paraspacingbox->setFontPropagation( QWidget::NoChildren ); + qtarch_paraspacingbox->setPalettePropagation( QWidget::NoChildren ); + qtarch_paraspacingbox->setFrameStyle( 49 ); + qtarch_paraspacingbox->setLineWidth( 1 ); + qtarch_paraspacingbox->setMidLineWidth( 0 ); + qtarch_paraspacingbox->QFrame::setMargin( 17 ); + qtarch_paraspacingbox->setTitle( _("Paragraph spacing") ); + qtarch_paraspacingbox->setAlignment( 1 ); + + QLabel* qtarch_labelFontSize; + qtarch_labelFontSize = new QLabel( this, "labelFontSize" ); + qtarch_labelFontSize->setGeometry( 114, 95, 104, 25 ); + qtarch_labelFontSize->setMinimumSize( 0, 0 ); + qtarch_labelFontSize->setMaximumSize( 32767, 32767 ); + qtarch_labelFontSize->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelFontSize->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelFontSize->setFontPropagation( QWidget::NoChildren ); + qtarch_labelFontSize->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelFontSize->setFrameStyle( 0 ); + qtarch_labelFontSize->setLineWidth( 1 ); + qtarch_labelFontSize->setMidLineWidth( 0 ); + qtarch_labelFontSize->QFrame::setMargin( 0 ); + qtarch_labelFontSize->setText( _("Font size :") ); + qtarch_labelFontSize->setAlignment( 289 ); + qtarch_labelFontSize->setMargin( -1 ); + + QLabel* qtarch_labelFont; + qtarch_labelFont = new QLabel( this, "labelFont" ); + qtarch_labelFont->setGeometry( 114, 65, 104, 25 ); + qtarch_labelFont->setMinimumSize( 0, 0 ); + qtarch_labelFont->setMaximumSize( 32767, 32767 ); + qtarch_labelFont->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelFont->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelFont->setFontPropagation( QWidget::NoChildren ); + qtarch_labelFont->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelFont->setFrameStyle( 0 ); + qtarch_labelFont->setLineWidth( 1 ); + qtarch_labelFont->setMidLineWidth( 0 ); + qtarch_labelFont->QFrame::setMargin( 0 ); + qtarch_labelFont->setText( _("Font family :") ); + qtarch_labelFont->setAlignment( 289 ); + qtarch_labelFont->setMargin( -1 ); + + QLabel* qtarch_labelPagestyle; + qtarch_labelPagestyle = new QLabel( this, "labelPagestyle" ); + qtarch_labelPagestyle->setGeometry( 114, 35, 104, 25 ); + qtarch_labelPagestyle->setMinimumSize( 0, 0 ); + qtarch_labelPagestyle->setMaximumSize( 32767, 32767 ); + qtarch_labelPagestyle->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelPagestyle->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelPagestyle->setFontPropagation( QWidget::NoChildren ); + qtarch_labelPagestyle->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelPagestyle->setFrameStyle( 0 ); + qtarch_labelPagestyle->setLineWidth( 1 ); + qtarch_labelPagestyle->setMidLineWidth( 0 ); + qtarch_labelPagestyle->QFrame::setMargin( 0 ); + qtarch_labelPagestyle->setText( _("Page style :") ); + qtarch_labelPagestyle->setAlignment( 289 ); + qtarch_labelPagestyle->setMargin( -1 ); + QLabel* qtarch_labelClass; qtarch_labelClass = new QLabel( this, "labelClass" ); - qtarch_labelClass->setGeometry( 95, 5, 85, 23 ); + qtarch_labelClass->setGeometry( 114, 5, 104, 25 ); qtarch_labelClass->setMinimumSize( 0, 0 ); qtarch_labelClass->setMaximumSize( 32767, 32767 ); qtarch_labelClass->setFocusPolicy( QWidget::NoFocus ); @@ -46,7 +114,7 @@ DocSettingsDialogData::DocSettingsDialogData qtarch_labelClass->setMargin( -1 ); docclass = new QComboBox( FALSE, this, "docclass" ); - docclass->setGeometry( 275, 5, 85, 23 ); + docclass->setGeometry( 332, 5, 104, 25 ); docclass->setMinimumSize( 0, 0 ); docclass->setMaximumSize( 32767, 32767 ); connect( docclass, SIGNAL(highlighted(const char*)), SLOT(classChanged(const char*)) ); @@ -59,59 +127,8 @@ DocSettingsDialogData::DocSettingsDialogData docclass->setMaxCount( 2147483647 ); docclass->setAutoCompletion( false ); - QLabel* qtarch_labelPagestyle; - qtarch_labelPagestyle = new QLabel( this, "labelPagestyle" ); - qtarch_labelPagestyle->setGeometry( 95, 33, 85, 23 ); - qtarch_labelPagestyle->setMinimumSize( 0, 0 ); - qtarch_labelPagestyle->setMaximumSize( 32767, 32767 ); - qtarch_labelPagestyle->setFocusPolicy( QWidget::NoFocus ); - qtarch_labelPagestyle->setBackgroundMode( QWidget::PaletteBackground ); - qtarch_labelPagestyle->setFontPropagation( QWidget::NoChildren ); - qtarch_labelPagestyle->setPalettePropagation( QWidget::NoChildren ); - qtarch_labelPagestyle->setFrameStyle( 0 ); - qtarch_labelPagestyle->setLineWidth( 1 ); - qtarch_labelPagestyle->setMidLineWidth( 0 ); - qtarch_labelPagestyle->QFrame::setMargin( 0 ); - qtarch_labelPagestyle->setText( _("Page style :") ); - qtarch_labelPagestyle->setAlignment( 289 ); - qtarch_labelPagestyle->setMargin( -1 ); - - QLabel* qtarch_labelFont; - qtarch_labelFont = new QLabel( this, "labelFont" ); - qtarch_labelFont->setGeometry( 95, 61, 85, 22 ); - qtarch_labelFont->setMinimumSize( 0, 0 ); - qtarch_labelFont->setMaximumSize( 32767, 32767 ); - qtarch_labelFont->setFocusPolicy( QWidget::NoFocus ); - qtarch_labelFont->setBackgroundMode( QWidget::PaletteBackground ); - qtarch_labelFont->setFontPropagation( QWidget::NoChildren ); - qtarch_labelFont->setPalettePropagation( QWidget::NoChildren ); - qtarch_labelFont->setFrameStyle( 0 ); - qtarch_labelFont->setLineWidth( 1 ); - qtarch_labelFont->setMidLineWidth( 0 ); - qtarch_labelFont->QFrame::setMargin( 0 ); - qtarch_labelFont->setText( _("Font family :") ); - qtarch_labelFont->setAlignment( 289 ); - qtarch_labelFont->setMargin( -1 ); - - QLabel* qtarch_labelFontSize; - qtarch_labelFontSize = new QLabel( this, "labelFontSize" ); - qtarch_labelFontSize->setGeometry( 95, 88, 85, 23 ); - qtarch_labelFontSize->setMinimumSize( 0, 0 ); - qtarch_labelFontSize->setMaximumSize( 32767, 32767 ); - qtarch_labelFontSize->setFocusPolicy( QWidget::NoFocus ); - qtarch_labelFontSize->setBackgroundMode( QWidget::PaletteBackground ); - qtarch_labelFontSize->setFontPropagation( QWidget::NoChildren ); - qtarch_labelFontSize->setPalettePropagation( QWidget::NoChildren ); - qtarch_labelFontSize->setFrameStyle( 0 ); - qtarch_labelFontSize->setLineWidth( 1 ); - qtarch_labelFontSize->setMidLineWidth( 0 ); - qtarch_labelFontSize->QFrame::setMargin( 0 ); - qtarch_labelFontSize->setText( _("Font size :") ); - qtarch_labelFontSize->setAlignment( 289 ); - qtarch_labelFontSize->setMargin( -1 ); - pagestyle = new QComboBox( FALSE, this, "pagestyle" ); - pagestyle->setGeometry( 275, 33, 85, 23 ); + pagestyle->setGeometry( 332, 35, 104, 25 ); pagestyle->setMinimumSize( 0, 0 ); pagestyle->setMaximumSize( 32767, 32767 ); pagestyle->setFocusPolicy( QWidget::StrongFocus ); @@ -124,7 +141,7 @@ DocSettingsDialogData::DocSettingsDialogData pagestyle->setAutoCompletion( false ); font = new QComboBox( FALSE, this, "font" ); - font->setGeometry( 275, 61, 85, 22 ); + font->setGeometry( 332, 65, 104, 25 ); font->setMinimumSize( 0, 0 ); font->setMaximumSize( 32767, 32767 ); font->setFocusPolicy( QWidget::StrongFocus ); @@ -137,7 +154,7 @@ DocSettingsDialogData::DocSettingsDialogData font->setAutoCompletion( false ); fontsize = new QComboBox( FALSE, this, "fontsize" ); - fontsize->setGeometry( 275, 88, 85, 23 ); + fontsize->setGeometry( 332, 95, 104, 25 ); fontsize->setMinimumSize( 0, 0 ); fontsize->setMaximumSize( 32767, 32767 ); fontsize->setFocusPolicy( QWidget::StrongFocus ); @@ -150,7 +167,7 @@ DocSettingsDialogData::DocSettingsDialogData fontsize->setAutoCompletion( false ); sides = new QCheckBox( this, "sides" ); - sides->setGeometry( 93, 116, 88, 91 ); + sides->setGeometry( 112, 125, 107, 50 ); sides->setMinimumSize( 0, 0 ); sides->setMaximumSize( 32767, 32767 ); sides->setFocusPolicy( QWidget::TabFocus ); @@ -163,7 +180,7 @@ DocSettingsDialogData::DocSettingsDialogData sides->setChecked( false ); columns = new QCheckBox( this, "columns" ); - columns->setGeometry( 274, 116, 88, 91 ); + columns->setGeometry( 331, 125, 107, 50 ); columns->setMinimumSize( 0, 0 ); columns->setMaximumSize( 32767, 32767 ); columns->setFocusPolicy( QWidget::TabFocus ); @@ -175,22 +192,9 @@ DocSettingsDialogData::DocSettingsDialogData columns->setAutoResize( false ); columns->setChecked( false ); - separation = new QCheckBox( this, "separation" ); - separation->setGeometry( 153, 212, 149, 91 ); - separation->setMinimumSize( 0, 0 ); - separation->setMaximumSize( 32767, 32767 ); - separation->setFocusPolicy( QWidget::TabFocus ); - separation->setBackgroundMode( QWidget::PaletteBackground ); - separation->setFontPropagation( QWidget::NoChildren ); - separation->setPalettePropagation( QWidget::NoChildren ); - separation->setText( _("Skip separation (FIXME)") ); - separation->setAutoRepeat( false ); - separation->setAutoResize( false ); - separation->setChecked( false ); - QLabel* qtarch_labelSpacing; qtarch_labelSpacing = new QLabel( this, "labelSpacing" ); - qtarch_labelSpacing->setGeometry( 5, 308, 145, 46 ); + qtarch_labelSpacing->setGeometry( 5, 405, 177, 50 ); qtarch_labelSpacing->setMinimumSize( 0, 0 ); qtarch_labelSpacing->setMaximumSize( 32767, 32767 ); qtarch_labelSpacing->setFocusPolicy( QWidget::NoFocus ); @@ -205,65 +209,9 @@ DocSettingsDialogData::DocSettingsDialogData qtarch_labelSpacing->setAlignment( 289 ); qtarch_labelSpacing->setMargin( -1 ); - linespacing = new QComboBox( FALSE, this, "linespacing" ); - linespacing->setGeometry( 155, 308, 215, 46 ); - linespacing->setMinimumSize( 0, 0 ); - linespacing->setMaximumSize( 32767, 32767 ); - linespacing->setFocusPolicy( QWidget::StrongFocus ); - linespacing->setBackgroundMode( QWidget::PaletteBackground ); - linespacing->setFontPropagation( QWidget::AllChildren ); - linespacing->setPalettePropagation( QWidget::AllChildren ); - linespacing->setSizeLimit( 30 ); - linespacing->setAutoResize( false ); - linespacing->setMaxCount( 2147483647 ); - linespacing->setAutoCompletion( false ); - - QLabel* qtarch_labelSkip; - qtarch_labelSkip = new QLabel( this, "labelSkip" ); - qtarch_labelSkip->setGeometry( 5, 359, 145, 45 ); - qtarch_labelSkip->setMinimumSize( 0, 0 ); - qtarch_labelSkip->setMaximumSize( 32767, 32767 ); - qtarch_labelSkip->setFocusPolicy( QWidget::NoFocus ); - qtarch_labelSkip->setBackgroundMode( QWidget::PaletteBackground ); - qtarch_labelSkip->setFontPropagation( QWidget::NoChildren ); - qtarch_labelSkip->setPalettePropagation( QWidget::NoChildren ); - qtarch_labelSkip->setFrameStyle( 0 ); - qtarch_labelSkip->setLineWidth( 1 ); - qtarch_labelSkip->setMidLineWidth( 0 ); - qtarch_labelSkip->QFrame::setMargin( 0 ); - qtarch_labelSkip->setText( _("Default skip spacing :") ); - qtarch_labelSkip->setAlignment( 289 ); - qtarch_labelSkip->setMargin( -1 ); - - skipspacing = new QComboBox( FALSE, this, "skipspacing" ); - skipspacing->setGeometry( 155, 359, 215, 45 ); - skipspacing->setMinimumSize( 0, 0 ); - skipspacing->setMaximumSize( 32767, 32767 ); - skipspacing->setFocusPolicy( QWidget::StrongFocus ); - skipspacing->setBackgroundMode( QWidget::PaletteBackground ); - skipspacing->setFontPropagation( QWidget::AllChildren ); - skipspacing->setPalettePropagation( QWidget::AllChildren ); - skipspacing->setSizeLimit( 30 ); - skipspacing->setAutoResize( false ); - skipspacing->setMaxCount( 2147483647 ); - skipspacing->setAutoCompletion( false ); - - extraoptions = new QLineEdit( this, "extraoptions" ); - extraoptions->setGeometry( 230, 409, 220, 91 ); - extraoptions->setMinimumSize( 0, 0 ); - extraoptions->setMaximumSize( 32767, 32767 ); - extraoptions->setFocusPolicy( QWidget::StrongFocus ); - extraoptions->setBackgroundMode( QWidget::PaletteBase ); - extraoptions->setFontPropagation( QWidget::NoChildren ); - extraoptions->setPalettePropagation( QWidget::NoChildren ); - extraoptions->setText( "" ); - extraoptions->setMaxLength( 32767 ); - extraoptions->setFrame( QLineEdit::Normal ); - extraoptions->setFrame( true ); - QLabel* qtarch_labelExtraoptions; qtarch_labelExtraoptions = new QLabel( this, "labelExtraoptions" ); - qtarch_labelExtraoptions->setGeometry( 5, 409, 220, 91 ); + qtarch_labelExtraoptions->setGeometry( 5, 460, 268, 50 ); qtarch_labelExtraoptions->setMinimumSize( 0, 0 ); qtarch_labelExtraoptions->setMaximumSize( 32767, 32767 ); qtarch_labelExtraoptions->setFocusPolicy( QWidget::NoFocus ); @@ -278,8 +226,130 @@ DocSettingsDialogData::DocSettingsDialogData qtarch_labelExtraoptions->setAlignment( 289 ); qtarch_labelExtraoptions->setMargin( -1 ); + QLabel* qtarch_labelSkip; + qtarch_labelSkip = new QLabel( qtarch_paraspacingbox, "labelSkip" ); + qtarch_labelSkip->setGeometry( 5, 67, 128, 30 ); + qtarch_labelSkip->setMinimumSize( 0, 0 ); + qtarch_labelSkip->setMaximumSize( 32767, 32767 ); + qtarch_labelSkip->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelSkip->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelSkip->setFontPropagation( QWidget::NoChildren ); + qtarch_labelSkip->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelSkip->setFrameStyle( 0 ); + qtarch_labelSkip->setLineWidth( 1 ); + qtarch_labelSkip->setMidLineWidth( 0 ); + qtarch_labelSkip->QFrame::setMargin( 0 ); + qtarch_labelSkip->setText( _("Default paragraph spacing :") ); + qtarch_labelSkip->setAlignment( 289 ); + qtarch_labelSkip->setMargin( -1 ); + + QLabel* qtarch_labelparasize; + qtarch_labelparasize = new QLabel( qtarch_paraspacingbox, "labelparasize" ); + qtarch_labelparasize->setGeometry( 5, 114, 173, 30 ); + qtarch_labelparasize->setMinimumSize( 0, 0 ); + qtarch_labelparasize->setMaximumSize( 32767, 32767 ); + qtarch_labelparasize->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelparasize->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelparasize->setFontPropagation( QWidget::NoChildren ); + qtarch_labelparasize->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelparasize->setFrameStyle( 0 ); + qtarch_labelparasize->setLineWidth( 1 ); + qtarch_labelparasize->setMidLineWidth( 0 ); + qtarch_labelparasize->QFrame::setMargin( 0 ); + qtarch_labelparasize->setText( _("Size :") ); + qtarch_labelparasize->setAlignment( 289 ); + qtarch_labelparasize->setMargin( -1 ); + + QLabel* qtarch_paralabelShrink; + qtarch_paralabelShrink = new QLabel( qtarch_paraspacingbox, "paralabelShrink" ); + qtarch_paralabelShrink->setGeometry( 5, 185, 173, 30 ); + qtarch_paralabelShrink->setMinimumSize( 0, 0 ); + qtarch_paralabelShrink->setMaximumSize( 32767, 32767 ); + qtarch_paralabelShrink->setFocusPolicy( QWidget::NoFocus ); + qtarch_paralabelShrink->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_paralabelShrink->setFontPropagation( QWidget::NoChildren ); + qtarch_paralabelShrink->setPalettePropagation( QWidget::NoChildren ); + qtarch_paralabelShrink->setFrameStyle( 0 ); + qtarch_paralabelShrink->setLineWidth( 1 ); + qtarch_paralabelShrink->setMidLineWidth( 0 ); + qtarch_paralabelShrink->QFrame::setMargin( 0 ); + qtarch_paralabelShrink->setText( _("Shrink :") ); + qtarch_paralabelShrink->setAlignment( 289 ); + qtarch_paralabelShrink->setMargin( -1 ); + + QLabel* qtarch_paralabelStretch; + qtarch_paralabelStretch = new QLabel( qtarch_paraspacingbox, "paralabelStretch" ); + qtarch_paralabelStretch->setGeometry( 5, 149, 173, 31 ); + qtarch_paralabelStretch->setMinimumSize( 0, 0 ); + qtarch_paralabelStretch->setMaximumSize( 32767, 32767 ); + qtarch_paralabelStretch->setFocusPolicy( QWidget::NoFocus ); + qtarch_paralabelStretch->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_paralabelStretch->setFontPropagation( QWidget::NoChildren ); + qtarch_paralabelStretch->setPalettePropagation( QWidget::NoChildren ); + qtarch_paralabelStretch->setFrameStyle( 0 ); + qtarch_paralabelStretch->setLineWidth( 1 ); + qtarch_paralabelStretch->setMidLineWidth( 0 ); + qtarch_paralabelStretch->QFrame::setMargin( 0 ); + qtarch_paralabelStretch->setText( _("Stretch :") ); + qtarch_paralabelStretch->setAlignment( 289 ); + qtarch_paralabelStretch->setMargin( -1 ); + + paraspacing = new QComboBox( FALSE, qtarch_paraspacingbox, "paraspacing" ); + paraspacing->setGeometry( 279, 67, 128, 30 ); + paraspacing->setMinimumSize( 0, 0 ); + paraspacing->setMaximumSize( 32767, 32767 ); + connect( paraspacing, SIGNAL(highlighted(const char*)), SLOT(paraspacingChanged(const char*)) ); + paraspacing->setFocusPolicy( QWidget::StrongFocus ); + paraspacing->setBackgroundMode( QWidget::PaletteBackground ); + paraspacing->setFontPropagation( QWidget::AllChildren ); + paraspacing->setPalettePropagation( QWidget::AllChildren ); + paraspacing->setSizeLimit( 30 ); + paraspacing->setAutoResize( false ); + paraspacing->setMaxCount( 2147483647 ); + paraspacing->setAutoCompletion( false ); + + paraspacingValue = new LengthEntry( qtarch_paraspacingbox, "paraspacingValue" ); + paraspacingValue->setGeometry( 183, 114, 174, 30 ); + paraspacingValue->setMinimumSize( 0, 0 ); + paraspacingValue->setMaximumSize( 32767, 32767 ); + paraspacingValue->setFocusPolicy( QWidget::NoFocus ); + paraspacingValue->setBackgroundMode( QWidget::PaletteBackground ); + paraspacingValue->setFontPropagation( QWidget::NoChildren ); + paraspacingValue->setPalettePropagation( QWidget::NoChildren ); + + paraspacingStretch = new LengthEntry( qtarch_paraspacingbox, "paraspacingStretch" ); + paraspacingStretch->setGeometry( 183, 149, 174, 31 ); + paraspacingStretch->setMinimumSize( 0, 0 ); + paraspacingStretch->setMaximumSize( 32767, 32767 ); + paraspacingStretch->setFocusPolicy( QWidget::NoFocus ); + paraspacingStretch->setBackgroundMode( QWidget::PaletteBackground ); + paraspacingStretch->setFontPropagation( QWidget::NoChildren ); + paraspacingStretch->setPalettePropagation( QWidget::NoChildren ); + + paraspacingShrink = new LengthEntry( qtarch_paraspacingbox, "paraspacingShrink" ); + paraspacingShrink->setGeometry( 183, 185, 174, 30 ); + paraspacingShrink->setMinimumSize( 0, 0 ); + paraspacingShrink->setMaximumSize( 32767, 32767 ); + paraspacingShrink->setFocusPolicy( QWidget::NoFocus ); + paraspacingShrink->setBackgroundMode( QWidget::PaletteBackground ); + paraspacingShrink->setFontPropagation( QWidget::NoChildren ); + paraspacingShrink->setPalettePropagation( QWidget::NoChildren ); + + linespacing = new QComboBox( FALSE, this, "linespacing" ); + linespacing->setGeometry( 187, 405, 176, 50 ); + linespacing->setMinimumSize( 0, 0 ); + linespacing->setMaximumSize( 32767, 32767 ); + linespacing->setFocusPolicy( QWidget::StrongFocus ); + linespacing->setBackgroundMode( QWidget::PaletteBackground ); + linespacing->setFontPropagation( QWidget::AllChildren ); + linespacing->setPalettePropagation( QWidget::AllChildren ); + linespacing->setSizeLimit( 30 ); + linespacing->setAutoResize( false ); + linespacing->setMaxCount( 2147483647 ); + linespacing->setAutoCompletion( false ); + linespacingVal = new KRestrictedLine( this, "linespacingVal" ); - linespacingVal->setGeometry( 375, 308, 75, 46 ); + linespacingVal->setGeometry( 368, 405, 177, 50 ); linespacingVal->setMinimumSize( 0, 0 ); linespacingVal->setMaximumSize( 32767, 32767 ); linespacingVal->setFocusPolicy( QWidget::StrongFocus ); @@ -292,23 +362,61 @@ DocSettingsDialogData::DocSettingsDialogData linespacingVal->setFrame( true ); linespacingVal->setValidChars( "0123456789.," ); - QLabel* qtarch_FIXME; - qtarch_FIXME = new QLabel( this, "FIXME" ); - qtarch_FIXME->setGeometry( 375, 359, 75, 45 ); - qtarch_FIXME->setMinimumSize( 0, 0 ); - qtarch_FIXME->setMaximumSize( 32767, 32767 ); - qtarch_FIXME->setFocusPolicy( QWidget::NoFocus ); - qtarch_FIXME->setBackgroundMode( QWidget::PaletteBackground ); - qtarch_FIXME->setFontPropagation( QWidget::NoChildren ); - qtarch_FIXME->setPalettePropagation( QWidget::NoChildren ); - qtarch_FIXME->setFrameStyle( 0 ); - qtarch_FIXME->setLineWidth( 1 ); - qtarch_FIXME->setMidLineWidth( 0 ); - qtarch_FIXME->QFrame::setMargin( 0 ); - qtarch_FIXME->setText( _("FIXME") ); - qtarch_FIXME->setAlignment( 289 ); - qtarch_FIXME->setMargin( -1 ); + extraoptions = new QLineEdit( this, "extraoptions" ); + extraoptions->setGeometry( 278, 460, 267, 50 ); + extraoptions->setMinimumSize( 0, 0 ); + extraoptions->setMaximumSize( 32767, 32767 ); + extraoptions->setFocusPolicy( QWidget::StrongFocus ); + extraoptions->setBackgroundMode( QWidget::PaletteBase ); + extraoptions->setFontPropagation( QWidget::NoChildren ); + extraoptions->setPalettePropagation( QWidget::NoChildren ); + extraoptions->setText( "" ); + extraoptions->setMaxLength( 32767 ); + extraoptions->setFrame( QLineEdit::Normal ); + extraoptions->setFrame( true ); + addspace = new QCheckBox( this, "addspace" ); + addspace->setGeometry( 10, 200, 398, 30 ); + addspace->setMinimumSize( 0, 0 ); + addspace->setMaximumSize( 32767, 32767 ); + connect( addspace, SIGNAL(toggled(bool)), SLOT(addspaceChanged(bool)) ); + addspace->setFocusPolicy( QWidget::TabFocus ); + addspace->setBackgroundMode( QWidget::PaletteBackground ); + addspace->setFontPropagation( QWidget::NoChildren ); + addspace->setPalettePropagation( QWidget::NoChildren ); + addspace->setText( _("Add space") ); + addspace->setAutoRepeat( false ); + addspace->setAutoResize( false ); + addspace->setChecked( false ); + + if (qtarch_paraspacingbox->sizeHint().width()!=-1) + qtarch_paraspacingbox->setMinimumWidth(qtarch_paraspacingbox->sizeHint().width()); + if (qtarch_paraspacingbox->sizeHint().height()!=-1) + qtarch_paraspacingbox->setMinimumHeight(qtarch_paraspacingbox->sizeHint().height()); + if (qtarch_labelFontSize->sizeHint().width()!=-1) + qtarch_labelFontSize->setMinimumWidth(qtarch_labelFontSize->sizeHint().width()); + if (qtarch_labelFontSize->sizeHint().height()!=-1) + qtarch_labelFontSize->setMinimumHeight(qtarch_labelFontSize->sizeHint().height()); + if (qtarch_labelFontSize->sizeHint().width()!=-1) + qtarch_labelFontSize->setMaximumWidth(qtarch_labelFontSize->sizeHint().width()); + if (qtarch_labelFontSize->sizeHint().height()!=-1) + qtarch_labelFontSize->setMaximumHeight(qtarch_labelFontSize->sizeHint().height()); + if (qtarch_labelFont->sizeHint().width()!=-1) + qtarch_labelFont->setMinimumWidth(qtarch_labelFont->sizeHint().width()); + if (qtarch_labelFont->sizeHint().height()!=-1) + qtarch_labelFont->setMinimumHeight(qtarch_labelFont->sizeHint().height()); + if (qtarch_labelFont->sizeHint().width()!=-1) + qtarch_labelFont->setMaximumWidth(qtarch_labelFont->sizeHint().width()); + if (qtarch_labelFont->sizeHint().height()!=-1) + qtarch_labelFont->setMaximumHeight(qtarch_labelFont->sizeHint().height()); + if (qtarch_labelPagestyle->sizeHint().width()!=-1) + qtarch_labelPagestyle->setMinimumWidth(qtarch_labelPagestyle->sizeHint().width()); + if (qtarch_labelPagestyle->sizeHint().height()!=-1) + qtarch_labelPagestyle->setMinimumHeight(qtarch_labelPagestyle->sizeHint().height()); + if (qtarch_labelPagestyle->sizeHint().width()!=-1) + qtarch_labelPagestyle->setMaximumWidth(qtarch_labelPagestyle->sizeHint().width()); + if (qtarch_labelPagestyle->sizeHint().height()!=-1) + qtarch_labelPagestyle->setMaximumHeight(qtarch_labelPagestyle->sizeHint().height()); if (qtarch_labelClass->sizeHint().width()!=-1) qtarch_labelClass->setMinimumWidth(qtarch_labelClass->sizeHint().width()); if (qtarch_labelClass->sizeHint().height()!=-1) @@ -323,30 +431,6 @@ DocSettingsDialogData::DocSettingsDialogData docclass->setMinimumHeight(docclass->sizeHint().height()); if (docclass->sizeHint().height()!=-1) docclass->setMaximumHeight(docclass->sizeHint().height()); - if (qtarch_labelPagestyle->sizeHint().width()!=-1) - qtarch_labelPagestyle->setMinimumWidth(qtarch_labelPagestyle->sizeHint().width()); - if (qtarch_labelPagestyle->sizeHint().height()!=-1) - qtarch_labelPagestyle->setMinimumHeight(qtarch_labelPagestyle->sizeHint().height()); - if (qtarch_labelPagestyle->sizeHint().width()!=-1) - qtarch_labelPagestyle->setMaximumWidth(qtarch_labelPagestyle->sizeHint().width()); - if (qtarch_labelPagestyle->sizeHint().height()!=-1) - qtarch_labelPagestyle->setMaximumHeight(qtarch_labelPagestyle->sizeHint().height()); - if (qtarch_labelFont->sizeHint().width()!=-1) - qtarch_labelFont->setMinimumWidth(qtarch_labelFont->sizeHint().width()); - if (qtarch_labelFont->sizeHint().height()!=-1) - qtarch_labelFont->setMinimumHeight(qtarch_labelFont->sizeHint().height()); - if (qtarch_labelFont->sizeHint().width()!=-1) - qtarch_labelFont->setMaximumWidth(qtarch_labelFont->sizeHint().width()); - if (qtarch_labelFont->sizeHint().height()!=-1) - qtarch_labelFont->setMaximumHeight(qtarch_labelFont->sizeHint().height()); - if (qtarch_labelFontSize->sizeHint().width()!=-1) - qtarch_labelFontSize->setMinimumWidth(qtarch_labelFontSize->sizeHint().width()); - if (qtarch_labelFontSize->sizeHint().height()!=-1) - qtarch_labelFontSize->setMinimumHeight(qtarch_labelFontSize->sizeHint().height()); - if (qtarch_labelFontSize->sizeHint().width()!=-1) - qtarch_labelFontSize->setMaximumWidth(qtarch_labelFontSize->sizeHint().width()); - if (qtarch_labelFontSize->sizeHint().height()!=-1) - qtarch_labelFontSize->setMaximumHeight(qtarch_labelFontSize->sizeHint().height()); if (pagestyle->sizeHint().width()!=-1) pagestyle->setMinimumWidth(pagestyle->sizeHint().width()); if (pagestyle->sizeHint().height()!=-1) @@ -381,14 +465,6 @@ DocSettingsDialogData::DocSettingsDialogData columns->setMaximumWidth(columns->sizeHint().width()); if (columns->sizeHint().height()!=-1) columns->setMaximumHeight(columns->sizeHint().height()); - if (separation->sizeHint().width()!=-1) - separation->setMinimumWidth(separation->sizeHint().width()); - if (separation->sizeHint().height()!=-1) - separation->setMinimumHeight(separation->sizeHint().height()); - if (separation->sizeHint().width()!=-1) - separation->setMaximumWidth(separation->sizeHint().width()); - if (separation->sizeHint().height()!=-1) - separation->setMaximumHeight(separation->sizeHint().height()); if (qtarch_labelSpacing->sizeHint().width()!=-1) qtarch_labelSpacing->setMinimumWidth(qtarch_labelSpacing->sizeHint().width()); if (qtarch_labelSpacing->sizeHint().height()!=-1) @@ -397,32 +473,6 @@ DocSettingsDialogData::DocSettingsDialogData qtarch_labelSpacing->setMaximumWidth(qtarch_labelSpacing->sizeHint().width()); if (qtarch_labelSpacing->sizeHint().height()!=-1) qtarch_labelSpacing->setMaximumHeight(qtarch_labelSpacing->sizeHint().height()); - if (linespacing->sizeHint().width()!=-1) - linespacing->setMinimumWidth(linespacing->sizeHint().width()); - if (linespacing->sizeHint().height()!=-1) - linespacing->setMinimumHeight(linespacing->sizeHint().height()); - if (linespacing->sizeHint().height()!=-1) - linespacing->setMaximumHeight(linespacing->sizeHint().height()); - if (qtarch_labelSkip->sizeHint().width()!=-1) - qtarch_labelSkip->setMinimumWidth(qtarch_labelSkip->sizeHint().width()); - if (qtarch_labelSkip->sizeHint().height()!=-1) - qtarch_labelSkip->setMinimumHeight(qtarch_labelSkip->sizeHint().height()); - if (qtarch_labelSkip->sizeHint().width()!=-1) - qtarch_labelSkip->setMaximumWidth(qtarch_labelSkip->sizeHint().width()); - if (qtarch_labelSkip->sizeHint().height()!=-1) - qtarch_labelSkip->setMaximumHeight(qtarch_labelSkip->sizeHint().height()); - if (skipspacing->sizeHint().width()!=-1) - skipspacing->setMinimumWidth(skipspacing->sizeHint().width()); - if (skipspacing->sizeHint().height()!=-1) - skipspacing->setMinimumHeight(skipspacing->sizeHint().height()); - if (skipspacing->sizeHint().height()!=-1) - skipspacing->setMaximumHeight(skipspacing->sizeHint().height()); - if (extraoptions->sizeHint().width()!=-1) - extraoptions->setMinimumWidth(extraoptions->sizeHint().width()); - if (extraoptions->sizeHint().height()!=-1) - extraoptions->setMinimumHeight(extraoptions->sizeHint().height()); - if (extraoptions->sizeHint().height()!=-1) - extraoptions->setMaximumHeight(extraoptions->sizeHint().height()); if (qtarch_labelExtraoptions->sizeHint().width()!=-1) qtarch_labelExtraoptions->setMinimumWidth(qtarch_labelExtraoptions->sizeHint().width()); if (qtarch_labelExtraoptions->sizeHint().height()!=-1) @@ -431,16 +481,92 @@ DocSettingsDialogData::DocSettingsDialogData qtarch_labelExtraoptions->setMaximumWidth(qtarch_labelExtraoptions->sizeHint().width()); if (qtarch_labelExtraoptions->sizeHint().height()!=-1) qtarch_labelExtraoptions->setMaximumHeight(qtarch_labelExtraoptions->sizeHint().height()); + if (qtarch_labelSkip->sizeHint().width()!=-1) + qtarch_labelSkip->setMinimumWidth(qtarch_labelSkip->sizeHint().width()); + if (qtarch_labelSkip->sizeHint().height()!=-1) + qtarch_labelSkip->setMinimumHeight(qtarch_labelSkip->sizeHint().height()); + if (qtarch_labelSkip->sizeHint().width()!=-1) + qtarch_labelSkip->setMaximumWidth(qtarch_labelSkip->sizeHint().width()); + if (qtarch_labelSkip->sizeHint().height()!=-1) + qtarch_labelSkip->setMaximumHeight(qtarch_labelSkip->sizeHint().height()); + if (qtarch_labelparasize->sizeHint().width()!=-1) + qtarch_labelparasize->setMinimumWidth(qtarch_labelparasize->sizeHint().width()); + if (qtarch_labelparasize->sizeHint().height()!=-1) + qtarch_labelparasize->setMinimumHeight(qtarch_labelparasize->sizeHint().height()); + if (qtarch_labelparasize->sizeHint().width()!=-1) + qtarch_labelparasize->setMaximumWidth(qtarch_labelparasize->sizeHint().width()); + if (qtarch_labelparasize->sizeHint().height()!=-1) + qtarch_labelparasize->setMaximumHeight(qtarch_labelparasize->sizeHint().height()); + if (qtarch_paralabelShrink->sizeHint().width()!=-1) + qtarch_paralabelShrink->setMinimumWidth(qtarch_paralabelShrink->sizeHint().width()); + if (qtarch_paralabelShrink->sizeHint().height()!=-1) + qtarch_paralabelShrink->setMinimumHeight(qtarch_paralabelShrink->sizeHint().height()); + if (qtarch_paralabelShrink->sizeHint().width()!=-1) + qtarch_paralabelShrink->setMaximumWidth(qtarch_paralabelShrink->sizeHint().width()); + if (qtarch_paralabelShrink->sizeHint().height()!=-1) + qtarch_paralabelShrink->setMaximumHeight(qtarch_paralabelShrink->sizeHint().height()); + if (qtarch_paralabelStretch->sizeHint().width()!=-1) + qtarch_paralabelStretch->setMinimumWidth(qtarch_paralabelStretch->sizeHint().width()); + if (qtarch_paralabelStretch->sizeHint().height()!=-1) + qtarch_paralabelStretch->setMinimumHeight(qtarch_paralabelStretch->sizeHint().height()); + if (qtarch_paralabelStretch->sizeHint().width()!=-1) + qtarch_paralabelStretch->setMaximumWidth(qtarch_paralabelStretch->sizeHint().width()); + if (qtarch_paralabelStretch->sizeHint().height()!=-1) + qtarch_paralabelStretch->setMaximumHeight(qtarch_paralabelStretch->sizeHint().height()); + if (paraspacing->sizeHint().width()!=-1) + paraspacing->setMinimumWidth(paraspacing->sizeHint().width()); + if (paraspacing->sizeHint().height()!=-1) + paraspacing->setMinimumHeight(paraspacing->sizeHint().height()); + if (paraspacing->sizeHint().height()!=-1) + paraspacing->setMaximumHeight(paraspacing->sizeHint().height()); + if (paraspacingValue->sizeHint().width()!=-1) + paraspacingValue->setMinimumWidth(paraspacingValue->sizeHint().width()); + if (paraspacingValue->sizeHint().height()!=-1) + paraspacingValue->setMinimumHeight(paraspacingValue->sizeHint().height()); + if (paraspacingValue->sizeHint().height()!=-1) + paraspacingValue->setMaximumHeight(paraspacingValue->sizeHint().height()); + if (paraspacingStretch->sizeHint().width()!=-1) + paraspacingStretch->setMinimumWidth(paraspacingStretch->sizeHint().width()); + if (paraspacingStretch->sizeHint().height()!=-1) + paraspacingStretch->setMinimumHeight(paraspacingStretch->sizeHint().height()); + if (paraspacingStretch->sizeHint().height()!=-1) + paraspacingStretch->setMaximumHeight(paraspacingStretch->sizeHint().height()); + if (paraspacingShrink->sizeHint().width()!=-1) + paraspacingShrink->setMinimumWidth(paraspacingShrink->sizeHint().width()); + if (paraspacingShrink->sizeHint().height()!=-1) + paraspacingShrink->setMinimumHeight(paraspacingShrink->sizeHint().height()); + if (paraspacingShrink->sizeHint().height()!=-1) + paraspacingShrink->setMaximumHeight(paraspacingShrink->sizeHint().height()); + if (linespacing->sizeHint().width()!=-1) + linespacing->setMinimumWidth(linespacing->sizeHint().width()); + if (linespacing->sizeHint().height()!=-1) + linespacing->setMinimumHeight(linespacing->sizeHint().height()); + if (linespacing->sizeHint().height()!=-1) + linespacing->setMaximumHeight(linespacing->sizeHint().height()); if (linespacingVal->sizeHint().width()!=-1) linespacingVal->setMinimumWidth(linespacingVal->sizeHint().width()); if (linespacingVal->sizeHint().height()!=-1) linespacingVal->setMinimumHeight(linespacingVal->sizeHint().height()); if (linespacingVal->sizeHint().height()!=-1) linespacingVal->setMaximumHeight(linespacingVal->sizeHint().height()); + if (extraoptions->sizeHint().width()!=-1) + extraoptions->setMinimumWidth(extraoptions->sizeHint().width()); + if (extraoptions->sizeHint().height()!=-1) + extraoptions->setMinimumHeight(extraoptions->sizeHint().height()); + if (extraoptions->sizeHint().height()!=-1) + extraoptions->setMaximumHeight(extraoptions->sizeHint().height()); + if (addspace->sizeHint().width()!=-1) + addspace->setMinimumWidth(addspace->sizeHint().width()); + if (addspace->sizeHint().height()!=-1) + addspace->setMinimumHeight(addspace->sizeHint().height()); + if (addspace->sizeHint().width()!=-1) + addspace->setMaximumWidth(addspace->sizeHint().width()); + if (addspace->sizeHint().height()!=-1) + addspace->setMaximumHeight(addspace->sizeHint().height()); QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); qtarch_layout_1->addStrut( 0 ); QGridLayout* qtarch_layout_1_1 = new QGridLayout( 4, 5, 5, NULL ); - qtarch_layout_1->addLayout( qtarch_layout_1_1, 1 ); + qtarch_layout_1->addLayout( qtarch_layout_1_1, 2 ); qtarch_layout_1_1->addColSpacing( 0, 5 ); qtarch_layout_1_1->setColStretch( 0, 1 ); qtarch_layout_1_1->addColSpacing( 1, 5 ); @@ -475,36 +601,53 @@ DocSettingsDialogData::DocSettingsDialogData qtarch_layout_1_2->addStretch( 1 ); qtarch_layout_1_2->addWidget( columns, 1, 33 ); qtarch_layout_1_2->addStretch( 1 ); - QBoxLayout* qtarch_layout_1_3 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); - qtarch_layout_1->addLayout( qtarch_layout_1_3, 1 ); + qtarch_layout_1->addWidget( qtarch_paraspacingbox, 3, 33 ); + QBoxLayout* qtarch_layout_1_3 = new QBoxLayout( qtarch_paraspacingbox, QBoxLayout::TopToBottom, 5, 17, NULL ); qtarch_layout_1_3->addStrut( 0 ); - qtarch_layout_1_3->addStretch( 1 ); - qtarch_layout_1_3->addWidget( separation, 1, 33 ); - qtarch_layout_1_3->addStretch( 1 ); - QGridLayout* qtarch_layout_1_4 = new QGridLayout( 2, 3, 5, NULL ); + qtarch_layout_1_3->addSpacing( 15 ); + QBoxLayout* qtarch_layout_1_3_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); + qtarch_layout_1_3->addLayout( qtarch_layout_1_3_2, 1 ); + qtarch_layout_1_3_2->addStrut( 0 ); + qtarch_layout_1_3_2->addStretch( 1 ); + QBoxLayout* qtarch_layout_1_3_3 = new QBoxLayout( QBoxLayout::LeftToRight, 17, NULL ); + qtarch_layout_1_3->addLayout( qtarch_layout_1_3_3, 1 ); + qtarch_layout_1_3_3->addStrut( 0 ); + qtarch_layout_1_3_3->addWidget( qtarch_labelSkip, 1, 36 ); + qtarch_layout_1_3_3->addStretch( 1 ); + qtarch_layout_1_3_3->addWidget( paraspacing, 1, 36 ); + qtarch_layout_1_3_3->addStretch( 1 ); + QGridLayout* qtarch_layout_1_3_4 = new QGridLayout( 3, 3, 5, NULL ); + qtarch_layout_1_3->addLayout( qtarch_layout_1_3_4, 3 ); + qtarch_layout_1_3_4->addColSpacing( 0, 5 ); + qtarch_layout_1_3_4->setColStretch( 0, 1 ); + qtarch_layout_1_3_4->addColSpacing( 1, 5 ); + qtarch_layout_1_3_4->setColStretch( 1, 1 ); + qtarch_layout_1_3_4->addColSpacing( 2, 5 ); + qtarch_layout_1_3_4->setColStretch( 2, 1 ); + qtarch_layout_1_3_4->addRowSpacing( 0, 0 ); + qtarch_layout_1_3_4->setRowStretch( 0, 1 ); + qtarch_layout_1_3_4->addWidget( qtarch_labelparasize, 0, 0, 33 ); + qtarch_layout_1_3_4->addWidget( paraspacingValue, 0, 1, 33 ); + qtarch_layout_1_3_4->addRowSpacing( 1, 0 ); + qtarch_layout_1_3_4->setRowStretch( 1, 1 ); + qtarch_layout_1_3_4->addWidget( qtarch_paralabelStretch, 1, 0, 33 ); + qtarch_layout_1_3_4->addWidget( paraspacingStretch, 1, 1, 33 ); + qtarch_layout_1_3_4->addRowSpacing( 2, 0 ); + qtarch_layout_1_3_4->setRowStretch( 2, 1 ); + qtarch_layout_1_3_4->addWidget( qtarch_paralabelShrink, 2, 0, 33 ); + qtarch_layout_1_3_4->addWidget( paraspacingShrink, 2, 1, 33 ); + QBoxLayout* qtarch_layout_1_4 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); qtarch_layout_1->addLayout( qtarch_layout_1_4, 1 ); - qtarch_layout_1_4->addColSpacing( 0, 5 ); - qtarch_layout_1_4->setColStretch( 0, 2 ); - qtarch_layout_1_4->addColSpacing( 1, 5 ); - qtarch_layout_1_4->setColStretch( 1, 3 ); - qtarch_layout_1_4->addColSpacing( 2, 5 ); - qtarch_layout_1_4->setColStretch( 2, 1 ); - qtarch_layout_1_4->addRowSpacing( 0, 0 ); - qtarch_layout_1_4->setRowStretch( 0, 1 ); - qtarch_layout_1_4->addWidget( qtarch_labelSpacing, 0, 0, 33 ); - qtarch_layout_1_4->addWidget( linespacing, 0, 1, 33 ); - qtarch_layout_1_4->addWidget( linespacingVal, 0, 2, 33 ); - qtarch_layout_1_4->addRowSpacing( 1, 0 ); - qtarch_layout_1_4->setRowStretch( 1, 1 ); - qtarch_layout_1_4->addWidget( qtarch_labelSkip, 1, 0, 33 ); - qtarch_layout_1_4->addWidget( skipspacing, 1, 1, 33 ); - qtarch_layout_1_4->addWidget( qtarch_FIXME, 1, 2, 33 ); + qtarch_layout_1_4->addStrut( 0 ); + qtarch_layout_1_4->addWidget( qtarch_labelSpacing, 1, 36 ); + qtarch_layout_1_4->addWidget( linespacing, 1, 36 ); + qtarch_layout_1_4->addWidget( linespacingVal, 1, 36 ); QBoxLayout* qtarch_layout_1_5 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); qtarch_layout_1->addLayout( qtarch_layout_1_5, 1 ); qtarch_layout_1_5->addStrut( 0 ); qtarch_layout_1_5->addWidget( qtarch_labelExtraoptions, 1, 36 ); qtarch_layout_1_5->addWidget( extraoptions, 1, 33 ); - setGeometry( 0,0, 455,505 ); + setGeometry( 0,0, 550,515 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); } @@ -516,3 +659,9 @@ DocSettingsDialogData::~DocSettingsDialogData() void DocSettingsDialogData::classChanged(const char*) { } +void DocSettingsDialogData::paraspacingChanged(const char*) +{ +} +void DocSettingsDialogData::addspaceChanged(bool) +{ +} diff --git a/src/frontends/kde/dlg/docsettingsdlgdata.h b/src/frontends/kde/dlg/docsettingsdlgdata.h index b591b9b83f..4e5d0c0c53 100644 --- a/src/frontends/kde/dlg/docsettingsdlgdata.h +++ b/src/frontends/kde/dlg/docsettingsdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: docsettingsdlgdata.h - Last generated: Wed Jan 24 06:43:24 2001 + Last generated: Sun Feb 11 00:57:35 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -14,6 +14,7 @@ #define DocSettingsDialogData_included #include +#include "lengthentry.h" #include #include #include @@ -38,7 +39,9 @@ public slots: protected slots: + virtual void paraspacingChanged(const char*); virtual void classChanged(const char*); + virtual void addspaceChanged(bool); public: QComboBox* docclass; @@ -47,11 +50,14 @@ public: QComboBox* fontsize; QCheckBox* sides; QCheckBox* columns; - QCheckBox* separation; + QComboBox* paraspacing; + LengthEntry* paraspacingValue; + LengthEntry* paraspacingStretch; + LengthEntry* paraspacingShrink; QComboBox* linespacing; - QComboBox* skipspacing; - QLineEdit* extraoptions; KRestrictedLine* linespacingVal; + QLineEdit* extraoptions; + QCheckBox* addspace; }; diff --git a/src/frontends/kde/dlg/emptytable.C b/src/frontends/kde/dlg/emptytable.C index 53ef5225b8..cb29450cd4 100644 --- a/src/frontends/kde/dlg/emptytable.C +++ b/src/frontends/kde/dlg/emptytable.C @@ -24,6 +24,7 @@ const unsigned int cellsize = 20; EmptyTable::EmptyTable(QWidget * parent, const char * name) : QTableView(parent,name) { + setBackgroundMode(NoBackground); setNumCols(5); setNumRows(5); setCellWidth(cellsize); @@ -72,9 +73,9 @@ void EmptyTable::mouseMoveEvent(QMouseEvent *ev) int x = ev->pos().x(); int y = ev->pos().y(); - if (x > 0) + if (x > 0) setNumberColumns(x / cellsize + leftCell()); - if (y > 0) + if (y > 0) setNumberRows(y / cellsize + topCell()); } diff --git a/src/frontends/kde/dlg/indexdlgdata.C b/src/frontends/kde/dlg/indexdlgdata.C index 988820f1a3..590d1d1cb0 100644 --- a/src/frontends/kde/dlg/indexdlgdata.C +++ b/src/frontends/kde/dlg/indexdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: indexdlgdata.C - Last generated: Wed Jan 24 06:43:28 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -16,7 +16,7 @@ #include #include "indexdlgdata.h" -#define Inherited QWidget +#define Inherited QDialog IndexDialogData::IndexDialogData @@ -25,7 +25,7 @@ IndexDialogData::IndexDialogData const char* name ) : - Inherited( parent, name, 53248 ) + Inherited( parent, name, TRUE, 53248 ) { labelindex = new QLabel( this, "Label_1" ); labelindex->setGeometry( 5, 15, 60, 25 ); diff --git a/src/frontends/kde/dlg/indexdlgdata.h b/src/frontends/kde/dlg/indexdlgdata.h index 07b74f4f1c..7acd1ac60c 100644 --- a/src/frontends/kde/dlg/indexdlgdata.h +++ b/src/frontends/kde/dlg/indexdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: indexdlgdata.h - Last generated: Wed Jan 24 06:43:28 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -13,12 +13,12 @@ #ifndef IndexDialogData_included #define IndexDialogData_included -#include +#include #include #include #include -class IndexDialogData : public QWidget +class IndexDialogData : public QDialog { Q_OBJECT diff --git a/src/frontends/kde/dlg/logdlgdata.C b/src/frontends/kde/dlg/logdlgdata.C new file mode 100644 index 0000000000..6e684fe9d7 --- /dev/null +++ b/src/frontends/kde/dlg/logdlgdata.C @@ -0,0 +1,129 @@ +/********************************************************************** + + --- Qt Architect 1.4-6 generated file --- + + File: logdlgdata.C + Last generated: Mon Feb 12 01:41:52 2001 + + DO NOT EDIT!!! This file will be automatically + regenerated by qtarch. All changes will be lost. + + *********************************************************************/ + +#include + +#include +#include +#include "logdlgdata.h" + +#define Inherited QDialog + + +LogDialogData::LogDialogData +( + QWidget* parent, + const char* name +) + : + Inherited( parent, name, FALSE, 0 ) +{ + close = new QPushButton( this, "close" ); + close->setGeometry( 241, 269, 77, 26 ); + close->setMinimumSize( 0, 0 ); + close->setMaximumSize( 32767, 32767 ); + connect( close, SIGNAL(clicked()), SLOT(closePressed()) ); + close->setFocusPolicy( QWidget::TabFocus ); + close->setBackgroundMode( QWidget::PaletteBackground ); + close->setFontPropagation( QWidget::NoChildren ); + close->setPalettePropagation( QWidget::NoChildren ); + close->setText( _("&Close") ); + close->setAutoRepeat( false ); + close->setAutoResize( false ); + close->setToggleButton( false ); + close->setDefault( true ); + close->setAutoDefault( false ); + close->setIsMenuButton( false ); + + updateb = new QPushButton( this, "updateb" ); + updateb->setGeometry( 82, 269, 77, 26 ); + updateb->setMinimumSize( 0, 0 ); + updateb->setMaximumSize( 32767, 32767 ); + connect( updateb, SIGNAL(clicked()), SLOT(updatePressed()) ); + updateb->setFocusPolicy( QWidget::TabFocus ); + updateb->setBackgroundMode( QWidget::PaletteBackground ); + updateb->setFontPropagation( QWidget::NoChildren ); + updateb->setPalettePropagation( QWidget::NoChildren ); + updateb->setText( _("&Update") ); + updateb->setAutoRepeat( false ); + updateb->setAutoResize( false ); + updateb->setToggleButton( false ); + updateb->setDefault( false ); + updateb->setAutoDefault( false ); + updateb->setIsMenuButton( false ); + + viewer = new QMultiLineEdit( this, "viewer" ); + viewer->setGeometry( 5, 5, 390, 259 ); + viewer->setMinimumSize( 0, 0 ); + viewer->setMaximumSize( 32767, 32767 ); + viewer->setFocusPolicy( QWidget::StrongFocus ); + viewer->setBackgroundMode( QWidget::PaletteBase ); + viewer->setFontPropagation( QWidget::SameFont ); + viewer->setPalettePropagation( QWidget::SameFont ); + viewer->setFrameStyle( 51 ); + viewer->setLineWidth( 2 ); + viewer->setMidLineWidth( 0 ); + viewer->QFrame::setMargin( 0 ); + viewer->insertLine( "" ); + viewer->setReadOnly( true ); + viewer->setOverwriteMode( false ); + viewer->setAutoUpdate( true ); + + if (close->sizeHint().width()!=-1) + close->setMinimumWidth(close->sizeHint().width()); + if (close->sizeHint().height()!=-1) + close->setMinimumHeight(close->sizeHint().height()); + if (close->sizeHint().width()!=-1) + close->setMaximumWidth(close->sizeHint().width()); + if (close->sizeHint().height()!=-1) + close->setMaximumHeight(close->sizeHint().height()); + if (updateb->sizeHint().width()!=-1) + updateb->setMinimumWidth(updateb->sizeHint().width()); + if (updateb->sizeHint().height()!=-1) + updateb->setMinimumHeight(updateb->sizeHint().height()); + if (updateb->sizeHint().width()!=-1) + updateb->setMaximumWidth(updateb->sizeHint().width()); + if (updateb->sizeHint().height()!=-1) + updateb->setMaximumHeight(updateb->sizeHint().height()); + if (viewer->sizeHint().width()!=-1) + viewer->setMinimumWidth(viewer->sizeHint().width()); + if (viewer->sizeHint().height()!=-1) + viewer->setMinimumHeight(viewer->sizeHint().height()); + QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); + qtarch_layout_1->addStrut( 0 ); + QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); + qtarch_layout_1->addLayout( qtarch_layout_1_1, 10 ); + qtarch_layout_1_1->addStrut( 0 ); + qtarch_layout_1_1->addWidget( viewer, 1, 36 ); + QBoxLayout* qtarch_layout_1_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); + qtarch_layout_1->addLayout( qtarch_layout_1_2, 1 ); + qtarch_layout_1_2->addStrut( 0 ); + qtarch_layout_1_2->addStretch( 1 ); + qtarch_layout_1_2->addWidget( updateb, 1, 36 ); + qtarch_layout_1_2->addStretch( 1 ); + qtarch_layout_1_2->addWidget( close, 1, 36 ); + qtarch_layout_1_2->addStretch( 1 ); + resize( 400,300 ); + setMinimumSize( 0, 0 ); + setMaximumSize( 32767, 32767 ); +} + + +LogDialogData::~LogDialogData() +{ +} +void LogDialogData::closePressed() +{ +} +void LogDialogData::updatePressed() +{ +} diff --git a/src/frontends/kde/dlg/logdlgdata.h b/src/frontends/kde/dlg/logdlgdata.h new file mode 100644 index 0000000000..f582b6d62b --- /dev/null +++ b/src/frontends/kde/dlg/logdlgdata.h @@ -0,0 +1,49 @@ +/********************************************************************** + + --- Qt Architect 1.4-6 generated file --- + + File: logdlgdata.h + Last generated: Mon Feb 12 01:41:52 2001 + + DO NOT EDIT!!! This file will be automatically + regenerated by qtarch. All changes will be lost. + + *********************************************************************/ + +#ifndef LogDialogData_included +#define LogDialogData_included + +#include +#include +#include + +class LogDialogData : public QDialog +{ + Q_OBJECT + +public: + + LogDialogData + ( + QWidget* parent = NULL, + const char* name = NULL + ); + + virtual ~LogDialogData(); + +public slots: + + +protected slots: + + virtual void updatePressed(); + virtual void closePressed(); + +protected: + QPushButton* close; + QPushButton* updateb; + QMultiLineEdit* viewer; + +}; + +#endif // LogDialogData_included diff --git a/src/frontends/kde/dlg/moc/Makefile.am b/src/frontends/kde/dlg/moc/Makefile.am index 736b032456..afc8e28bdb 100644 --- a/src/frontends/kde/dlg/moc/Makefile.am +++ b/src/frontends/kde/dlg/moc/Makefile.am @@ -13,6 +13,7 @@ libkdedlgmoc_la_SOURCES = copyrightdlgdata_moc.C \ docextradlgdata_moc.C \ docbulletsdlgdata_moc.C \ indexdlgdata_moc.C \ + logdlgdata_moc.C \ paradlgdata_moc.C \ parageneraldlgdata_moc.C \ paraabovedlgdata_moc.C \ @@ -48,6 +49,8 @@ emptytable_moc.C: ../emptytable.h $(MOC) $< -o $@ indexdlgdata_moc.C: ../indexdlgdata.h $(MOC) $< -o $@ +logdlgdata_moc.C: ../logdlgdata.h + $(MOC) $< -o $@ paradlgdata_moc.C: ../paradlgdata.h $(MOC) $< -o $@ parageneraldlgdata_moc.C: ../parageneraldlgdata.h diff --git a/src/frontends/kde/dlg/paraabovedlgdata.C b/src/frontends/kde/dlg/paraabovedlgdata.C index dd11fe5ece..09a89d02d0 100644 --- a/src/frontends/kde/dlg/paraabovedlgdata.C +++ b/src/frontends/kde/dlg/paraabovedlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paraabovedlgdata.C - Last generated: Wed Jan 24 06:43:38 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -98,7 +98,7 @@ ParaAboveDialogData::ParaAboveDialogData qtarch_ValueLabel->setLineWidth( 1 ); qtarch_ValueLabel->setMidLineWidth( 0 ); qtarch_ValueLabel->QFrame::setMargin( 0 ); - qtarch_ValueLabel->setText( _("Value") ); + qtarch_ValueLabel->setText( _("Size") ); qtarch_ValueLabel->setAlignment( 289 ); qtarch_ValueLabel->setMargin( -1 ); @@ -115,7 +115,7 @@ ParaAboveDialogData::ParaAboveDialogData qtarch_Label_14->setLineWidth( 1 ); qtarch_Label_14->setMidLineWidth( 0 ); qtarch_Label_14->QFrame::setMargin( 0 ); - qtarch_Label_14->setText( _("Plus") ); + qtarch_Label_14->setText( _("Stretch") ); qtarch_Label_14->setAlignment( 289 ); qtarch_Label_14->setMargin( -1 ); @@ -132,7 +132,7 @@ ParaAboveDialogData::ParaAboveDialogData qtarch_aboveminuslabel->setLineWidth( 1 ); qtarch_aboveminuslabel->setMidLineWidth( 0 ); qtarch_aboveminuslabel->QFrame::setMargin( 0 ); - qtarch_aboveminuslabel->setText( _("Minus") ); + qtarch_aboveminuslabel->setText( _("Shrink") ); qtarch_aboveminuslabel->setAlignment( 289 ); qtarch_aboveminuslabel->setMargin( -1 ); diff --git a/src/frontends/kde/dlg/paraabovedlgdata.h b/src/frontends/kde/dlg/paraabovedlgdata.h index 012f2b77cd..bb79b8228d 100644 --- a/src/frontends/kde/dlg/paraabovedlgdata.h +++ b/src/frontends/kde/dlg/paraabovedlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paraabovedlgdata.h - Last generated: Wed Jan 24 06:43:38 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/parabelowdlgdata.C b/src/frontends/kde/dlg/parabelowdlgdata.C index 5ee57b0ff4..68bd6968d2 100644 --- a/src/frontends/kde/dlg/parabelowdlgdata.C +++ b/src/frontends/kde/dlg/parabelowdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: parabelowdlgdata.C - Last generated: Wed Jan 24 07:26:08 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -98,7 +98,7 @@ ParaBelowDialogData::ParaBelowDialogData qtarch_ValueLabel->setLineWidth( 1 ); qtarch_ValueLabel->setMidLineWidth( 0 ); qtarch_ValueLabel->QFrame::setMargin( 0 ); - qtarch_ValueLabel->setText( _("Value") ); + qtarch_ValueLabel->setText( _("Size") ); qtarch_ValueLabel->setAlignment( 289 ); qtarch_ValueLabel->setMargin( -1 ); @@ -115,7 +115,7 @@ ParaBelowDialogData::ParaBelowDialogData qtarch_Label_14->setLineWidth( 1 ); qtarch_Label_14->setMidLineWidth( 0 ); qtarch_Label_14->QFrame::setMargin( 0 ); - qtarch_Label_14->setText( _("Plus") ); + qtarch_Label_14->setText( _("Stretch") ); qtarch_Label_14->setAlignment( 289 ); qtarch_Label_14->setMargin( -1 ); @@ -132,7 +132,7 @@ ParaBelowDialogData::ParaBelowDialogData qtarch_belowminuslabel->setLineWidth( 1 ); qtarch_belowminuslabel->setMidLineWidth( 0 ); qtarch_belowminuslabel->QFrame::setMargin( 0 ); - qtarch_belowminuslabel->setText( _("Minus") ); + qtarch_belowminuslabel->setText( _("Shrink") ); qtarch_belowminuslabel->setAlignment( 289 ); qtarch_belowminuslabel->setMargin( -1 ); diff --git a/src/frontends/kde/dlg/parabelowdlgdata.h b/src/frontends/kde/dlg/parabelowdlgdata.h index 27504472c8..056e12232c 100644 --- a/src/frontends/kde/dlg/parabelowdlgdata.h +++ b/src/frontends/kde/dlg/parabelowdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: parabelowdlgdata.h - Last generated: Wed Jan 24 07:26:08 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. diff --git a/src/frontends/kde/dlg/paradlgdata.C b/src/frontends/kde/dlg/paradlgdata.C index 73f15d81a0..28d030dbb5 100644 --- a/src/frontends/kde/dlg/paradlgdata.C +++ b/src/frontends/kde/dlg/paradlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paradlgdata.C - Last generated: Wed Jan 24 06:43:33 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -16,7 +16,7 @@ #include #include "paradlgdata.h" -#define Inherited QWidget +#define Inherited QDialog ParaDialogData::ParaDialogData @@ -25,7 +25,7 @@ ParaDialogData::ParaDialogData const char* name ) : - Inherited( parent, name, 0 ) + Inherited( parent, name, TRUE, 0 ) { ok = new QPushButton( this, "OK" ); ok->setGeometry( 73, 555, 69, 55 ); @@ -44,15 +44,6 @@ ParaDialogData::ParaDialogData ok->setAutoDefault( false ); ok->setIsMenuButton( false ); - tabstack = new TabStack( this, "User_1" ); - tabstack->setGeometry( 5, 5, 630, 545 ); - tabstack->setMinimumSize( 0, 0 ); - tabstack->setMaximumSize( 32767, 32767 ); - tabstack->setFocusPolicy( QWidget::NoFocus ); - tabstack->setBackgroundMode( QWidget::PaletteBackground ); - tabstack->setFontPropagation( QWidget::NoChildren ); - tabstack->setPalettePropagation( QWidget::NoChildren ); - apply = new QPushButton( this, "apply" ); apply->setGeometry( 215, 555, 68, 55 ); apply->setMinimumSize( 0, 0 ); @@ -104,6 +95,15 @@ ParaDialogData::ParaDialogData cancel->setAutoDefault( false ); cancel->setIsMenuButton( false ); + tabstack = new TabStack( this, "User_1" ); + tabstack->setGeometry( 5, 5, 630, 545 ); + tabstack->setMinimumSize( 0, 0 ); + tabstack->setMaximumSize( 32767, 32767 ); + tabstack->setFocusPolicy( QWidget::NoFocus ); + tabstack->setBackgroundMode( QWidget::PaletteBackground ); + tabstack->setFontPropagation( QWidget::NoChildren ); + tabstack->setPalettePropagation( QWidget::NoChildren ); + if (ok->sizeHint().width()!=-1) ok->setMinimumWidth(ok->sizeHint().width()); if (ok->sizeHint().height()!=-1) @@ -112,10 +112,6 @@ ParaDialogData::ParaDialogData ok->setMaximumWidth(ok->sizeHint().width()); if (ok->sizeHint().height()!=-1) ok->setMaximumHeight(ok->sizeHint().height()); - if (tabstack->sizeHint().width()!=-1) - tabstack->setMinimumWidth(tabstack->sizeHint().width()); - if (tabstack->sizeHint().height()!=-1) - tabstack->setMinimumHeight(tabstack->sizeHint().height()); if (apply->sizeHint().width()!=-1) apply->setMinimumWidth(apply->sizeHint().width()); if (apply->sizeHint().height()!=-1) @@ -140,6 +136,10 @@ ParaDialogData::ParaDialogData cancel->setMaximumWidth(cancel->sizeHint().width()); if (cancel->sizeHint().height()!=-1) cancel->setMaximumHeight(cancel->sizeHint().height()); + if (tabstack->sizeHint().width()!=-1) + tabstack->setMinimumWidth(tabstack->sizeHint().width()); + if (tabstack->sizeHint().height()!=-1) + tabstack->setMinimumHeight(tabstack->sizeHint().height()); QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); qtarch_layout_1->addStrut( 0 ); QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); diff --git a/src/frontends/kde/dlg/paradlgdata.h b/src/frontends/kde/dlg/paradlgdata.h index 7c56072ba5..6d75b6fca7 100644 --- a/src/frontends/kde/dlg/paradlgdata.h +++ b/src/frontends/kde/dlg/paradlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paradlgdata.h - Last generated: Wed Jan 24 06:43:33 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -13,11 +13,11 @@ #ifndef ParaDialogData_included #define ParaDialogData_included -#include +#include #include "tabstack.h" #include -class ParaDialogData : public QWidget +class ParaDialogData : public QDialog { Q_OBJECT @@ -43,10 +43,10 @@ protected slots: protected: QPushButton* ok; - TabStack* tabstack; QPushButton* apply; QPushButton* restore; QPushButton* cancel; + TabStack* tabstack; }; diff --git a/src/frontends/kde/dlg/paraextradlgdata.C b/src/frontends/kde/dlg/paraextradlgdata.C index 1305f2cb1a..023278608c 100644 --- a/src/frontends/kde/dlg/paraextradlgdata.C +++ b/src/frontends/kde/dlg/paraextradlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paraextradlgdata.C - Last generated: Wed Jan 24 06:43:26 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -28,22 +28,6 @@ ParaExtraDialogData::ParaExtraDialogData : Inherited( parent, name, 0 ) { - specialalignment = new QButtonGroup( this, "specialalignment" ); - specialalignment->setGeometry( 5, 124, 265, 331 ); - specialalignment->setMinimumSize( 0, 0 ); - specialalignment->setMaximumSize( 32767, 32767 ); - specialalignment->setFocusPolicy( QWidget::NoFocus ); - specialalignment->setBackgroundMode( QWidget::PaletteBackground ); - specialalignment->setFontPropagation( QWidget::NoChildren ); - specialalignment->setPalettePropagation( QWidget::NoChildren ); - specialalignment->setFrameStyle( 49 ); - specialalignment->setLineWidth( 1 ); - specialalignment->setMidLineWidth( 0 ); - specialalignment->QFrame::setMargin( 0 ); - specialalignment->setTitle( _("Alignment") ); - specialalignment->setAlignment( 1 ); - specialalignment->setExclusive( true ); - type = new QComboBox( FALSE, this, "type" ); type->setGeometry( 5, 65, 265, 54 ); type->setMinimumSize( 0, 0 ); @@ -92,6 +76,20 @@ ParaExtraDialogData::ParaExtraDialogData qtarch_specialwidthlabel->setAlignment( 289 ); qtarch_specialwidthlabel->setMargin( -1 ); + widthvalue = new KRestrictedLine( this, "widthvalue" ); + widthvalue->setGeometry( 275, 65, 87, 54 ); + widthvalue->setMinimumSize( 0, 0 ); + widthvalue->setMaximumSize( 32767, 32767 ); + widthvalue->setFocusPolicy( QWidget::StrongFocus ); + widthvalue->setBackgroundMode( QWidget::PaletteBase ); + widthvalue->setFontPropagation( QWidget::NoChildren ); + widthvalue->setPalettePropagation( QWidget::NoChildren ); + widthvalue->setText( "" ); + widthvalue->setMaxLength( 32767 ); + widthvalue->setFrame( QLineEdit::Normal ); + widthvalue->setFrame( true ); + widthvalue->setValidChars( "0123456789.-," ); + widthvalueunits = new QComboBox( FALSE, this, "widthvalueunits" ); widthvalueunits->setGeometry( 367, 65, 173, 54 ); widthvalueunits->setMinimumSize( 0, 0 ); @@ -105,31 +103,21 @@ ParaExtraDialogData::ParaExtraDialogData widthvalueunits->setMaxCount( 2147483647 ); widthvalueunits->setAutoCompletion( false ); - hfillbetween = new QCheckBox( this, "hfillbetween" ); - hfillbetween->setGeometry( 275, 189, 265, 65 ); - hfillbetween->setMinimumSize( 0, 0 ); - hfillbetween->setMaximumSize( 32767, 32767 ); - hfillbetween->setFocusPolicy( QWidget::TabFocus ); - hfillbetween->setBackgroundMode( QWidget::PaletteBackground ); - hfillbetween->setFontPropagation( QWidget::NoChildren ); - hfillbetween->setPalettePropagation( QWidget::NoChildren ); - hfillbetween->setText( _("&HFill between minipage paragraphs") ); - hfillbetween->setAutoRepeat( false ); - hfillbetween->setAutoResize( false ); - hfillbetween->setChecked( false ); - - startnewminipage = new QCheckBox( this, "startnewminipage" ); - startnewminipage->setGeometry( 275, 325, 265, 65 ); - startnewminipage->setMinimumSize( 0, 0 ); - startnewminipage->setMaximumSize( 32767, 32767 ); - startnewminipage->setFocusPolicy( QWidget::TabFocus ); - startnewminipage->setBackgroundMode( QWidget::PaletteBackground ); - startnewminipage->setFontPropagation( QWidget::NoChildren ); - startnewminipage->setPalettePropagation( QWidget::NoChildren ); - startnewminipage->setText( _("&Start new minipage") ); - startnewminipage->setAutoRepeat( false ); - startnewminipage->setAutoResize( false ); - startnewminipage->setChecked( false ); + specialalignment = new QButtonGroup( this, "specialalignment" ); + specialalignment->setGeometry( 5, 124, 265, 331 ); + specialalignment->setMinimumSize( 0, 0 ); + specialalignment->setMaximumSize( 32767, 32767 ); + specialalignment->setFocusPolicy( QWidget::NoFocus ); + specialalignment->setBackgroundMode( QWidget::PaletteBackground ); + specialalignment->setFontPropagation( QWidget::NoChildren ); + specialalignment->setPalettePropagation( QWidget::NoChildren ); + specialalignment->setFrameStyle( 49 ); + specialalignment->setLineWidth( 1 ); + specialalignment->setMidLineWidth( 0 ); + specialalignment->QFrame::setMargin( 0 ); + specialalignment->setTitle( _("Alignment") ); + specialalignment->setAlignment( 1 ); + specialalignment->setExclusive( true ); top = new QRadioButton( specialalignment, "top" ); top->setGeometry( 5, 49, 255, 45 ); @@ -170,23 +158,31 @@ ParaExtraDialogData::ParaExtraDialogData bottom->setAutoResize( false ); bottom->setChecked( false ); - widthvalue = new KRestrictedLine( this, "widthvalue" ); - widthvalue->setGeometry( 275, 65, 87, 54 ); - widthvalue->setMinimumSize( 0, 0 ); - widthvalue->setMaximumSize( 32767, 32767 ); - widthvalue->setFocusPolicy( QWidget::StrongFocus ); - widthvalue->setBackgroundMode( QWidget::PaletteBase ); - widthvalue->setFontPropagation( QWidget::NoChildren ); - widthvalue->setPalettePropagation( QWidget::NoChildren ); - widthvalue->setText( "" ); - widthvalue->setMaxLength( 32767 ); - widthvalue->setFrame( QLineEdit::Normal ); - widthvalue->setFrame( true ); - widthvalue->setValidChars( "0123456789.-," ); + hfillbetween = new QCheckBox( this, "hfillbetween" ); + hfillbetween->setGeometry( 275, 189, 265, 65 ); + hfillbetween->setMinimumSize( 0, 0 ); + hfillbetween->setMaximumSize( 32767, 32767 ); + hfillbetween->setFocusPolicy( QWidget::TabFocus ); + hfillbetween->setBackgroundMode( QWidget::PaletteBackground ); + hfillbetween->setFontPropagation( QWidget::NoChildren ); + hfillbetween->setPalettePropagation( QWidget::NoChildren ); + hfillbetween->setText( _("&HFill between minipage paragraphs") ); + hfillbetween->setAutoRepeat( false ); + hfillbetween->setAutoResize( false ); + hfillbetween->setChecked( false ); - specialalignment->insert( top ); - specialalignment->insert( middle ); - specialalignment->insert( bottom ); + startnewminipage = new QCheckBox( this, "startnewminipage" ); + startnewminipage->setGeometry( 275, 325, 265, 65 ); + startnewminipage->setMinimumSize( 0, 0 ); + startnewminipage->setMaximumSize( 32767, 32767 ); + startnewminipage->setFocusPolicy( QWidget::TabFocus ); + startnewminipage->setBackgroundMode( QWidget::PaletteBackground ); + startnewminipage->setFontPropagation( QWidget::NoChildren ); + startnewminipage->setPalettePropagation( QWidget::NoChildren ); + startnewminipage->setText( _("&Start new minipage") ); + startnewminipage->setAutoRepeat( false ); + startnewminipage->setAutoResize( false ); + startnewminipage->setChecked( false ); if (type->sizeHint().width()!=-1) type->setMinimumWidth(type->sizeHint().width()); @@ -210,28 +206,22 @@ ParaExtraDialogData::ParaExtraDialogData qtarch_specialwidthlabel->setMaximumWidth(qtarch_specialwidthlabel->sizeHint().width()); if (qtarch_specialwidthlabel->sizeHint().height()!=-1) qtarch_specialwidthlabel->setMaximumHeight(qtarch_specialwidthlabel->sizeHint().height()); + if (widthvalue->sizeHint().width()!=-1) + widthvalue->setMinimumWidth(widthvalue->sizeHint().width()); + if (widthvalue->sizeHint().height()!=-1) + widthvalue->setMinimumHeight(widthvalue->sizeHint().height()); + if (widthvalue->sizeHint().height()!=-1) + widthvalue->setMaximumHeight(widthvalue->sizeHint().height()); if (widthvalueunits->sizeHint().width()!=-1) widthvalueunits->setMinimumWidth(widthvalueunits->sizeHint().width()); if (widthvalueunits->sizeHint().height()!=-1) widthvalueunits->setMinimumHeight(widthvalueunits->sizeHint().height()); if (widthvalueunits->sizeHint().height()!=-1) widthvalueunits->setMaximumHeight(widthvalueunits->sizeHint().height()); - if (hfillbetween->sizeHint().width()!=-1) - hfillbetween->setMinimumWidth(hfillbetween->sizeHint().width()); - if (hfillbetween->sizeHint().height()!=-1) - hfillbetween->setMinimumHeight(hfillbetween->sizeHint().height()); - if (hfillbetween->sizeHint().width()!=-1) - hfillbetween->setMaximumWidth(hfillbetween->sizeHint().width()); - if (hfillbetween->sizeHint().height()!=-1) - hfillbetween->setMaximumHeight(hfillbetween->sizeHint().height()); - if (startnewminipage->sizeHint().width()!=-1) - startnewminipage->setMinimumWidth(startnewminipage->sizeHint().width()); - if (startnewminipage->sizeHint().height()!=-1) - startnewminipage->setMinimumHeight(startnewminipage->sizeHint().height()); - if (startnewminipage->sizeHint().width()!=-1) - startnewminipage->setMaximumWidth(startnewminipage->sizeHint().width()); - if (startnewminipage->sizeHint().height()!=-1) - startnewminipage->setMaximumHeight(startnewminipage->sizeHint().height()); + specialalignment->insert( top ); + specialalignment->insert( middle ); + specialalignment->insert( bottom ); + if (top->sizeHint().width()!=-1) top->setMinimumWidth(top->sizeHint().width()); if (top->sizeHint().height()!=-1) @@ -256,12 +246,22 @@ ParaExtraDialogData::ParaExtraDialogData bottom->setMaximumWidth(bottom->sizeHint().width()); if (bottom->sizeHint().height()!=-1) bottom->setMaximumHeight(bottom->sizeHint().height()); - if (widthvalue->sizeHint().width()!=-1) - widthvalue->setMinimumWidth(widthvalue->sizeHint().width()); - if (widthvalue->sizeHint().height()!=-1) - widthvalue->setMinimumHeight(widthvalue->sizeHint().height()); - if (widthvalue->sizeHint().height()!=-1) - widthvalue->setMaximumHeight(widthvalue->sizeHint().height()); + if (hfillbetween->sizeHint().width()!=-1) + hfillbetween->setMinimumWidth(hfillbetween->sizeHint().width()); + if (hfillbetween->sizeHint().height()!=-1) + hfillbetween->setMinimumHeight(hfillbetween->sizeHint().height()); + if (hfillbetween->sizeHint().width()!=-1) + hfillbetween->setMaximumWidth(hfillbetween->sizeHint().width()); + if (hfillbetween->sizeHint().height()!=-1) + hfillbetween->setMaximumHeight(hfillbetween->sizeHint().height()); + if (startnewminipage->sizeHint().width()!=-1) + startnewminipage->setMinimumWidth(startnewminipage->sizeHint().width()); + if (startnewminipage->sizeHint().height()!=-1) + startnewminipage->setMinimumHeight(startnewminipage->sizeHint().height()); + if (startnewminipage->sizeHint().width()!=-1) + startnewminipage->setMaximumWidth(startnewminipage->sizeHint().width()); + if (startnewminipage->sizeHint().height()!=-1) + startnewminipage->setMaximumHeight(startnewminipage->sizeHint().height()); QGridLayout* qtarch_layout_1 = new QGridLayout( this, 2, 2, 5, 5, NULL ); qtarch_layout_1->addColSpacing( 0, 5 ); qtarch_layout_1->setColStretch( 0, 1 ); diff --git a/src/frontends/kde/dlg/paraextradlgdata.h b/src/frontends/kde/dlg/paraextradlgdata.h index bb761a6fca..9badc04e33 100644 --- a/src/frontends/kde/dlg/paraextradlgdata.h +++ b/src/frontends/kde/dlg/paraextradlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: paraextradlgdata.h - Last generated: Wed Jan 24 06:43:26 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -42,15 +42,15 @@ protected slots: virtual void typeHighlighted(int); protected: - QButtonGroup* specialalignment; QComboBox* type; + KRestrictedLine* widthvalue; QComboBox* widthvalueunits; - QCheckBox* hfillbetween; - QCheckBox* startnewminipage; + QButtonGroup* specialalignment; QRadioButton* top; QRadioButton* middle; QRadioButton* bottom; - KRestrictedLine* widthvalue; + QCheckBox* hfillbetween; + QCheckBox* startnewminipage; }; diff --git a/src/frontends/kde/dlg/parageneraldlgdata.C b/src/frontends/kde/dlg/parageneraldlgdata.C index 2f5d640fd8..acc465d211 100644 --- a/src/frontends/kde/dlg/parageneraldlgdata.C +++ b/src/frontends/kde/dlg/parageneraldlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: parageneraldlgdata.C - Last generated: Wed Jan 24 06:43:30 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -28,24 +28,30 @@ ParaGeneralDialogData::ParaGeneralDialogData : Inherited( parent, name, 0 ) { - alignment = new QButtonGroup( this, "alignment" ); - alignment->setGeometry( 5, 5, 123, 375 ); - alignment->setMinimumSize( 0, 0 ); - alignment->setMaximumSize( 32767, 32767 ); - alignment->setFocusPolicy( QWidget::NoFocus ); - alignment->setBackgroundMode( QWidget::PaletteBackground ); - alignment->setFontPropagation( QWidget::NoChildren ); - alignment->setPalettePropagation( QWidget::NoChildren ); - alignment->setFrameStyle( 49 ); - alignment->setLineWidth( 1 ); - alignment->setMidLineWidth( 0 ); - alignment->QFrame::setMargin( 0 ); - alignment->setTitle( _("Alignment") ); - alignment->setAlignment( 1 ); - alignment->setExclusive( true ); + justification = new QComboBox( FALSE, this, "justification" ); + justification->setGeometry( 130, 5, 120, 59 ); + justification->setMinimumSize( 0, 0 ); + justification->setMaximumSize( 32767, 32767 ); + justification->setFocusPolicy( QWidget::StrongFocus ); + justification->setBackgroundMode( QWidget::PaletteBackground ); + justification->setFontPropagation( QWidget::AllChildren ); + justification->setPalettePropagation( QWidget::AllChildren ); + justification->setSizeLimit( 4 ); + justification->setAutoResize( false ); + justification->setMaxCount( 4 ); + justification->setAutoCompletion( false ); + + spacetab = new TabStack( this, "spacetab" ); + spacetab->setGeometry( 5, 69, 605, 294 ); + spacetab->setMinimumSize( 0, 0 ); + spacetab->setMaximumSize( 32767, 32767 ); + spacetab->setFocusPolicy( QWidget::NoFocus ); + spacetab->setBackgroundMode( QWidget::PaletteBackground ); + spacetab->setFontPropagation( QWidget::NoChildren ); + spacetab->setPalettePropagation( QWidget::NoChildren ); lineabove = new QCheckBox( this, "lineabove" ); - lineabove->setGeometry( 5, 385, 365, 50 ); + lineabove->setGeometry( 5, 368, 298, 39 ); lineabove->setMinimumSize( 0, 0 ); lineabove->setMaximumSize( 32767, 32767 ); lineabove->setFocusPolicy( QWidget::TabFocus ); @@ -58,7 +64,7 @@ ParaGeneralDialogData::ParaGeneralDialogData lineabove->setChecked( false ); linebelow = new QCheckBox( this, "linebelow" ); - linebelow->setGeometry( 5, 440, 365, 50 ); + linebelow->setGeometry( 5, 412, 298, 39 ); linebelow->setMinimumSize( 0, 0 ); linebelow->setMaximumSize( 32767, 32767 ); linebelow->setFocusPolicy( QWidget::TabFocus ); @@ -71,7 +77,7 @@ ParaGeneralDialogData::ParaGeneralDialogData linebelow->setChecked( false ); noindent = new QCheckBox( this, "noindent" ); - noindent->setGeometry( 5, 495, 365, 50 ); + noindent->setGeometry( 5, 456, 298, 39 ); noindent->setMinimumSize( 0, 0 ); noindent->setMaximumSize( 32767, 32767 ); noindent->setFocusPolicy( QWidget::TabFocus ); @@ -83,61 +89,9 @@ ParaGeneralDialogData::ParaGeneralDialogData noindent->setAutoResize( false ); noindent->setChecked( false ); - block = new QRadioButton( alignment, "block" ); - block->setGeometry( 5, 57, 113, 37 ); - block->setMinimumSize( 0, 0 ); - block->setMaximumSize( 32767, 32767 ); - block->setFocusPolicy( QWidget::TabFocus ); - block->setBackgroundMode( QWidget::PaletteBackground ); - block->setFontPropagation( QWidget::NoChildren ); - block->setPalettePropagation( QWidget::NoChildren ); - block->setText( _("Block") ); - block->setAutoRepeat( false ); - block->setAutoResize( false ); - block->setChecked( false ); - - center = new QRadioButton( alignment, "center" ); - center->setGeometry( 5, 137, 113, 37 ); - center->setMinimumSize( 0, 0 ); - center->setMaximumSize( 32767, 32767 ); - center->setFocusPolicy( QWidget::TabFocus ); - center->setBackgroundMode( QWidget::PaletteBackground ); - center->setFontPropagation( QWidget::NoChildren ); - center->setPalettePropagation( QWidget::NoChildren ); - center->setText( _("Center") ); - center->setAutoRepeat( false ); - center->setAutoResize( false ); - center->setChecked( false ); - - left = new QRadioButton( alignment, "left" ); - left->setGeometry( 5, 216, 113, 37 ); - left->setMinimumSize( 0, 0 ); - left->setMaximumSize( 32767, 32767 ); - left->setFocusPolicy( QWidget::TabFocus ); - left->setBackgroundMode( QWidget::PaletteBackground ); - left->setFontPropagation( QWidget::NoChildren ); - left->setPalettePropagation( QWidget::NoChildren ); - left->setText( _("Left") ); - left->setAutoRepeat( false ); - left->setAutoResize( false ); - left->setChecked( false ); - - right = new QRadioButton( alignment, "right" ); - right->setGeometry( 5, 296, 113, 37 ); - right->setMinimumSize( 0, 0 ); - right->setMaximumSize( 32767, 32767 ); - right->setFocusPolicy( QWidget::TabFocus ); - right->setBackgroundMode( QWidget::PaletteBackground ); - right->setFontPropagation( QWidget::NoChildren ); - right->setPalettePropagation( QWidget::NoChildren ); - right->setText( _("Right") ); - right->setAutoRepeat( false ); - right->setAutoResize( false ); - right->setChecked( false ); - QLabel* qtarch_labelwidthlabel; qtarch_labelwidthlabel = new QLabel( this, "labelwidthlabel" ); - qtarch_labelwidthlabel->setGeometry( 375, 385, 183, 160 ); + qtarch_labelwidthlabel->setGeometry( 308, 368, 149, 127 ); qtarch_labelwidthlabel->setMinimumSize( 0, 0 ); qtarch_labelwidthlabel->setMaximumSize( 32767, 32767 ); qtarch_labelwidthlabel->setFocusPolicy( QWidget::NoFocus ); @@ -153,7 +107,7 @@ ParaGeneralDialogData::ParaGeneralDialogData qtarch_labelwidthlabel->setMargin( -1 ); labelwidth = new QLineEdit( this, "labelwidth" ); - labelwidth->setGeometry( 563, 385, 182, 160 ); + labelwidth->setGeometry( 462, 368, 148, 127 ); labelwidth->setMinimumSize( 0, 0 ); labelwidth->setMaximumSize( 32767, 32767 ); labelwidth->setFocusPolicy( QWidget::StrongFocus ); @@ -165,24 +119,33 @@ ParaGeneralDialogData::ParaGeneralDialogData labelwidth->setFrame( QLineEdit::Normal ); labelwidth->setFrame( true ); - spacetab = new TabStack( this, "spacetab" ); - spacetab->setGeometry( 133, 5, 612, 375 ); - spacetab->setMinimumSize( 0, 0 ); - spacetab->setMaximumSize( 32767, 32767 ); - spacetab->setFocusPolicy( QWidget::NoFocus ); - spacetab->setBackgroundMode( QWidget::PaletteBackground ); - spacetab->setFontPropagation( QWidget::NoChildren ); - spacetab->setPalettePropagation( QWidget::NoChildren ); - - if (alignment->sizeHint().width()!=-1) - alignment->setMinimumWidth(alignment->sizeHint().width()); - if (alignment->sizeHint().height()!=-1) - alignment->setMinimumHeight(alignment->sizeHint().height()); - alignment->insert( block ); - alignment->insert( center ); - alignment->insert( left ); - alignment->insert( right ); + QLabel* qtarch_labelJustification; + qtarch_labelJustification = new QLabel( this, "labelJustification" ); + qtarch_labelJustification->setGeometry( 5, 5, 120, 59 ); + qtarch_labelJustification->setMinimumSize( 0, 0 ); + qtarch_labelJustification->setMaximumSize( 32767, 32767 ); + qtarch_labelJustification->setFocusPolicy( QWidget::NoFocus ); + qtarch_labelJustification->setBackgroundMode( QWidget::PaletteBackground ); + qtarch_labelJustification->setFontPropagation( QWidget::NoChildren ); + qtarch_labelJustification->setPalettePropagation( QWidget::NoChildren ); + qtarch_labelJustification->setFrameStyle( 0 ); + qtarch_labelJustification->setLineWidth( 1 ); + qtarch_labelJustification->setMidLineWidth( 0 ); + qtarch_labelJustification->QFrame::setMargin( 0 ); + qtarch_labelJustification->setText( _("Justification") ); + qtarch_labelJustification->setAlignment( 289 ); + qtarch_labelJustification->setMargin( -1 ); + if (justification->sizeHint().width()!=-1) + justification->setMinimumWidth(justification->sizeHint().width()); + if (justification->sizeHint().height()!=-1) + justification->setMinimumHeight(justification->sizeHint().height()); + if (justification->sizeHint().height()!=-1) + justification->setMaximumHeight(justification->sizeHint().height()); + if (spacetab->sizeHint().width()!=-1) + spacetab->setMinimumWidth(spacetab->sizeHint().width()); + if (spacetab->sizeHint().height()!=-1) + spacetab->setMinimumHeight(spacetab->sizeHint().height()); if (lineabove->sizeHint().width()!=-1) lineabove->setMinimumWidth(lineabove->sizeHint().width()); if (lineabove->sizeHint().height()!=-1) @@ -207,38 +170,6 @@ ParaGeneralDialogData::ParaGeneralDialogData noindent->setMaximumWidth(noindent->sizeHint().width()); if (noindent->sizeHint().height()!=-1) noindent->setMaximumHeight(noindent->sizeHint().height()); - if (block->sizeHint().width()!=-1) - block->setMinimumWidth(block->sizeHint().width()); - if (block->sizeHint().height()!=-1) - block->setMinimumHeight(block->sizeHint().height()); - if (block->sizeHint().width()!=-1) - block->setMaximumWidth(block->sizeHint().width()); - if (block->sizeHint().height()!=-1) - block->setMaximumHeight(block->sizeHint().height()); - if (center->sizeHint().width()!=-1) - center->setMinimumWidth(center->sizeHint().width()); - if (center->sizeHint().height()!=-1) - center->setMinimumHeight(center->sizeHint().height()); - if (center->sizeHint().width()!=-1) - center->setMaximumWidth(center->sizeHint().width()); - if (center->sizeHint().height()!=-1) - center->setMaximumHeight(center->sizeHint().height()); - if (left->sizeHint().width()!=-1) - left->setMinimumWidth(left->sizeHint().width()); - if (left->sizeHint().height()!=-1) - left->setMinimumHeight(left->sizeHint().height()); - if (left->sizeHint().width()!=-1) - left->setMaximumWidth(left->sizeHint().width()); - if (left->sizeHint().height()!=-1) - left->setMaximumHeight(left->sizeHint().height()); - if (right->sizeHint().width()!=-1) - right->setMinimumWidth(right->sizeHint().width()); - if (right->sizeHint().height()!=-1) - right->setMinimumHeight(right->sizeHint().height()); - if (right->sizeHint().width()!=-1) - right->setMaximumWidth(right->sizeHint().width()); - if (right->sizeHint().height()!=-1) - right->setMaximumHeight(right->sizeHint().height()); if (qtarch_labelwidthlabel->sizeHint().width()!=-1) qtarch_labelwidthlabel->setMinimumWidth(qtarch_labelwidthlabel->sizeHint().width()); if (qtarch_labelwidthlabel->sizeHint().height()!=-1) @@ -253,44 +184,41 @@ ParaGeneralDialogData::ParaGeneralDialogData labelwidth->setMinimumHeight(labelwidth->sizeHint().height()); if (labelwidth->sizeHint().height()!=-1) labelwidth->setMaximumHeight(labelwidth->sizeHint().height()); - if (spacetab->sizeHint().width()!=-1) - spacetab->setMinimumWidth(spacetab->sizeHint().width()); - if (spacetab->sizeHint().height()!=-1) - spacetab->setMinimumHeight(spacetab->sizeHint().height()); + if (qtarch_labelJustification->sizeHint().width()!=-1) + qtarch_labelJustification->setMinimumWidth(qtarch_labelJustification->sizeHint().width()); + if (qtarch_labelJustification->sizeHint().height()!=-1) + qtarch_labelJustification->setMinimumHeight(qtarch_labelJustification->sizeHint().height()); + if (qtarch_labelJustification->sizeHint().width()!=-1) + qtarch_labelJustification->setMaximumWidth(qtarch_labelJustification->sizeHint().width()); + if (qtarch_labelJustification->sizeHint().height()!=-1) + qtarch_labelJustification->setMaximumHeight(qtarch_labelJustification->sizeHint().height()); QBoxLayout* qtarch_layout_1 = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5, NULL ); qtarch_layout_1->addStrut( 0 ); QBoxLayout* qtarch_layout_1_1 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); - qtarch_layout_1->addLayout( qtarch_layout_1_1, 5 ); + qtarch_layout_1->addLayout( qtarch_layout_1_1, 1 ); qtarch_layout_1_1->addStrut( 0 ); - qtarch_layout_1_1->addWidget( alignment, 1, 33 ); - QBoxLayout* qtarch_layout_1_1_1 = new QBoxLayout( alignment, QBoxLayout::TopToBottom, 5, 5, NULL ); - qtarch_layout_1_1_1->addStrut( 0 ); - qtarch_layout_1_1_1->addSpacing( 15 ); - qtarch_layout_1_1_1->addStretch( 1 ); - qtarch_layout_1_1_1->addWidget( block, 1, 1 ); - qtarch_layout_1_1_1->addStretch( 1 ); - qtarch_layout_1_1_1->addWidget( center, 1, 1 ); - qtarch_layout_1_1_1->addStretch( 1 ); - qtarch_layout_1_1_1->addWidget( left, 1, 1 ); - qtarch_layout_1_1_1->addStretch( 1 ); - qtarch_layout_1_1_1->addWidget( right, 1, 1 ); - qtarch_layout_1_1_1->addStretch( 1 ); - qtarch_layout_1_1->addWidget( spacetab, 5, 36 ); + qtarch_layout_1_1->addWidget( qtarch_labelJustification, 1, 36 ); + qtarch_layout_1_1->addWidget( justification, 1, 36 ); + qtarch_layout_1_1->addStretch( 3 ); QBoxLayout* qtarch_layout_1_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); - qtarch_layout_1->addLayout( qtarch_layout_1_2, 2 ); + qtarch_layout_1->addLayout( qtarch_layout_1_2, 5 ); qtarch_layout_1_2->addStrut( 0 ); - QBoxLayout* qtarch_layout_1_2_1 = new QBoxLayout( QBoxLayout::TopToBottom, 5, NULL ); - qtarch_layout_1_2->addLayout( qtarch_layout_1_2_1, 1 ); - qtarch_layout_1_2_1->addStrut( 0 ); - qtarch_layout_1_2_1->addWidget( lineabove, 1, 1 ); - qtarch_layout_1_2_1->addWidget( linebelow, 1, 1 ); - qtarch_layout_1_2_1->addWidget( noindent, 1, 1 ); - QBoxLayout* qtarch_layout_1_2_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); - qtarch_layout_1_2->addLayout( qtarch_layout_1_2_2, 1 ); - qtarch_layout_1_2_2->addStrut( 0 ); - qtarch_layout_1_2_2->addWidget( qtarch_labelwidthlabel, 1, 36 ); - qtarch_layout_1_2_2->addWidget( labelwidth, 1, 36 ); - resize( 750,550 ); + qtarch_layout_1_2->addWidget( spacetab, 5, 36 ); + QBoxLayout* qtarch_layout_1_3 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); + qtarch_layout_1->addLayout( qtarch_layout_1_3, 2 ); + qtarch_layout_1_3->addStrut( 0 ); + QBoxLayout* qtarch_layout_1_3_1 = new QBoxLayout( QBoxLayout::TopToBottom, 5, NULL ); + qtarch_layout_1_3->addLayout( qtarch_layout_1_3_1, 1 ); + qtarch_layout_1_3_1->addStrut( 0 ); + qtarch_layout_1_3_1->addWidget( lineabove, 1, 1 ); + qtarch_layout_1_3_1->addWidget( linebelow, 1, 1 ); + qtarch_layout_1_3_1->addWidget( noindent, 1, 1 ); + QBoxLayout* qtarch_layout_1_3_2 = new QBoxLayout( QBoxLayout::LeftToRight, 5, NULL ); + qtarch_layout_1_3->addLayout( qtarch_layout_1_3_2, 1 ); + qtarch_layout_1_3_2->addStrut( 0 ); + qtarch_layout_1_3_2->addWidget( qtarch_labelwidthlabel, 1, 36 ); + qtarch_layout_1_3_2->addWidget( labelwidth, 1, 36 ); + resize( 615,500 ); setMinimumSize( 0, 0 ); setMaximumSize( 32767, 32767 ); } diff --git a/src/frontends/kde/dlg/parageneraldlgdata.h b/src/frontends/kde/dlg/parageneraldlgdata.h index 1b3994e7ae..0db7584658 100644 --- a/src/frontends/kde/dlg/parageneraldlgdata.h +++ b/src/frontends/kde/dlg/parageneraldlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: parageneraldlgdata.h - Last generated: Wed Jan 24 06:43:30 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -15,10 +15,9 @@ #include #include "tabstack.h" -#include #include +#include #include -#include class ParaGeneralDialogData : public QWidget { @@ -41,16 +40,12 @@ protected slots: protected: - QButtonGroup* alignment; + QComboBox* justification; + TabStack* spacetab; QCheckBox* lineabove; QCheckBox* linebelow; QCheckBox* noindent; - QRadioButton* block; - QRadioButton* center; - QRadioButton* left; - QRadioButton* right; QLineEdit* labelwidth; - TabStack* spacetab; }; diff --git a/src/frontends/kde/dlg/printdlgdata.C b/src/frontends/kde/dlg/printdlgdata.C index 7d523be9a6..ba2fc800af 100644 --- a/src/frontends/kde/dlg/printdlgdata.C +++ b/src/frontends/kde/dlg/printdlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: printdlgdata.C - Last generated: Wed Jan 24 06:43:35 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -16,7 +16,7 @@ #include #include "printdlgdata.h" -#define Inherited QWidget +#define Inherited QDialog PrintDialogData::PrintDialogData @@ -25,7 +25,7 @@ PrintDialogData::PrintDialogData const char* name ) : - Inherited( parent, name, 0 ) + Inherited( parent, name, TRUE, 0 ) { pagesGroupBox = new QGroupBox( this, "pagesGroupBox" ); pagesGroupBox->setGeometry( 5, 5, 162, 270 ); @@ -134,7 +134,7 @@ PrintDialogData::PrintDialogData cancel->setAutoRepeat( false ); cancel->setAutoResize( false ); cancel->setToggleButton( false ); - cancel->setDefault( false ); + cancel->setDefault( true ); cancel->setAutoDefault( false ); cancel->setIsMenuButton( false ); @@ -151,6 +151,19 @@ PrintDialogData::PrintDialogData allpages->setAutoResize( false ); allpages->setChecked( false ); + oddpages = new QRadioButton( pagesRadioGroup, "oddpages" ); + oddpages->setGeometry( 5, 74, 142, 14 ); + oddpages->setMinimumSize( 0, 0 ); + oddpages->setMaximumSize( 32767, 32767 ); + oddpages->setFocusPolicy( QWidget::TabFocus ); + oddpages->setBackgroundMode( QWidget::PaletteBackground ); + oddpages->setFontPropagation( QWidget::NoChildren ); + oddpages->setPalettePropagation( QWidget::NoChildren ); + oddpages->setText( _("&Odd pages") ); + oddpages->setAutoRepeat( false ); + oddpages->setAutoResize( false ); + oddpages->setChecked( false ); + evenpages = new QRadioButton( pagesRadioGroup, "evenpages" ); evenpages->setGeometry( 5, 108, 142, 14 ); evenpages->setMinimumSize( 0, 0 ); @@ -177,6 +190,59 @@ PrintDialogData::PrintDialogData from->setFrame( QLineEdit::Normal ); from->setFrame( true ); + to = new KIntLineEdit( pagesGroupBox, "to" ); + to->setGeometry( 108, 199, 49, 31 ); + to->setMinimumSize( 0, 0 ); + to->setMaximumSize( 32767, 32767 ); + to->setFocusPolicy( QWidget::StrongFocus ); + to->setBackgroundMode( QWidget::PaletteBase ); + to->setFontPropagation( QWidget::NoChildren ); + to->setPalettePropagation( QWidget::NoChildren ); + to->setText( "" ); + to->setMaxLength( 32767 ); + to->setFrame( QLineEdit::Normal ); + to->setFrame( true ); + + reverse = new QCheckBox( pagesGroupBox, "reverse" ); + reverse->setGeometry( 5, 235, 152, 30 ); + reverse->setMinimumSize( 0, 0 ); + reverse->setMaximumSize( 32767, 32767 ); + reverse->setFocusPolicy( QWidget::TabFocus ); + reverse->setBackgroundMode( QWidget::PaletteBackground ); + reverse->setFontPropagation( QWidget::NoChildren ); + reverse->setPalettePropagation( QWidget::NoChildren ); + reverse->setText( _("&Reverse order") ); + reverse->setAutoRepeat( false ); + reverse->setAutoResize( true ); + reverse->setChecked( false ); + + count = new KIntLineEdit( copies, "count" ); + count->setGeometry( 162, 12, 50, 46 ); + count->setMinimumSize( 0, 0 ); + count->setMaximumSize( 32767, 32767 ); + connect( count, SIGNAL(textChanged(const char*)), SLOT(changedCount(const char*)) ); + count->setFocusPolicy( QWidget::StrongFocus ); + count->setBackgroundMode( QWidget::PaletteBase ); + count->setFontPropagation( QWidget::NoChildren ); + count->setPalettePropagation( QWidget::NoChildren ); + count->setText( "" ); + count->setMaxLength( 32767 ); + count->setFrame( QLineEdit::Normal ); + count->setFrame( true ); + + sort = new QCheckBox( copies, "sort" ); + sort->setGeometry( 268, 12, 50, 46 ); + sort->setMinimumSize( 0, 0 ); + sort->setMaximumSize( 32767, 32767 ); + sort->setFocusPolicy( QWidget::TabFocus ); + sort->setBackgroundMode( QWidget::PaletteBackground ); + sort->setFontPropagation( QWidget::NoChildren ); + sort->setPalettePropagation( QWidget::NoChildren ); + sort->setText( _("Co&llate") ); + sort->setAutoRepeat( false ); + sort->setAutoResize( true ); + sort->setChecked( false ); + fromLabel = new QLabel( pagesGroupBox, "fromLabel" ); fromLabel->setGeometry( 5, 164, 98, 30 ); fromLabel->setMinimumSize( 0, 0 ); @@ -209,19 +275,6 @@ PrintDialogData::PrintDialogData toLabel->setAlignment( 289 ); toLabel->setMargin( -1 ); - oddpages = new QRadioButton( pagesRadioGroup, "oddpages" ); - oddpages->setGeometry( 5, 74, 142, 14 ); - oddpages->setMinimumSize( 0, 0 ); - oddpages->setMaximumSize( 32767, 32767 ); - oddpages->setFocusPolicy( QWidget::TabFocus ); - oddpages->setBackgroundMode( QWidget::PaletteBackground ); - oddpages->setFontPropagation( QWidget::NoChildren ); - oddpages->setPalettePropagation( QWidget::NoChildren ); - oddpages->setText( _("&Odd pages") ); - oddpages->setAutoRepeat( false ); - oddpages->setAutoResize( false ); - oddpages->setChecked( false ); - toprinter = new QRadioButton( printToRadioGroup, "toprinter" ); toprinter->setGeometry( 5, 5, 142, 23 ); toprinter->setMinimumSize( 0, 0 ); @@ -261,19 +314,6 @@ PrintDialogData::PrintDialogData printername->setFrame( QLineEdit::Normal ); printername->setFrame( true ); - reverse = new QCheckBox( pagesGroupBox, "reverse" ); - reverse->setGeometry( 5, 235, 152, 30 ); - reverse->setMinimumSize( 0, 0 ); - reverse->setMaximumSize( 32767, 32767 ); - reverse->setFocusPolicy( QWidget::TabFocus ); - reverse->setBackgroundMode( QWidget::PaletteBackground ); - reverse->setFontPropagation( QWidget::NoChildren ); - reverse->setPalettePropagation( QWidget::NoChildren ); - reverse->setText( _("&Reverse order") ); - reverse->setAutoRepeat( false ); - reverse->setAutoResize( true ); - reverse->setChecked( false ); - filename = new QLineEdit( printToGroupBox, "filename" ); filename->setGeometry( 169, 96, 142, 26 ); filename->setMinimumSize( 0, 0 ); @@ -287,19 +327,6 @@ PrintDialogData::PrintDialogData filename->setFrame( QLineEdit::Normal ); filename->setFrame( true ); - sort = new QCheckBox( copies, "sort" ); - sort->setGeometry( 268, 12, 50, 46 ); - sort->setMinimumSize( 0, 0 ); - sort->setMaximumSize( 32767, 32767 ); - sort->setFocusPolicy( QWidget::TabFocus ); - sort->setBackgroundMode( QWidget::PaletteBackground ); - sort->setFontPropagation( QWidget::NoChildren ); - sort->setPalettePropagation( QWidget::NoChildren ); - sort->setText( _("Co&llate") ); - sort->setAutoRepeat( false ); - sort->setAutoResize( true ); - sort->setChecked( false ); - browse = new QPushButton( printToGroupBox, "browse" ); browse->setGeometry( 158, 149, 153, 23 ); browse->setMinimumSize( 0, 0 ); @@ -317,20 +344,6 @@ PrintDialogData::PrintDialogData browse->setAutoDefault( false ); browse->setIsMenuButton( false ); - count = new KIntLineEdit( copies, "count" ); - count->setGeometry( 162, 12, 50, 46 ); - count->setMinimumSize( 0, 0 ); - count->setMaximumSize( 32767, 32767 ); - connect( count, SIGNAL(textChanged(const char*)), SLOT(changedCount(const char*)) ); - count->setFocusPolicy( QWidget::StrongFocus ); - count->setBackgroundMode( QWidget::PaletteBase ); - count->setFontPropagation( QWidget::NoChildren ); - count->setPalettePropagation( QWidget::NoChildren ); - count->setText( "" ); - count->setMaxLength( 32767 ); - count->setFrame( QLineEdit::Normal ); - count->setFrame( true ); - countLabel = new QLabel( copies, "countLabel" ); countLabel->setGeometry( 56, 12, 50, 46 ); countLabel->setMinimumSize( 0, 0 ); @@ -347,22 +360,9 @@ PrintDialogData::PrintDialogData countLabel->setAlignment( 289 ); countLabel->setMargin( -1 ); - to = new KIntLineEdit( pagesGroupBox, "to" ); - to->setGeometry( 108, 199, 49, 31 ); - to->setMinimumSize( 0, 0 ); - to->setMaximumSize( 32767, 32767 ); - to->setFocusPolicy( QWidget::StrongFocus ); - to->setBackgroundMode( QWidget::PaletteBase ); - to->setFontPropagation( QWidget::NoChildren ); - to->setPalettePropagation( QWidget::NoChildren ); - to->setText( "" ); - to->setMaxLength( 32767 ); - to->setFrame( QLineEdit::Normal ); - to->setFrame( true ); - pagesRadioGroup->insert( allpages ); - pagesRadioGroup->insert( evenpages ); pagesRadioGroup->insert( oddpages ); + pagesRadioGroup->insert( evenpages ); printToRadioGroup->insert( toprinter ); printToRadioGroup->insert( tofile ); @@ -391,6 +391,14 @@ PrintDialogData::PrintDialogData allpages->setMaximumWidth(allpages->sizeHint().width()); if (allpages->sizeHint().height()!=-1) allpages->setMaximumHeight(allpages->sizeHint().height()); + if (oddpages->sizeHint().width()!=-1) + oddpages->setMinimumWidth(oddpages->sizeHint().width()); + if (oddpages->sizeHint().height()!=-1) + oddpages->setMinimumHeight(oddpages->sizeHint().height()); + if (oddpages->sizeHint().width()!=-1) + oddpages->setMaximumWidth(oddpages->sizeHint().width()); + if (oddpages->sizeHint().height()!=-1) + oddpages->setMaximumHeight(oddpages->sizeHint().height()); if (evenpages->sizeHint().width()!=-1) evenpages->setMinimumWidth(evenpages->sizeHint().width()); if (evenpages->sizeHint().height()!=-1) @@ -405,6 +413,34 @@ PrintDialogData::PrintDialogData from->setMinimumHeight(from->sizeHint().height()); if (from->sizeHint().height()!=-1) from->setMaximumHeight(from->sizeHint().height()); + if (to->sizeHint().width()!=-1) + to->setMinimumWidth(to->sizeHint().width()); + if (to->sizeHint().height()!=-1) + to->setMinimumHeight(to->sizeHint().height()); + if (to->sizeHint().height()!=-1) + to->setMaximumHeight(to->sizeHint().height()); + if (reverse->sizeHint().width()!=-1) + reverse->setMinimumWidth(reverse->sizeHint().width()); + if (reverse->sizeHint().height()!=-1) + reverse->setMinimumHeight(reverse->sizeHint().height()); + if (reverse->sizeHint().width()!=-1) + reverse->setMaximumWidth(reverse->sizeHint().width()); + if (reverse->sizeHint().height()!=-1) + reverse->setMaximumHeight(reverse->sizeHint().height()); + if (count->sizeHint().width()!=-1) + count->setMinimumWidth(count->sizeHint().width()); + if (count->sizeHint().height()!=-1) + count->setMinimumHeight(count->sizeHint().height()); + if (count->sizeHint().height()!=-1) + count->setMaximumHeight(count->sizeHint().height()); + if (sort->sizeHint().width()!=-1) + sort->setMinimumWidth(sort->sizeHint().width()); + if (sort->sizeHint().height()!=-1) + sort->setMinimumHeight(sort->sizeHint().height()); + if (sort->sizeHint().width()!=-1) + sort->setMaximumWidth(sort->sizeHint().width()); + if (sort->sizeHint().height()!=-1) + sort->setMaximumHeight(sort->sizeHint().height()); if (fromLabel->sizeHint().width()!=-1) fromLabel->setMinimumWidth(fromLabel->sizeHint().width()); if (fromLabel->sizeHint().height()!=-1) @@ -421,14 +457,6 @@ PrintDialogData::PrintDialogData toLabel->setMaximumWidth(toLabel->sizeHint().width()); if (toLabel->sizeHint().height()!=-1) toLabel->setMaximumHeight(toLabel->sizeHint().height()); - if (oddpages->sizeHint().width()!=-1) - oddpages->setMinimumWidth(oddpages->sizeHint().width()); - if (oddpages->sizeHint().height()!=-1) - oddpages->setMinimumHeight(oddpages->sizeHint().height()); - if (oddpages->sizeHint().width()!=-1) - oddpages->setMaximumWidth(oddpages->sizeHint().width()); - if (oddpages->sizeHint().height()!=-1) - oddpages->setMaximumHeight(oddpages->sizeHint().height()); if (toprinter->sizeHint().width()!=-1) toprinter->setMinimumWidth(toprinter->sizeHint().width()); if (toprinter->sizeHint().height()!=-1) @@ -451,28 +479,12 @@ PrintDialogData::PrintDialogData printername->setMinimumHeight(printername->sizeHint().height()); if (printername->sizeHint().height()!=-1) printername->setMaximumHeight(printername->sizeHint().height()); - if (reverse->sizeHint().width()!=-1) - reverse->setMinimumWidth(reverse->sizeHint().width()); - if (reverse->sizeHint().height()!=-1) - reverse->setMinimumHeight(reverse->sizeHint().height()); - if (reverse->sizeHint().width()!=-1) - reverse->setMaximumWidth(reverse->sizeHint().width()); - if (reverse->sizeHint().height()!=-1) - reverse->setMaximumHeight(reverse->sizeHint().height()); if (filename->sizeHint().width()!=-1) filename->setMinimumWidth(filename->sizeHint().width()); if (filename->sizeHint().height()!=-1) filename->setMinimumHeight(filename->sizeHint().height()); if (filename->sizeHint().height()!=-1) filename->setMaximumHeight(filename->sizeHint().height()); - if (sort->sizeHint().width()!=-1) - sort->setMinimumWidth(sort->sizeHint().width()); - if (sort->sizeHint().height()!=-1) - sort->setMinimumHeight(sort->sizeHint().height()); - if (sort->sizeHint().width()!=-1) - sort->setMaximumWidth(sort->sizeHint().width()); - if (sort->sizeHint().height()!=-1) - sort->setMaximumHeight(sort->sizeHint().height()); if (browse->sizeHint().width()!=-1) browse->setMinimumWidth(browse->sizeHint().width()); if (browse->sizeHint().height()!=-1) @@ -481,12 +493,6 @@ PrintDialogData::PrintDialogData browse->setMaximumWidth(browse->sizeHint().width()); if (browse->sizeHint().height()!=-1) browse->setMaximumHeight(browse->sizeHint().height()); - if (count->sizeHint().width()!=-1) - count->setMinimumWidth(count->sizeHint().width()); - if (count->sizeHint().height()!=-1) - count->setMinimumHeight(count->sizeHint().height()); - if (count->sizeHint().height()!=-1) - count->setMaximumHeight(count->sizeHint().height()); if (countLabel->sizeHint().width()!=-1) countLabel->setMinimumWidth(countLabel->sizeHint().width()); if (countLabel->sizeHint().height()!=-1) @@ -495,12 +501,6 @@ PrintDialogData::PrintDialogData countLabel->setMaximumWidth(countLabel->sizeHint().width()); if (countLabel->sizeHint().height()!=-1) countLabel->setMaximumHeight(countLabel->sizeHint().height()); - if (to->sizeHint().width()!=-1) - to->setMinimumWidth(to->sizeHint().width()); - if (to->sizeHint().height()!=-1) - to->setMinimumHeight(to->sizeHint().height()); - if (to->sizeHint().height()!=-1) - to->setMaximumHeight(to->sizeHint().height()); QGridLayout* qtarch_layout_1 = new QGridLayout( this, 2, 1, 5, 5, NULL ); qtarch_layout_1->addColSpacing( 0, 5 ); qtarch_layout_1->setColStretch( 0, 1 ); @@ -606,9 +606,9 @@ void PrintDialogData::clickedPrint() void PrintDialogData::clickedCancel() { } -void PrintDialogData::clickedBrowse() -{ -} void PrintDialogData::changedCount(const char*) { } +void PrintDialogData::clickedBrowse() +{ +} diff --git a/src/frontends/kde/dlg/printdlgdata.h b/src/frontends/kde/dlg/printdlgdata.h index 75bf951904..e0b3d28dc9 100644 --- a/src/frontends/kde/dlg/printdlgdata.h +++ b/src/frontends/kde/dlg/printdlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: printdlgdata.h - Last generated: Wed Jan 24 06:43:35 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -13,7 +13,7 @@ #ifndef PrintDialogData_included #define PrintDialogData_included -#include +#include #include #include #include @@ -23,7 +23,7 @@ #include #include -class PrintDialogData : public QWidget +class PrintDialogData : public QDialog { Q_OBJECT @@ -56,21 +56,21 @@ protected: QPushButton* print; QPushButton* cancel; QRadioButton* allpages; + QRadioButton* oddpages; QRadioButton* evenpages; KIntLineEdit* from; + KIntLineEdit* to; + QCheckBox* reverse; + KIntLineEdit* count; + QCheckBox* sort; QLabel* fromLabel; QLabel* toLabel; - QRadioButton* oddpages; QRadioButton* toprinter; QRadioButton* tofile; QLineEdit* printername; - QCheckBox* reverse; QLineEdit* filename; - QCheckBox* sort; QPushButton* browse; - KIntLineEdit* count; QLabel* countLabel; - KIntLineEdit* to; }; diff --git a/src/frontends/kde/dlg/tabcreatedlgdata.C b/src/frontends/kde/dlg/tabcreatedlgdata.C index b335eb0dc8..509b28643a 100644 --- a/src/frontends/kde/dlg/tabcreatedlgdata.C +++ b/src/frontends/kde/dlg/tabcreatedlgdata.C @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: tabcreatedlgdata.C - Last generated: Wed Jan 24 06:43:40 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -16,7 +16,7 @@ #include #include "tabcreatedlgdata.h" -#define Inherited QWidget +#define Inherited QDialog #include #include @@ -27,7 +27,7 @@ TabularCreateDialogData::TabularCreateDialogData const char* name ) : - Inherited( parent, name, 0 ) + Inherited( parent, name, TRUE, 0 ) { QPushButton* qtarch_Insert; qtarch_Insert = new QPushButton( this, "Insert" ); @@ -43,7 +43,7 @@ TabularCreateDialogData::TabularCreateDialogData qtarch_Insert->setAutoRepeat( false ); qtarch_Insert->setAutoResize( false ); qtarch_Insert->setToggleButton( false ); - qtarch_Insert->setDefault( false ); + qtarch_Insert->setDefault( true ); qtarch_Insert->setAutoDefault( false ); qtarch_Insert->setIsMenuButton( false ); diff --git a/src/frontends/kde/dlg/tabcreatedlgdata.h b/src/frontends/kde/dlg/tabcreatedlgdata.h index 11ddf21779..6cd0b0c309 100644 --- a/src/frontends/kde/dlg/tabcreatedlgdata.h +++ b/src/frontends/kde/dlg/tabcreatedlgdata.h @@ -3,7 +3,7 @@ --- Qt Architect 1.4-6 generated file --- File: tabcreatedlgdata.h - Last generated: Wed Jan 24 06:43:40 2001 + Last generated: Sat Feb 10 21:08:55 2001 DO NOT EDIT!!! This file will be automatically regenerated by qtarch. All changes will be lost. @@ -13,11 +13,11 @@ #ifndef TabularCreateDialogData_included #define TabularCreateDialogData_included -#include +#include #include #include "emptytable.h" -class TabularCreateDialogData : public QWidget +class TabularCreateDialogData : public QDialog { Q_OBJECT diff --git a/src/frontends/kde/docdlg.C b/src/frontends/kde/docdlg.C index f0ae69d7ca..1abee8e3fb 100644 --- a/src/frontends/kde/docdlg.C +++ b/src/frontends/kde/docdlg.C @@ -1,24 +1,19 @@ -/* - * docdlg.C - * (C) 2001 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file docdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include #include "docdlg.h" +#include "support/lstrings.h" + #include "layout.h" #include "tex-strings.h" #include "bufferparams.h" @@ -35,11 +30,13 @@ using kde_helpers::setComboFromStr; using std::endl; -DocDialog::DocDialog(FormDocument *form, QWidget *parent, const char *name, bool, WFlags) +DocDialog::DocDialog(FormDocument * form, QWidget * parent, char const * name, bool, WFlags) : DocDialogData(parent,name), form_(form) { setCaption(name); + setUpdatesEnabled(false); + settings = new DocSettingsDialogData(this, "settings"); extra = new DocExtraDialogData(this, "extra"); geometry = new DocGeometryDialogData(this, "geometry"); @@ -85,14 +82,38 @@ DocDialog::DocDialog(FormDocument *form, QWidget *parent, const char *name, bool connect(settings->linespacing, SIGNAL(highlighted(const char *)), this, SLOT(linespacingChanged(const char *))); - settings->skipspacing->insertItem(_("small")); - settings->skipspacing->insertItem(_("medium")); - settings->skipspacing->insertItem(_("big")); - settings->skipspacing->insertItem(_("custom")); - setSizeHint(settings->skipspacing); + settings->paraspacing->insertItem(_("small")); + settings->paraspacing->insertItem(_("medium")); + settings->paraspacing->insertItem(_("big")); + settings->paraspacing->insertItem(_("custom")); + setSizeHint(settings->paraspacing); - connect(settings->skipspacing, SIGNAL(highlighted(const char *)), - this, SLOT(skipspacingChanged(const char *))); + connect(settings->paraspacing, SIGNAL(highlighted(const char *)), + this, SLOT(paraspacingChanged(const char *))); + + connect(settings->addspace, SIGNAL(toggled(bool)), + this, SLOT(addspaceChanged(bool))); + + extra->first->insertItem(_("Here")); + extra->first->insertItem(_("Bottom of page")); + extra->first->insertItem(_("Top of page")); + extra->first->insertItem(_("Separate page")); + extra->first->insertItem(_("Not set")); + extra->second->insertItem(_("Here")); + extra->second->insertItem(_("Bottom of page")); + extra->second->insertItem(_("Top of page")); + extra->second->insertItem(_("Separate page")); + extra->second->insertItem(_("Not set")); + extra->third->insertItem(_("Here")); + extra->third->insertItem(_("Bottom of page")); + extra->third->insertItem(_("Top of page")); + extra->third->insertItem(_("Separate page")); + extra->third->insertItem(_("Not set")); + extra->fourth->insertItem(_("Here")); + extra->fourth->insertItem(_("Bottom of page")); + extra->fourth->insertItem(_("Top of page")); + extra->fourth->insertItem(_("Separate page")); + extra->fourth->insertItem(_("Not set")); // ps driver options for (int i = 0; tex_graphics[i][0]; i++) @@ -154,10 +175,14 @@ DocDialog::DocDialog(FormDocument *form, QWidget *parent, const char *name, bool /* FIXME: bullets */ QToolTip::add(settings->pagestyle, _("Specify header + footer style etc")); - QToolTip::add(settings->separation, _("FIXME please !")); + QToolTip::add(settings->addspace, _("Add spacing between paragraphs rather\n than indenting")); QToolTip::add(settings->linespacingVal, _("Custom line spacing in line units")); QToolTip::add(settings->extraoptions, _("Additional LaTeX options")); - QToolTip::add(extra->floatplacement, _("Specify preferred order for\nplacing floats")); + QToolTip::add(extra->first, _("Specify preferred order for\nplacing floats")); + QToolTip::add(extra->second, _("Specify preferred order for\nplacing floats")); + QToolTip::add(extra->third, _("Specify preferred order for\nplacing floats")); + QToolTip::add(extra->fourth, _("Specify preferred order for\nplacing floats")); + QToolTip::add(extra->ignore, _("Tell LaTeX to ignore usual rules\n for float placement")); QToolTip::add(extra->sectiondepth, _("How far in the (sub)sections are numbered")); QToolTip::add(extra->tocdepth, _("How detailed the Table of Contents is")); QToolTip::add(extra->psdriver, _("Program to produce PostScript output")); @@ -165,26 +190,35 @@ DocDialog::DocDialog(FormDocument *form, QWidget *parent, const char *name, bool QToolTip::add(geometry->headheight, _("FIXME please !")); QToolTip::add(geometry->headsep, _("FIXME please !")); QToolTip::add(geometry->footskip, _("FIXME please !")); + + setUpdatesEnabled(true); + update(); } + DocDialog::~DocDialog() { } -void DocDialog::closeEvent(QCloseEvent *e) + +void DocDialog::closeEvent(QCloseEvent * e) { form_->close(); e->accept(); } + void DocDialog::setReadOnly(bool readonly) { /* FIXME */ cancel->setText(readonly ? _("&Close") : _("&Cancel")); } + void DocDialog::setFromParams(BufferParams const & params) { + setUpdatesEnabled(false); + if (!setComboFromStr(settings->docclass, textclasslist.DescOfClass(params.textclass))) lyxerr[Debug::GUI] << "Couldn't set docclass " << textclasslist.DescOfClass(params.textclass) << endl; @@ -194,14 +228,19 @@ void DocDialog::setFromParams(BufferParams const & params) LyXTextClass const & tclass = textclasslist.TextClass(params.textclass); // opt_fontsize is a string like "10|11|12" - // FIXME: check + 1 ? settings->fontsize->setCurrentItem(tokenPos(tclass.opt_fontsize(), '|', params.fontsize) + 1); // "empty|plain|headings|fancy" - // FIXME: check + 1 ? settings->pagestyle->setCurrentItem(tokenPos(tclass.opt_pagestyle(), '|', params.pagestyle) + 1); - settings->separation->setChecked(params.paragraph_separation == BufferParams::PARSEP_INDENT); + settings->addspace->setChecked(params.paragraph_separation == BufferParams::PARSEP_SKIP); + + bool const isskip = (params.paragraph_separation == BufferParams::PARSEP_SKIP); + + settings->paraspacing->setEnabled(isskip); + settings->paraspacingValue->setEnabled(isskip); + settings->paraspacingStretch->setEnabled(isskip); + settings->paraspacingShrink->setEnabled(isskip); int item=0; @@ -214,9 +253,26 @@ void DocDialog::setFromParams(BufferParams const & params) lyxerr[Debug::GUI] << "Unknown defskip " << int(params.getDefSkip().kind()) << endl; } - /* FIXME */ - settings->skipspacing->setCurrentItem(item); - //setFromLengthStr(settings->skipspacingVal, settings->skipspacingUnits, params.getDefSkip().asLyXCommand()); + settings->paraspacing->setCurrentItem(item); + + settings->paraspacingValue->setEnabled(item == 3); + settings->paraspacingStretch->setEnabled(item == 3); + settings->paraspacingShrink->setEnabled(item == 3); + + if (item == 3) { + LyXGlueLength const len = params.getDefSkip().length(); + settings->paraspacingValue->setValue(len.value()); + settings->paraspacingValue->setUnits(len.unit()); + settings->paraspacingStretch->setValue(len.plusValue()); + settings->paraspacingStretch->setUnits(len.plusUnit()); + settings->paraspacingShrink->setValue(len.minusValue()); + settings->paraspacingShrink->setUnits(len.minusUnit()); + lyxerr[Debug::GUI] << params.getDefSkip().asLyXCommand() << endl;; + } else { + settings->paraspacingValue->setFromLengthStr("0cm"); + settings->paraspacingStretch->setFromLengthStr("0cm"); + settings->paraspacingShrink->setFromLengthStr("0cm"); + } settings->sides->setChecked(params.sides == LyXTextClass::TwoSides); settings->columns->setChecked(params.columns == 2); @@ -296,15 +352,46 @@ void DocDialog::setFromParams(BufferParams const & params) extra->sectiondepth->setValue(params.secnumdepth); extra->tocdepth->setValue(params.tocdepth); - /* FIXME */ - if (params.float_placement.empty()) - extra->floatplacement->setText(""); - else - extra->floatplacement->setText(params.float_placement.c_str()); - + string const place = params.float_placement; + int count = 0; + QComboBox * box; + + extra->ignore->setChecked(false); + setComboFromStr(extra->first, _("Not set")); + setComboFromStr(extra->second, _("Not set")); + setComboFromStr(extra->third, _("Not set")); + setComboFromStr(extra->fourth, _("Not set")); + + for (string::const_iterator iter = place.begin(); iter != place.end(); ++count, ++iter) { + switch (count) { + case 0: box = extra->first; break; + case 1: box = extra->second; break; + case 2: box = extra->third; break; + default: box = extra->fourth; break; + }; + + if (*iter == '!') { + extra->ignore->setChecked(true); + continue; + } + + switch (*iter) { + case 'h': setComboFromStr(box, _("Here")); break; + case 'b': setComboFromStr(box, _("Bottom of page")); break; + case 't': setComboFromStr(box, _("Top of page")); break; + case 'p': setComboFromStr(box, _("Separate page")); break; + default: + lyxerr[Debug::GUI] << "Unknown float placement \'" << *iter << endl; + } + } + /* FIXME: bullets ! */ + + setUpdatesEnabled(true); + update(); } + bool DocDialog::updateParams(BufferParams & params) { bool redo = false; @@ -328,14 +415,11 @@ bool DocDialog::updateParams(BufferParams & params) redo = true; } - // paragraph separation, skip or indent - // FIXME: what does this do - BufferParams::PARSEP tmpsep = params.paragraph_separation; - (settings->separation->isChecked()) - ? params.paragraph_separation = BufferParams::PARSEP_INDENT - : params.paragraph_separation = BufferParams::PARSEP_SKIP; + (settings->addspace->isChecked()) + ? params.paragraph_separation = BufferParams::PARSEP_SKIP + : params.paragraph_separation = BufferParams::PARSEP_INDENT; redo = (tmpsep != params.paragraph_separation) || redo; @@ -343,17 +427,23 @@ bool DocDialog::updateParams(BufferParams & params) VSpace tmpskip; - switch (settings->skipspacing->currentItem()) { + switch (settings->paraspacing->currentItem()) { case 0: tmpskip = VSpace(VSpace::SMALLSKIP); break; case 1: tmpskip = VSpace(VSpace::MEDSKIP); break; case 2: tmpskip = VSpace(VSpace::BIGSKIP); break; - case 3: - tmpskip = VSpace(LyXGlueLength("23mm")); - /* FIXME: read glue length from skip bits !!! */ - break; default: lyxerr[Debug::GUI] << "Unknown skip spacing " << - settings->skipspacing->currentItem() << endl; + settings->paraspacing->currentItem() << endl; + break; + case 3: + string const val = settings->paraspacingValue->getLengthStr() + + "+" + settings->paraspacingStretch->getLengthStr() + + "-" + settings->paraspacingShrink->getLengthStr(); + lyxerr[Debug::GUI] << "Read para spacing of \"" << val << "\"" << endl; + LyXGlueLength length(0.0, LyXLength::PT); + isValidGlueLength(val, &length); + tmpskip = VSpace(length); + break; } if (tmpskip != params.getDefSkip()) { @@ -477,22 +567,53 @@ bool DocDialog::updateParams(BufferParams & params) params.tocdepth = extra->tocdepth->value(); - /* FIXME */ - params.float_placement = extra->floatplacement->text(); + string place; + + place += placementString(extra->first); + place += placementString(extra->second); + place += placementString(extra->third); + place += placementString(extra->fourth); + params.float_placement = place; /* FIXME: bullets */ return redo; } -void DocDialog::linespacingChanged(const char *sel) +string DocDialog::placementString(QComboBox * box) const { - bool custom = !strcmp(sel, _("custom")); + if (!strcmp(box->currentText(), _("Here"))) + return "h"; + if (!strcmp(box->currentText(), _("Bottom of page"))) + return "b"; + if (!strcmp(box->currentText(), _("Top of page"))) + return "t"; + if (!strcmp(box->currentText(), _("Separate page"))) + return "p"; + return ""; +} + +void DocDialog::linespacingChanged(const char * sel) +{ + bool const custom = !strcmp(sel, _("custom")); settings->linespacingVal->setEnabled(custom); } -void DocDialog::skipspacingChanged(const char *sel) + +void DocDialog::paraspacingChanged(const char * sel) { - bool custom = !strcmp(sel, _("custom")); + bool const custom = !strcmp(sel, _("custom")); + settings->paraspacingValue->setEnabled(custom); + settings->paraspacingStretch->setEnabled(custom); + settings->paraspacingShrink->setEnabled(custom); +} + +void DocDialog::addspaceChanged(bool on) +{ + settings->paraspacing->setEnabled(on); + on = (on && !strcmp(settings->paraspacing->currentText(), _("custom"))); + settings->paraspacingValue->setEnabled(on); + settings->paraspacingStretch->setEnabled(on); + settings->paraspacingShrink->setEnabled(on); } diff --git a/src/frontends/kde/docdlg.h b/src/frontends/kde/docdlg.h index 5ef5464c4d..5645d76356 100644 --- a/src/frontends/kde/docdlg.h +++ b/src/frontends/kde/docdlg.h @@ -1,24 +1,16 @@ -/* - * docdlg.h - * (C) 2001 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file docdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef DOCDLG_H #define DOCDLG_H #include #include -#include #include "dlg/docsettingsdlgdata.h" #include "dlg/docgeometrydlgdata.h" @@ -26,22 +18,22 @@ #include "dlg/docextradlgdata.h" #include "dlg/docbulletsdlgdata.h" #include "dlg/docdlgdata.h" - -#include "debug.h" + +#include "debug.h" class BufferParams; // to connect apply() and close() #include "FormDocument.h" -class DocDialog : public DocDialogData { - Q_OBJECT +class DocDialog : public DocDialogData { + Q_OBJECT public: - DocDialog(FormDocument *form, QWidget *parent=0, const char *name=0, + DocDialog(FormDocument * form, QWidget * parent=0, char const * name=0, bool modal=false, WFlags f=0); ~DocDialog(); - /** + /** * \fn setReadOnly * \brief set widgets read only status appropriately */ @@ -73,28 +65,33 @@ public: protected: void closeEvent(QCloseEvent *e); - + private: + /// for generating the float placement string + string DocDialog::placementString(QComboBox * box) const; + /// the form - FormDocument *form_; + FormDocument * form_; /// the settings page - DocSettingsDialogData *settings; + DocSettingsDialogData * settings; /// the geometry page - DocGeometryDialogData *geometry; + DocGeometryDialogData * geometry; /// the language page - DocLanguageDialogData *language; + DocLanguageDialogData * language; /// the extra page - DocExtraDialogData *extra; + DocExtraDialogData * extra; /// the bullets page - DocBulletsDialogData *bullets; + DocBulletsDialogData * bullets; private slots: - void skipspacingChanged(const char *sel); + void paraspacingChanged(const char * sel); - void linespacingChanged(const char *sel); + void linespacingChanged(const char * sel); + void addspaceChanged(bool on); + void ok_adaptor(void) { apply_adaptor(); form_->close(); @@ -117,4 +114,4 @@ private slots: }; -#endif +#endif // DOCDLG_H diff --git a/src/frontends/kde/indexdlg.C b/src/frontends/kde/indexdlg.C index 41b4a8dd5a..07332ef7f8 100644 --- a/src/frontends/kde/indexdlg.C +++ b/src/frontends/kde/indexdlg.C @@ -1,11 +1,10 @@ -/********************************************************************** - - --- Qt Architect generated file --- - - File: indexdlg.C - Last generated: Thu Sep 14 12:08:37 2000 - - *********************************************************************/ +/** + * \file indexdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ #include #include @@ -15,10 +14,8 @@ #include -#define Inherited IndexDialogData - -IndexDialog::IndexDialog(FormIndex * f, QWidget *p, const char* name) - : Inherited( p, name ), form_(f) +IndexDialog::IndexDialog(FormIndex * f, QWidget * p, char const * name) + : IndexDialogData(p, name), form_(f) { setCaption(name); @@ -27,8 +24,8 @@ IndexDialog::IndexDialog(FormIndex * f, QWidget *p, const char* name) QToolTip::add(labelindex,_("Index entry")); QToolTip::add(index,_("Index entry")); - setMinimumSize( 200, 65 ); - setMaximumSize( 32767, 65 ); + setMinimumSize(200, 65); + setMaximumSize(32767, 65); } @@ -39,29 +36,29 @@ IndexDialog::~IndexDialog() void IndexDialog::clickedOK() { - form_->apply(); - form_->close(); - hide(); + form_->apply(); + form_->close(); + hide(); } void IndexDialog::clickedCancel() { - form_->close(); - hide(); + form_->close(); + hide(); } void IndexDialog::setReadOnly(bool readonly) { - if (readonly) { - index->setFocusPolicy(QWidget::NoFocus); - buttonOk->setEnabled(false); - buttonCancel->setText(_("&Close")); - } else { - index->setFocusPolicy(QWidget::StrongFocus); - index->setFocus(); - buttonOk->setEnabled(true); - buttonCancel->setText(_("&Cancel")); - } + if (readonly) { + index->setFocusPolicy(QWidget::NoFocus); + buttonOk->setEnabled(false); + buttonCancel->setText(_("&Close")); + } else { + index->setFocusPolicy(QWidget::StrongFocus); + index->setFocus(); + buttonOk->setEnabled(true); + buttonCancel->setText(_("&Cancel")); + } } diff --git a/src/frontends/kde/indexdlg.h b/src/frontends/kde/indexdlg.h index bdc5462d39..82ea2f102a 100644 --- a/src/frontends/kde/indexdlg.h +++ b/src/frontends/kde/indexdlg.h @@ -1,14 +1,13 @@ -/********************************************************************** +/** + * \file indexdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ - --- Qt Architect generated file --- - - File: indexdlg.h - Last generated: Thu Sep 14 12:08:37 2000 - - *********************************************************************/ - -#ifndef IndexDialog_included -#define IndexDialog_included +#ifndef INDEXDIALOG_H +#define INDEXDIALOG_H #include "dlg/indexdlgdata.h" @@ -16,28 +15,22 @@ class FormIndex; class IndexDialog : public IndexDialogData { - Q_OBJECT +Q_OBJECT public: + IndexDialog (FormIndex * form, QWidget * parent = NULL, char const * name = NULL); + virtual ~IndexDialog(); - IndexDialog - ( - FormIndex *, QWidget* parent = NULL, - const char* name = NULL - ); - - virtual ~IndexDialog(); - - void setIndexText(const char * str) { index->setText(str); } - const char * getIndexText() { return index->text(); } - void setReadOnly(bool); + void setIndexText(char const * str) { index->setText(str); } + char const * getIndexText() { return index->text(); } + void setReadOnly(bool); private slots: - void clickedOK(); - void clickedCancel(); + void clickedOK(); + void clickedCancel(); private: - FormIndex *form_; + FormIndex * form_; }; -#endif // IndexDialog_included +#endif // INDEXDIALOG_H diff --git a/src/frontends/kde/logdlg.C b/src/frontends/kde/logdlg.C new file mode 100644 index 0000000000..eeed8f72b5 --- /dev/null +++ b/src/frontends/kde/logdlg.C @@ -0,0 +1,49 @@ +/** + * \file logdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + +#include "FormLog.h" + +#include "logdlg.h" + +#include + +#include "debug.h" +#include + +LogDialog::LogDialog (DialogBase * f, QWidget * parent, char const * name) + : LogDialogData(parent, name), form_(f) +{ + viewer->setMinimumWidth(50); + viewer->setMinimumHeight(50); +} + + +LogDialog::~LogDialog() +{ +} + + +void LogDialog::setLogText(string const & text) +{ + setUpdatesEnabled(false); + viewer->setText(text.c_str()); + setUpdatesEnabled(true); + update(); +} + +void LogDialog::closePressed() +{ + form_->close(); + hide(); +} + + +void LogDialog::updatePressed() +{ + form_->update(); +} diff --git a/src/frontends/kde/logdlg.h b/src/frontends/kde/logdlg.h new file mode 100644 index 0000000000..2f28efd3f7 --- /dev/null +++ b/src/frontends/kde/logdlg.h @@ -0,0 +1,35 @@ +/** + * \file logdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + +#ifndef LOGDLG_H +#define LOGDLG_H + +#include +#include "support/lstrings.h" + +#include "dlg/logdlgdata.h" + +class DialogBase; + +class LogDialog : public LogDialogData +{ + Q_OBJECT + +public: + LogDialog (DialogBase * f, QWidget * parent = NULL, char const * name = NULL); + + virtual ~LogDialog(); + + void setLogText(string const & text); +private: + DialogBase * form_; +protected slots: + virtual void closePressed(); + virtual void updatePressed(); +}; +#endif // LOGDLG_H diff --git a/src/frontends/kde/moc/Makefile.am b/src/frontends/kde/moc/Makefile.am index 2341664339..418c2473ac 100644 --- a/src/frontends/kde/moc/Makefile.am +++ b/src/frontends/kde/moc/Makefile.am @@ -9,6 +9,7 @@ libkdemoc_la_SOURCES = citationdlg_moc.C \ copyrightdlg_moc.C \ docdlg_moc.C \ indexdlg_moc.C \ + logdlg_moc.C \ paradlg_moc.C \ parageneraldlg_moc.C \ paraextradlg_moc.C \ @@ -31,6 +32,8 @@ docdlg_moc.C: ../docdlg.h $(MOC) $< -o $@ indexdlg_moc.C: ../indexdlg.h $(MOC) $< -o $@ +logdlg_moc.C: ../logdlg.h + $(MOC) $< -o $@ paradlg_moc.C: ../paradlg.h $(MOC) $< -o $@ parageneraldlg_moc.C: ../parageneraldlg.h diff --git a/src/frontends/kde/paradlg.C b/src/frontends/kde/paradlg.C index 8c409c0194..3bc8297b7e 100644 --- a/src/frontends/kde/paradlg.C +++ b/src/frontends/kde/paradlg.C @@ -1,20 +1,13 @@ -/* - * paradlg.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file paradlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include -#include "support/lstrings.h" +#include "support/lstrings.h" #include "dlg/helpers.h" #include "dlg/lengthentry.h" @@ -30,31 +23,39 @@ using kde_helpers::setSizeHint; using std::endl; -ParaDialog::ParaDialog(FormParagraph *form, QWidget *parent, const char *name, bool, WFlags) +ParaDialog::ParaDialog(FormParagraph * form, QWidget * parent, char const * name, bool, WFlags) : ParaDialogData(parent,name), form_(form) { setCaption(name); + setUpdatesEnabled(false); + generalpage = new ParaGeneralDialog(this, "generalpage"); extrapage = new ParaExtraDialog(this, "extrapage"); tabstack->addTabPage(generalpage, _("&General")); tabstack->addTabPage(extrapage, _("&Extra")); + + setUpdatesEnabled(true); + update(); } + ParaDialog::~ParaDialog() { } -void ParaDialog::closeEvent(QCloseEvent *e) + +void ParaDialog::closeEvent(QCloseEvent * e) { form_->close(); e->accept(); } + void ParaDialog::setReadOnly(bool readonly) { - generalpage->alignment->setEnabled(!readonly); + generalpage->justification->setEnabled(!readonly); generalpage->lineabove->setEnabled(!readonly); generalpage->linebelow->setEnabled(!readonly); generalpage->abovepage->pagebreakabove->setEnabled(!readonly); @@ -70,10 +71,6 @@ void ParaDialog::setReadOnly(bool readonly) generalpage->belowpage->spacebelowplus->setEnabled(!readonly); generalpage->abovepage->spaceaboveminus->setEnabled(!readonly); generalpage->belowpage->spacebelowminus->setEnabled(!readonly); - generalpage->block->setEnabled(!readonly); - generalpage->left->setEnabled(!readonly); - generalpage->right->setEnabled(!readonly); - generalpage->center->setEnabled(!readonly); generalpage->labelwidth->setEnabled(!readonly); extrapage->specialalignment->setEnabled(!readonly); extrapage->type->setEnabled(!readonly); @@ -90,7 +87,8 @@ void ParaDialog::setReadOnly(bool readonly) cancel->setText(readonly ? _("&Close") : _("&Cancel")); } -void ParaDialog::setLabelWidth(const char *text) + +void ParaDialog::setLabelWidth(char const * text) { // FIXME: should be cleverer here if (!strcmp(_("Senseless with this layout!"),text)) { @@ -102,33 +100,30 @@ void ParaDialog::setLabelWidth(const char *text) } } + void ParaDialog::setAlign(int type) { switch (type) { - case LYX_ALIGN_RIGHT: - generalpage->right->setChecked(true); - break; - case LYX_ALIGN_LEFT: - generalpage->left->setChecked(true); - break; - case LYX_ALIGN_CENTER: - generalpage->center->setChecked(true); - break; - default: // ewww - generalpage->block->setChecked(true); - break; + case LYX_ALIGN_RIGHT: type = 3; break; + case LYX_ALIGN_LEFT: type = 2; break; + case LYX_ALIGN_CENTER: type = 1; break; + default: type = 0; break; } + + generalpage->justification->setCurrentItem(type); } + void ParaDialog::setChecks(bool labove, bool lbelow, bool pabove, bool pbelow, bool noindent) { generalpage->lineabove->setChecked(labove); generalpage->linebelow->setChecked(lbelow); - generalpage->abovepage->pagebreakabove->setChecked(pabove); - generalpage->belowpage->pagebreakbelow->setChecked(pbelow); + generalpage->abovepage->pagebreakabove->setChecked(pabove); + generalpage->belowpage->pagebreakbelow->setChecked(pbelow); generalpage->noindent->setChecked(noindent); } + void ParaDialog::setSpace(VSpace::vspace_kind kindabove, VSpace::vspace_kind kindbelow, bool keepabove, bool keepbelow) { int item=0; @@ -154,7 +149,7 @@ void ParaDialog::setSpace(VSpace::vspace_kind kindabove, VSpace::vspace_kind kin case VSpace::LENGTH: item = 6; break; } generalpage->belowpage->spacebelow->setCurrentItem(item); - + generalpage->abovepage->spaceabovevalue->setEnabled(kindabove == VSpace::LENGTH); generalpage->abovepage->spaceaboveplus->setEnabled(kindabove == VSpace::LENGTH); generalpage->abovepage->spaceaboveminus->setEnabled(kindabove == VSpace::LENGTH); @@ -166,53 +161,55 @@ void ParaDialog::setSpace(VSpace::vspace_kind kindabove, VSpace::vspace_kind kin generalpage->belowpage->keepbelow->setChecked(keepbelow); } -void ParaDialog::setAboveLength(float val, float plus, float minus, + +void ParaDialog::setAboveLength(float val, float plus, float minus, LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit) { - if (vunit==LyXLength::UNIT_NONE) { + if (vunit == LyXLength::UNIT_NONE) { generalpage->abovepage->spaceabovevalue->setValue(""); generalpage->abovepage->spaceaboveplus->setValue(""); generalpage->abovepage->spaceaboveminus->setValue(""); - } else { + } else { generalpage->abovepage->spaceabovevalue->setValue(tostr(val)); generalpage->abovepage->spaceaboveplus->setValue(tostr(plus)); generalpage->abovepage->spaceaboveminus->setValue(tostr(minus)); } - + generalpage->abovepage->spaceabovevalue->setUnits(vunit); generalpage->abovepage->spaceaboveplus->setUnits(punit); generalpage->abovepage->spaceaboveminus->setUnits(munit); } -void ParaDialog::setBelowLength(float val, float plus, float minus, + +void ParaDialog::setBelowLength(float val, float plus, float minus, LyXLength::UNIT vunit, LyXLength::UNIT punit, LyXLength::UNIT munit) { - if (vunit==LyXLength::UNIT_NONE) { + if (vunit == LyXLength::UNIT_NONE) { generalpage->belowpage->spacebelowvalue->setValue(""); generalpage->belowpage->spacebelowplus->setValue(""); generalpage->belowpage->spacebelowminus->setValue(""); - } else { + } else { generalpage->belowpage->spacebelowvalue->setValue(tostr(val)); generalpage->belowpage->spacebelowplus->setValue(tostr(plus)); generalpage->belowpage->spacebelowminus->setValue(tostr(minus)); } - + generalpage->belowpage->spacebelowvalue->setUnits(vunit); generalpage->belowpage->spacebelowplus->setUnits(punit); generalpage->belowpage->spacebelowminus->setUnits(munit); } -void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string percent, int align, + +void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string percent, int align, bool hfill, bool startminipage, LyXParagraph::PEXTRA_TYPE type) { - if (type!=LyXParagraph::PEXTRA_NONE) { lyxerr[Debug::GUI] << "percent : $" << percent << "$ widthval " << widthval << " unit " << long(units) << endl; if (percent != "") { extrapage->widthvalue->setText(percent.c_str()); extrapage->widthvalueunits->setCurrentItem(11); } else { - int unit = 0; + int unit = 0; extrapage->widthvalue->setText(tostr(widthval).c_str()); switch (units) { case LyXLength::CM: unit = 0; break; @@ -230,7 +227,7 @@ void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string pe case LyXLength::UNIT_NONE: unit = 0; break; default: lyxerr[Debug::GUI] << "Unknown unit " << long(units) << endl; - } + } extrapage->widthvalueunits->setCurrentItem(unit); } } else @@ -262,20 +259,21 @@ void ParaDialog::setExtra(float widthval, LyXLength::UNIT units, const string pe switch (type) { case LyXParagraph::PEXTRA_NONE: - extrapage->type->setCurrentItem(0); + extrapage->type->setCurrentItem(0); break; case LyXParagraph::PEXTRA_INDENT: - extrapage->type->setCurrentItem(1); + extrapage->type->setCurrentItem(1); break; case LyXParagraph::PEXTRA_MINIPAGE: - extrapage->type->setCurrentItem(2); + extrapage->type->setCurrentItem(2); break; case LyXParagraph::PEXTRA_FLOATFLT: - extrapage->type->setCurrentItem(3); + extrapage->type->setCurrentItem(3); break; } } + LyXGlueLength ParaDialog::getAboveLength() const { LyXGlueLength len( @@ -290,6 +288,7 @@ LyXGlueLength ParaDialog::getAboveLength() const return len; } + LyXGlueLength ParaDialog::getBelowLength() const { LyXGlueLength len( @@ -304,11 +303,12 @@ LyXGlueLength ParaDialog::getBelowLength() const return len; } + LyXLength ParaDialog::getExtraWidth() const { - if (extrapage->widthvalueunits->currentItem()!=11) { - LyXLength::UNIT unit = LyXLength::CM; + if (extrapage->widthvalueunits->currentItem() != 11) { + LyXLength::UNIT unit = LyXLength::CM; switch (extrapage->widthvalueunits->currentItem()) { case 0: unit = LyXLength::CM; break; case 1: unit = LyXLength::IN; break; @@ -321,7 +321,7 @@ LyXLength ParaDialog::getExtraWidth() const case 8: unit = LyXLength::BP; break; case 9: unit = LyXLength::DD; break; case 10: unit = LyXLength::CC; break; - case 11: unit = LyXLength::CM; break; + case 11: unit = LyXLength::CM; break; default: lyxerr[Debug::GUI] << "Unknown unit " << extrapage->widthvalueunits->currentItem() << endl; } @@ -333,10 +333,11 @@ LyXLength ParaDialog::getExtraWidth() const } } + string ParaDialog::getExtraWidthPercent() const { - double val = strToDbl(extrapage->widthvalue->text()); - if (val > 100.0) + double val = strToDbl(extrapage->widthvalue->text()); + if (val > 100.0) val = 100.0; if (val < 0.0) val = 0.0; diff --git a/src/frontends/kde/paradlg.h b/src/frontends/kde/paradlg.h index 276295a297..2b22d51273 100644 --- a/src/frontends/kde/paradlg.h +++ b/src/frontends/kde/paradlg.h @@ -1,33 +1,23 @@ -/* - * paradlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file paradlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef PARADLG_H #define PARADLG_H #include #include -#include #include "parageneraldlg.h" #include "paraextradlg.h" - -//#include - -#include "vspace.h" + +#include "vspace.h" #include "lyxparagraph.h" -#include "debug.h" +#include "debug.h" #include "dlg/paradlgdata.h" @@ -35,14 +25,14 @@ #include "FormParagraph.h" class ParaDialog : public ParaDialogData { - Q_OBJECT + Q_OBJECT public: - ParaDialog(FormParagraph *form, QWidget *parent=0, const char *name=0, + ParaDialog(FormParagraph * form, QWidget * parent=0, char const * name=0, bool modal=false, WFlags f=0); ~ParaDialog(); void setReadOnly(bool); - void setLabelWidth(const char *); + void setLabelWidth(char const *); void setAlign(int); void setChecks(bool, bool, bool, bool, bool); void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool); @@ -50,19 +40,18 @@ public: void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT); void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, LyXParagraph::PEXTRA_TYPE); - const char *getLabelWidth() const { + char const * getLabelWidth() const { return generalpage->labelwidth->text(); } LyXAlignment getAlign() const { - if (generalpage->right->isChecked()) - return LYX_ALIGN_RIGHT; - else if (generalpage->left->isChecked()) - return LYX_ALIGN_LEFT; - else if (generalpage->center->isChecked()) - return LYX_ALIGN_CENTER; - else - return LYX_ALIGN_BLOCK; + switch (generalpage->justification->currentItem()) { + case 0: return LYX_ALIGN_BLOCK; + case 1: return LYX_ALIGN_CENTER; + case 2: return LYX_ALIGN_LEFT; + case 3: return LYX_ALIGN_RIGHT; + } + return LYX_ALIGN_BLOCK; } bool getAboveKeep() const { @@ -76,7 +65,7 @@ public: bool getLineAbove() const { return generalpage->lineabove->isChecked(); } - + bool getLineBelow() const { return generalpage->linebelow->isChecked(); } @@ -96,7 +85,7 @@ public: VSpace::vspace_kind getSpaceAboveKind() const { return getSpaceKind(generalpage->abovepage->spaceabove->currentItem()); } - + VSpace::vspace_kind getSpaceBelowKind() const { return getSpaceKind(generalpage->belowpage->spacebelow->currentItem()); } @@ -136,15 +125,15 @@ public: } protected: - void closeEvent(QCloseEvent *e); - + void closeEvent(QCloseEvent * e); + private: - FormParagraph *form_; + FormParagraph * form_; /// the general tab page - ParaGeneralDialog *generalpage; + ParaGeneralDialog * generalpage; /// the extra options tab page - ParaExtraDialog *extrapage; + ParaExtraDialog * extrapage; VSpace::vspace_kind getSpaceKind(int val) const { switch (val) { @@ -185,4 +174,4 @@ private slots: }; -#endif +#endif // PARADLG_H diff --git a/src/frontends/kde/paraextradlg.C b/src/frontends/kde/paraextradlg.C index fe819d32f5..f5e75515da 100644 --- a/src/frontends/kde/paraextradlg.C +++ b/src/frontends/kde/paraextradlg.C @@ -1,11 +1,10 @@ -/********************************************************************** - - --- Qt Architect generated file --- - - File: paraextradlg.C - Last generated: Sat Oct 14 00:27:49 2000 - - *********************************************************************/ +/** + * \file paraextradlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ #include #include "paraextradlg.h" @@ -20,15 +19,8 @@ using kde_helpers::setSizeHint; #endif -#define Inherited ParaExtraDialogData - -ParaExtraDialog::ParaExtraDialog -( - QWidget* parent, - const char* name -) - : - Inherited( parent, name ) +ParaExtraDialog::ParaExtraDialog (QWidget * parent, char const * name) + : ParaExtraDialogData(parent, name) { type->insertItem(_("Normal")); type->insertItem(_("Indented paragraph")); @@ -54,18 +46,20 @@ ParaExtraDialog::ParaExtraDialog QToolTip::add(startnewminipage, _("FIXME please !")); } + ParaExtraDialog::~ParaExtraDialog() { } + void ParaExtraDialog::typeHighlighted(int val) { - specialalignment->setEnabled(val==2); - top->setEnabled(val==2); - middle->setEnabled(val==2); - bottom->setEnabled(val==2); - widthvalue->setEnabled(val!=0); - widthvalueunits->setEnabled(val!=0); - hfillbetween->setEnabled(val==2); - startnewminipage->setEnabled(val==2); + specialalignment->setEnabled(val == 2); + top->setEnabled(val == 2); + middle->setEnabled(val == 2); + bottom->setEnabled(val == 2); + widthvalue->setEnabled(val != 0); + widthvalueunits->setEnabled(val != 0); + hfillbetween->setEnabled(val == 2); + startnewminipage->setEnabled(val == 2); } diff --git a/src/frontends/kde/paraextradlg.h b/src/frontends/kde/paraextradlg.h index 4b1ac1a85e..49411b9eae 100644 --- a/src/frontends/kde/paraextradlg.h +++ b/src/frontends/kde/paraextradlg.h @@ -1,14 +1,13 @@ -/********************************************************************** +/** + * \file paraextradlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ - --- Qt Architect generated file --- - - File: paraextradialog.h - Last generated: Sat Oct 14 00:27:49 2000 - - *********************************************************************/ - -#ifndef ParaExtraDialog_included -#define ParaExtraDialog_included +#ifndef PARAEXTRADIALOG_H +#define PARAEXTRADIALOG_H #include "dlg/paraextradlgdata.h" @@ -16,23 +15,18 @@ class ParaDialog; class ParaExtraDialog : public ParaExtraDialogData { - Q_OBJECT + Q_OBJECT public: + ParaExtraDialog (QWidget * parent = NULL, char const * name = NULL); - ParaExtraDialog - ( - QWidget* parent = NULL, - const char* name = NULL - ); + virtual ~ParaExtraDialog(); - virtual ~ParaExtraDialog(); - - friend class ParaDialog; + friend class ParaDialog; protected slots: - void typeHighlighted(int); + void typeHighlighted(int); }; -#endif // ParaExtraDialog_included +#endif // PARAEXTRADIALOG_H diff --git a/src/frontends/kde/parageneraldlg.C b/src/frontends/kde/parageneraldlg.C index d08a262963..06d36daed8 100644 --- a/src/frontends/kde/parageneraldlg.C +++ b/src/frontends/kde/parageneraldlg.C @@ -1,11 +1,10 @@ -/********************************************************************** - - --- Qt Architect generated file --- - - File: parageneraldlg.C - Last generated: Sat Oct 14 00:27:47 2000 - - *********************************************************************/ +/** + * \file parageneraldlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ #include #include "parageneraldlg.h" @@ -16,19 +15,12 @@ #include -#define Inherited ParaGeneralDialogData - #ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; #endif -ParaGeneralDialog::ParaGeneralDialog -( - QWidget* parent, - const char* name -) - : - Inherited( parent, name ) +ParaGeneralDialog::ParaGeneralDialog (QWidget * parent, char const * name) + : ParaGeneralDialogData(parent, name) { abovepage = new ParaAboveDialogData(this, "abovepage"); @@ -46,21 +38,25 @@ ParaGeneralDialog::ParaGeneralDialog abovepage->spaceabove->insertItem(_("Medium skip")); abovepage->spaceabove->insertItem(_("Big skip")); abovepage->spaceabove->insertItem(_("VFill")); - abovepage->spaceabove->insertItem(_("Length")); + abovepage->spaceabove->insertItem(_("Custom")); setSizeHint(abovepage->spaceabove); + belowpage->spacebelow->insertItem(_("None")); belowpage->spacebelow->insertItem(_("Defskip")); belowpage->spacebelow->insertItem(_("Small skip")); belowpage->spacebelow->insertItem(_("Medium skip")); belowpage->spacebelow->insertItem(_("Big skip")); belowpage->spacebelow->insertItem(_("VFill")); - belowpage->spacebelow->insertItem(_("Length")); + belowpage->spacebelow->insertItem(_("Custom")); setSizeHint(belowpage->spacebelow); - QToolTip::add(block, _("Alignment of current paragraph")); - QToolTip::add(center, _("Alignment of current paragraph")); - QToolTip::add(left, _("Alignment of current paragraph")); - QToolTip::add(right, _("Alignment of current paragraph")); + justification->insertItem(_("Block")); + justification->insertItem(_("Centered")); + justification->insertItem(_("Left")); + justification->insertItem(_("Right")); + setSizeHint(justification); + + QToolTip::add(justification, _("Alignment of current paragraph")); QToolTip::add(noindent, _("No indent on first line of paragraph")); QToolTip::add(labelwidth, _("FIXME please !")); @@ -77,10 +73,12 @@ ParaGeneralDialog::ParaGeneralDialog QToolTip::add(belowpage->spacebelowminus, _("Minimum space required")); } + ParaGeneralDialog::~ParaGeneralDialog() { } + void ParaGeneralDialog::spaceaboveHighlighted(int val) { abovepage->spaceabovevalue->setEnabled(val == 6); @@ -88,6 +86,7 @@ void ParaGeneralDialog::spaceaboveHighlighted(int val) abovepage->spaceaboveminus->setEnabled(val == 6); } + void ParaGeneralDialog::spacebelowHighlighted(int val) { belowpage->spacebelowvalue->setEnabled(val == 6); diff --git a/src/frontends/kde/parageneraldlg.h b/src/frontends/kde/parageneraldlg.h index 562497fad2..7ee2016eac 100644 --- a/src/frontends/kde/parageneraldlg.h +++ b/src/frontends/kde/parageneraldlg.h @@ -1,11 +1,13 @@ -/* - * parageneraldlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file parageneraldlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ - -#ifndef ParaGeneralDialog_included -#define ParaGeneralDialog_included + +#ifndef PARAGENERALDIALOG_H +#define PARAGENERALDIALOG_H #include "dlg/parageneraldlgdata.h" #include "dlg/paraabovedlgdata.h" @@ -15,11 +17,11 @@ class ParaDialog; class ParaGeneralDialog : public ParaGeneralDialogData { - Q_OBJECT + Q_OBJECT public: - ParaGeneralDialog (QWidget* parent = NULL, const char* name = NULL); + ParaGeneralDialog(QWidget * parent = NULL, char const * name = NULL); virtual ~ParaGeneralDialog(); @@ -31,8 +33,8 @@ protected slots: void spacebelowHighlighted(int); private: - ParaAboveDialogData *abovepage; - ParaBelowDialogData *belowpage; + ParaAboveDialogData * abovepage; + ParaBelowDialogData * belowpage; }; -#endif // ParaGeneralDialog_included +#endif // PARAGENERALDIALOG_H diff --git a/src/frontends/kde/printdlg.C b/src/frontends/kde/printdlg.C index e7bd68fef2..3806228008 100644 --- a/src/frontends/kde/printdlg.C +++ b/src/frontends/kde/printdlg.C @@ -1,7 +1,9 @@ -/* - * printdlg.C - * (C) 2000, LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file printdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ #include @@ -18,9 +20,7 @@ #define Inherited PrintDialogData -/* FIXME: tab order is out of whack */ - -PrintDialog::PrintDialog(FormPrint *f, QWidget* parent, const char * name) +PrintDialog::PrintDialog(FormPrint * f, QWidget * parent, char const * name) : PrintDialogData(parent, name), form_(f) { setCaption(name); @@ -37,10 +37,12 @@ PrintDialog::PrintDialog(FormPrint *f, QWidget* parent, const char * name) QToolTip::add(browse, _("Select output filename")); } + PrintDialog::~PrintDialog() { } + void PrintDialog::clickedBrowse() { // FIXME: move into utility class later, accept URLs etc. @@ -51,7 +53,8 @@ void PrintDialog::clickedBrowse() filename->setText(filedlg.selectedFile().data()); } -void PrintDialog::changedCount(const char *text) + +void PrintDialog::changedCount(char const * text) { if (strcmp("",text) && strToInt(text) == 0) { count->setText("1"); diff --git a/src/frontends/kde/printdlg.h b/src/frontends/kde/printdlg.h index 1eaeb59a6e..8e8172b59d 100644 --- a/src/frontends/kde/printdlg.h +++ b/src/frontends/kde/printdlg.h @@ -1,9 +1,11 @@ -/* - * printdlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk - */ - +/** + * \file printdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon + */ + #ifndef PRINTDLG_H #define PRINTDLG_H @@ -19,14 +21,14 @@ class PrintDialog : public PrintDialogData Q_OBJECT public: - PrintDialog(FormPrint *f, QWidget* parent = NULL, const char* name = NULL); + PrintDialog(FormPrint * f, QWidget * parent = NULL, char const * name = NULL); virtual ~PrintDialog(); - const char *getFrom() { + char const * getFrom() { return from->text(); } - const char *getTo() { + char const * getTo() { return to->text(); } @@ -37,11 +39,11 @@ public: return PrinterParams::FILE; } - const char *getPrinter() { + char const * getPrinter() { return printername->text(); } - const char *getFile() { + char const * getFile() { return filename->text(); } @@ -62,20 +64,20 @@ public: return sort->isChecked(); } - const char *getCount() { + char const * getCount() { return count->text(); } void setTarget(PrinterParams::Target t) { - toprinter->setChecked(t==PrinterParams::PRINTER); - tofile->setChecked(t!=PrinterParams::PRINTER); + toprinter->setChecked(t == PrinterParams::PRINTER); + tofile->setChecked(t != PrinterParams::PRINTER); } - void setPrinter(const char *name) { + void setPrinter(char const * name) { printername->setText(name); } - void setFile(const char *name) { + void setFile(char const * name) { filename->setText(name); } @@ -106,15 +108,16 @@ public: sort->setEnabled(num > 1); } - void setFrom(const char *text) { + void setFrom(char const * text) { from->setText(text); } - void setTo(const char *text) { + void setTo(char const * text) { to->setText(text); } protected slots: + void clickedCancel() { form_->close(); hide(); @@ -130,9 +133,9 @@ protected slots: void clickedBrowse(); /// validate and change collate status - void changedCount(const char *text); + void changedCount(char const * text); private: - FormPrint *form_; + FormPrint * form_; }; #endif // PRINTDLG_H diff --git a/src/frontends/kde/refdlg.C b/src/frontends/kde/refdlg.C index 032442f3a3..fbd8097faa 100644 --- a/src/frontends/kde/refdlg.C +++ b/src/frontends/kde/refdlg.C @@ -1,30 +1,23 @@ -/* - * refdlg.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file refdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include + #include "refdlg.h" #include "dlg/helpers.h" #include "insets/insetref.h" - #ifdef CXX_WORKING_NAMESPACES using kde_helpers::setSizeHint; #endif -RefDialog::RefDialog(FormRef *form, QWidget *parent, const char *name, bool, WFlags) - : QWidget(parent,name,0), form_(form) +RefDialog::RefDialog(FormRef * form, QWidget * parent, char const * name, bool, WFlags) + : QDialog(parent,name,0), form_(form) { setCaption(name); @@ -163,7 +156,7 @@ RefDialog::RefDialog(FormRef *form, QWidget *parent, const char *name, bool, WFl // connections - connect(refs, SIGNAL(highlighted(const char *)), this, SLOT(highlight_adaptor(const char *))); + connect(refs, SIGNAL(highlighted(const char *)), this, SLOT(highlight_adaptor(const char *))); connect(refs, SIGNAL(selected(const char *)), this, SLOT(select_adaptor(const char *))); connect(sort, SIGNAL(toggled(bool)), this, SLOT(sort_adaptor(bool))); connect(buttonOk, SIGNAL(clicked()), this, SLOT(apply_adaptor())); @@ -174,11 +167,13 @@ RefDialog::RefDialog(FormRef *form, QWidget *parent, const char *name, bool, WFl resize(sizeHint()); } + RefDialog::~RefDialog() { } -void RefDialog::closeEvent(QCloseEvent *e) + +void RefDialog::closeEvent(QCloseEvent * e) { form_->close(); e->accept(); diff --git a/src/frontends/kde/refdlg.h b/src/frontends/kde/refdlg.h index 47270e38bb..5fa6437cdf 100644 --- a/src/frontends/kde/refdlg.h +++ b/src/frontends/kde/refdlg.h @@ -1,18 +1,11 @@ -/* - * refdlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file refdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef REFDLG_H #define REFDLG_H @@ -21,6 +14,7 @@ #include "FormRef.h" +#include #include #include #include @@ -30,54 +24,54 @@ #include #include -class RefDialog : public QWidget { - Q_OBJECT +class RefDialog : public QDialog { + Q_OBJECT public: - RefDialog(FormRef *form, QWidget *parent=0, const char *name=0, + RefDialog(FormRef * form, QWidget * parent=0, char const * name=0, bool modal=false, WFlags f=0); ~RefDialog(); // widgets - QListBox *refs; - QLabel *labelrefs; - QLineEdit *refname; - QLineEdit *reference; - QLabel *labelrefname; - QLabel *labelreference; - QCheckBox *sort; - QComboBox *type; - QLabel *labeltype; - QPushButton *buttonGoto; - QPushButton *buttonUpdate; - QPushButton *buttonOk; - QPushButton *buttonCancel; + QListBox * refs; + QLabel * labelrefs; + QLineEdit * refname; + QLineEdit * reference; + QLabel * labelrefname; + QLabel * labelreference; + QCheckBox * sort; + QComboBox * type; + QLabel * labeltype; + QPushButton * buttonGoto; + QPushButton * buttonUpdate; + QPushButton * buttonOk; + QPushButton * buttonCancel; protected: - void closeEvent(QCloseEvent *e); + void closeEvent(QCloseEvent * e); private: - FormRef *form_; + FormRef * form_; // layouts - QHBoxLayout *topLayout; - QVBoxLayout *layout; - QHBoxLayout *upperLayout; - QVBoxLayout *browserLayout; - QVBoxLayout *rightLayout; - QHBoxLayout *nameLayout; - QHBoxLayout *referenceLayout; - QHBoxLayout *buttonLayout; + QHBoxLayout * topLayout; + QVBoxLayout * layout; + QHBoxLayout * upperLayout; + QVBoxLayout * browserLayout; + QVBoxLayout * rightLayout; + QHBoxLayout * nameLayout; + QHBoxLayout * referenceLayout; + QHBoxLayout * buttonLayout; private slots: /// adaptor to FormRef::select - void select_adaptor(const char *sel) { + void select_adaptor(const char * sel) { form_->select(sel); } /// adaptor to FormRef::highlight - void highlight_adaptor(const char *sel) { + void highlight_adaptor(const char * sel) { form_->highlight(sel); } @@ -110,4 +104,4 @@ private slots: } }; -#endif +#endif // REFDLG_H diff --git a/src/frontends/kde/tabcreatedlg.C b/src/frontends/kde/tabcreatedlg.C index 57a02a627d..c563cb23b2 100644 --- a/src/frontends/kde/tabcreatedlg.C +++ b/src/frontends/kde/tabcreatedlg.C @@ -1,7 +1,9 @@ -/* - * tabcreatedlg.C - * (C) 2000 LyX Team - * John Levon, +/** + * \file tabcreatedlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ #include @@ -11,7 +13,7 @@ #include #include -TabularCreateDialog::TabularCreateDialog (FormTabularCreate *form, QWidget *parent, const char* name) +TabularCreateDialog::TabularCreateDialog (FormTabularCreate * form, QWidget * parent, char const * name) : TabularCreateDialogData(parent, name), form_(form) { setCaption(name); @@ -25,28 +27,33 @@ TabularCreateDialog::TabularCreateDialog (FormTabularCreate *form, QWidget *pare QToolTip::add(table, _("Drag with left mouse button to resize")); } + TabularCreateDialog::~TabularCreateDialog() { } + void TabularCreateDialog::colsChanged(unsigned int nr_cols) { if (nr_cols != strToUnsignedInt(cols->text())) cols->setValue(nr_cols); } + void TabularCreateDialog::rowsChanged(unsigned int nr_rows) { if (nr_rows != strToUnsignedInt(rows->text())) rows->setValue(nr_rows); } + void TabularCreateDialog::clickedInsert() { form_->apply(strToInt(rows->text()), strToInt(cols->text())); form_->close(); hide(); } + void TabularCreateDialog::clickedCancel() { diff --git a/src/frontends/kde/tabcreatedlg.h b/src/frontends/kde/tabcreatedlg.h index 3a3737f87e..3c42cacc79 100644 --- a/src/frontends/kde/tabcreatedlg.h +++ b/src/frontends/kde/tabcreatedlg.h @@ -1,7 +1,9 @@ -/* - * tabcreatedialog.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file tabcreatedlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ #ifndef TABCREATEDIALOG_H @@ -12,9 +14,9 @@ class TabularCreateDialog : public TabularCreateDialogData { - Q_OBJECT + Q_OBJECT public: - TabularCreateDialog (FormTabularCreate *form, QWidget* parent = 0, const char *name = 0); + TabularCreateDialog (FormTabularCreate * form, QWidget * parent = 0, char const * name = 0); virtual ~TabularCreateDialog(); protected slots: @@ -24,6 +26,6 @@ protected slots: virtual void rowsChanged(unsigned int); private: - FormTabularCreate *form_; + FormTabularCreate * form_; }; -#endif +#endif // TABCREATEDIALOG_H diff --git a/src/frontends/kde/tocdlg.C b/src/frontends/kde/tocdlg.C index f30315289e..d5f5e5e8ef 100644 --- a/src/frontends/kde/tocdlg.C +++ b/src/frontends/kde/tocdlg.C @@ -1,18 +1,11 @@ -/* - * tocdlg.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file tocdlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "tocdlg.h" @@ -22,8 +15,8 @@ using kde_helpers::setSizeHint; #endif -TocDialog::TocDialog(FormToc *form, QWidget *parent, const char *name, bool, WFlags) - : QWidget(parent,name,0), form_(form) +TocDialog::TocDialog(FormToc * form, QWidget * parent, char const * name, bool, WFlags) + : QDialog(parent,name,0), form_(form) { setCaption(name); setMinimumWidth(350); @@ -97,12 +90,14 @@ TocDialog::TocDialog(FormToc *form, QWidget *parent, const char *name, bool, WFl resize(sizeHint()); } -void TocDialog::closeEvent(QCloseEvent *e) + +void TocDialog::closeEvent(QCloseEvent * e) { form_->close(); e->accept(); } + TocDialog::~TocDialog() { } diff --git a/src/frontends/kde/tocdlg.h b/src/frontends/kde/tocdlg.h index e21b0d8064..e185fb99c9 100644 --- a/src/frontends/kde/tocdlg.h +++ b/src/frontends/kde/tocdlg.h @@ -1,18 +1,11 @@ -/* - * tocdlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file tocdlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef TOCDLG_H #define TOCDLG_H @@ -30,37 +23,37 @@ #include "FormToc.h" -class TocDialog : public QWidget { - Q_OBJECT +class TocDialog : public QDialog { + Q_OBJECT public: - TocDialog(FormToc *form, QWidget *parent=0, const char *name=0, + TocDialog(FormToc * form, QWidget * parent=0, char const * name=0, bool modal=false, WFlags f=0); ~TocDialog(); // widgets - QComboBox *menu; - QListView *tree; - QPushButton *buttonUpdate; - QPushButton *buttonClose; - QSlider *depth; - QLabel *depthlabel; + QComboBox * menu; + QListView * tree; + QPushButton * buttonUpdate; + QPushButton * buttonClose; + QSlider * depth; + QLabel * depthlabel; protected: - void closeEvent(QCloseEvent *e); + void closeEvent(QCloseEvent * e); private: - FormToc *form_; + FormToc * form_; // layouts - QHBoxLayout *topLayout; - QVBoxLayout *layout; - QHBoxLayout *buttonLayout; + QHBoxLayout * topLayout; + QVBoxLayout * layout; + QHBoxLayout * buttonLayout; private slots: /// adaptor to FormToc::select - void select_adaptor(QListViewItem *item) { + void select_adaptor(QListViewItem * item) { form_->select(item->text(0)); } @@ -102,4 +95,4 @@ private slots: } }; -#endif +#endif // TOCDLG_H diff --git a/src/frontends/kde/urldlg.C b/src/frontends/kde/urldlg.C index e18eeb757e..d25b4271af 100644 --- a/src/frontends/kde/urldlg.C +++ b/src/frontends/kde/urldlg.C @@ -1,18 +1,11 @@ -/* - * urldlg.C - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file urldlg.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include #include "urldlg.h" @@ -22,8 +15,8 @@ using kde_helpers::setSizeHint; #endif -UrlDialog::UrlDialog(FormUrl *form, QWidget *parent, const char *name, bool, WFlags) - : QWidget(parent,name,0), form_(form) +UrlDialog::UrlDialog(FormUrl *form, QWidget *parent, char const * name, bool, WFlags) + : QDialog(parent,name,0), form_(form) { setCaption(name); @@ -112,11 +105,13 @@ UrlDialog::UrlDialog(FormUrl *form, QWidget *parent, const char *name, bool, WFl resize(sizeHint()); } + UrlDialog::~UrlDialog() { } -void UrlDialog::closeEvent(QCloseEvent *e) + +void UrlDialog::closeEvent(QCloseEvent * e) { form_->close(); e->accept(); diff --git a/src/frontends/kde/urldlg.h b/src/frontends/kde/urldlg.h index d66026864e..2e99f51647 100644 --- a/src/frontends/kde/urldlg.h +++ b/src/frontends/kde/urldlg.h @@ -1,18 +1,11 @@ -/* - * urldlg.h - * (C) 2000 LyX Team - * John Levon, moz@compsoc.man.ac.uk +/** + * \file urldlg.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author John Levon */ -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #ifndef URLDLG_H #define URLDLG_H @@ -22,6 +15,7 @@ // to connect apply() and hide() #include "FormUrl.h" +#include #include #include #include @@ -29,37 +23,37 @@ #include #include -class UrlDialog : public QWidget { +class UrlDialog : public QDialog { Q_OBJECT public: - UrlDialog(FormUrl *form, QWidget *parent=0, const char *name=0, + UrlDialog(FormUrl * form, QWidget * parent=0, char const * name=0, bool modal=false, WFlags f=0); ~UrlDialog(); // widgets - QLabel *labelurl; - QLabel *labelurlname; - QLineEdit *url; - QLineEdit *urlname; - QCheckBox *htmlurl; - QPushButton *buttonOk; - QPushButton *buttonCancel; + QLabel * labelurl; + QLabel * labelurlname; + QLineEdit * url; + QLineEdit * urlname; + QCheckBox * htmlurl; + QPushButton * buttonOk; + QPushButton * buttonCancel; protected: - void closeEvent(QCloseEvent *e); + void closeEvent(QCloseEvent * e); private: - FormUrl *form_; + FormUrl * form_; // layouts - QHBoxLayout *topLayout; - QVBoxLayout *layout; - QHBoxLayout *urlLayout; - QBoxLayout *urlnameLayout; - QBoxLayout *htmlurlLayout; - QHBoxLayout *buttonLayout; + QHBoxLayout * topLayout; + QVBoxLayout * layout; + QHBoxLayout * urlLayout; + QBoxLayout * urlnameLayout; + QBoxLayout * htmlurlLayout; + QHBoxLayout * buttonLayout; private slots: /// adaptor to FormUrl::apply @@ -76,4 +70,4 @@ private slots: } }; -#endif +#endif // URLDLG_H diff --git a/src/frontends/qt2/FormCopyrightDialogBase.C b/src/frontends/qt2/FormCopyrightDialogBase.C index 6bf86714a3..a802c5c6c2 100644 --- a/src/frontends/qt2/FormCopyrightDialogBase.C +++ b/src/frontends/qt2/FormCopyrightDialogBase.C @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'FormCopyrightDialogBase.ui' ** -** Created: Wed Jan 24 12:18:52 2001 +** Created: Wed Feb 7 18:46:40 2001 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/frontends/qt2/Makefile.am b/src/frontends/qt2/Makefile.am index 36c2e0ff24..96cbe3756c 100644 --- a/src/frontends/qt2/Makefile.am +++ b/src/frontends/qt2/Makefile.am @@ -6,11 +6,20 @@ INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \ ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} $(BOOST_INCLUDES) \ -I${top_srcdir}/src/frontends/xforms DEFINES = -DQT_CLEAN_NAMESPACE +CXXFLAGS= $(DEFINES) # moc generated files -BUILTSOURCES = FormCopyrightDialog_moc.C \ - FormCopyrightDialogBase_moc.C +BUILTSOURCES = moc_FormCopyrightDialogBase.C \ + moc_FormCopyrightDialog.C \ + moc_paragraphdlg.C \ + moc_paragraphdlgimpl.C \ + moc_printdlg.C \ + moc_printdlgimpl.C \ + moc_tabularcreatedlg.C \ + moc_tabularcreatedlgimpl.C \ + moc_emptytable.C + LYXDATADIRS = dlg DISTCLEANFILES = $(BUILTSOURCES) *.orig *.rej *~ *.bak core @@ -24,29 +33,24 @@ libqt2_la_OBJADD = \ ../xforms/FormGraphics.lo \ ../xforms/FormIndex.lo \ ../xforms/FormInset.lo \ - ../xforms/FormParagraph.lo \ ../xforms/FormPreferences.lo \ - ../xforms/FormPrint.lo \ ../xforms/FormRef.lo \ ../xforms/FormTabular.lo \ - ../xforms/FormTabularCreate.lo \ ../xforms/FormToc.lo \ ../xforms/FormUrl.lo \ ../xforms/Menubar_pimpl.lo \ ../xforms/RadioButtonGroup.lo \ ../xforms/Toolbar_pimpl.lo \ + ../xforms/Timeout_pimpl.lo \ ../xforms/form_citation.lo \ ../xforms/form_copyright.lo \ ../xforms/form_document.lo \ ../xforms/form_error.lo \ - ../xforms/form_graphics.lo \ ../xforms/form_index.lo \ - ../xforms/form_paragraph.lo \ + ../xforms/form_graphics.lo \ ../xforms/form_preferences.lo \ - ../xforms/form_print.lo \ ../xforms/form_ref.lo \ ../xforms/form_tabular.lo \ - ../xforms/form_tabular_create.lo \ ../xforms/form_toc.lo \ ../xforms/form_url.lo \ ../xforms/input_validators.lo \ @@ -65,7 +69,27 @@ libqt2_la_SOURCES = \ FormCopyrightDialog.C \ FormCopyrightDialog.h \ FormCopyrightDialogBase.C \ - FormCopyrightDialogBase.h + FormCopyrightDialogBase.h \ + FormParagraph.C \ + FormParagraph.h \ + paragraphdlg.C \ + paragraphdlg.h \ + paragraphdlgimpl.C \ + paragraphdlgimpl.h \ + FormPrint.C \ + FormPrint.h \ + printdlg.C \ + printdlg.h \ + printdlgimpl.C \ + printdlgimpl.h \ + emptytable.C \ + emptytable.h \ + FormTabularCreate.C \ + FormTabularCreate.h \ + tabularcreatedlg.C \ + tabularcreatedlg.h \ + tabularcreatedlgimpl.C \ + tabularcreatedlgimpl.h # just copied from old lyx repository dist-hook: @@ -83,10 +107,42 @@ dist-hook: FormCopyright.C: FormCopyrightDialogBase.h FormCopyrightDialogBase.h: FormCopyrightDialogBase.ui - uic -o $@ $< + $(UIC) -o $@ $< FormCopyrightDialogBase.C: FormCopyrightDialogBase.ui - uic -impl FormCopyrightDialogBase.h -o $@ $< -FormCopyrightDialogBase_moc.C: FormCopyrightDialogBase.h - moc -o $@ $< -FormCopyrightDialog_moc.C: FormCopyrightDialog.h - moc -o $@ $< + $(UIC) -impl FormCopyrightDialogBase.h -o $@ $< +moc_FormCopyrightDialogBase.C: FormCopyrightDialogBase.h + $(MOC) -o $@ $< +moc_FormCopyrightDialog.C: FormCopyrightDialog.h + $(MOC) -o $@ $< + +FormParagraph.C: paragraphdlg.h +paragraphdlg.h: paragraphdlg.ui + $(UIC) -o $@ $< +paragraphdlg.C: paragraphdlg.ui + $(UIC) -impl paragraphdlg.h -o $@ $< +moc_paragraphdlg.C: paragraphdlg.h + $(MOC) -o $@ $< +moc_paragraphdlgimpl.C: paragraphdlgimpl.h + $(MOC) -o $@ $< + +FormPrint.C: printdlg.h +printdlg.h: printdlg.ui + $(UIC) -o $@ $< +printdlg.C: printdlg.ui + $(UIC) -impl printdlg.h -o $@ $< +moc_printdlg.C: printdlg.h + $(MOC) -o $@ $< +moc_printdlgimpl.C: printdlgimpl.h + $(MOC) -o $@ $< + +FormTabularCreate.C: tabularcreatedlg.h +tabularcreatedlg.h: tabularcreatedlg.ui + $(UIC) -o $@ $< +tabularcreatedlg.C: tabularcreatedlg.ui + $(UIC) -impl tabularcreatedlg.h -o $@ $< +moc_tabularcreatedlg.C: tabularcreatedlg.h + $(MOC) -o $@ $< +moc_tabularcreatedlgimpl.C: tabularcreatedlgimpl.h + $(MOC) -o $@ $< +moc_emptytable.C: emptytable.h + $(MOC) -o $@ $< diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 63f7215407..116998db73 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,32 @@ +2001-02-12 John Levon + + * Dialogs.C: new Splash. Include, Bibitem/tex + + * FormBase.h: make show() virtual for Splash's benefit + + * Makefile.am: + * forms/makefile: + * FormBibitem.C: + * FormBibitem.h: + * FormBibtex.C: + * FormBibtex.h: + * form_bibitem.C: + * form_bibitem.h: + * form_bibtex.C: + * form_bibtex.h: + * forms/form_bibitem.fd: + * forms/form_bibtex.fd: + * FormInclude.C: + * FormInclude.h: + * form_include.C: + * form_include.h: + * forms/form_include.fd: + * FormSplash.C: + * FormSplash.h: + * form_splash.C: + * form_splash.h: + * forms/form_splash.fd: new forms + 2001-02-09 John Levon * FormLog.C: handle Literate build log nicely diff --git a/src/frontends/xforms/Dialogs.C b/src/frontends/xforms/Dialogs.C index 00f65c4526..c24df64879 100644 --- a/src/frontends/xforms/Dialogs.C +++ b/src/frontends/xforms/Dialogs.C @@ -12,17 +12,21 @@ #include #include "Dialogs.h" +#include "FormBibitem.h" +#include "FormBibtex.h" #include "FormCitation.h" #include "FormCopyright.h" #include "FormDocument.h" #include "FormError.h" #include "FormGraphics.h" +#include "FormInclude.h" #include "FormIndex.h" #include "FormLog.h" #include "FormParagraph.h" #include "FormPreferences.h" #include "FormPrint.h" #include "FormRef.h" +#include "FormSplash.h" #include "FormTabular.h" #include "FormTabularCreate.h" #include "FormToc.h" @@ -46,17 +50,21 @@ Signal0 Dialogs::redrawGUI; Dialogs::Dialogs(LyXView * lv) { + dialogs_.push_back(new FormBibitem(lv, this)); + dialogs_.push_back(new FormBibtex(lv, this)); dialogs_.push_back(new FormCitation(lv, this)); dialogs_.push_back(new FormCopyright(lv, this)); dialogs_.push_back(new FormDocument(lv, this)); dialogs_.push_back(new FormError(lv, this)); dialogs_.push_back(new FormGraphics(lv, this)); + dialogs_.push_back(new FormInclude(lv, this)); dialogs_.push_back(new FormIndex(lv, this)); dialogs_.push_back(new FormLog(lv, this)); dialogs_.push_back(new FormParagraph(lv, this)); dialogs_.push_back(new FormPreferences(lv, this)); dialogs_.push_back(new FormPrint(lv, this)); dialogs_.push_back(new FormRef(lv, this)); + dialogs_.push_back(new FormSplash(lv, this)); dialogs_.push_back(new FormTabular(lv, this)); dialogs_.push_back(new FormTabularCreate(lv, this)); dialogs_.push_back(new FormToc(lv, this)); diff --git a/src/frontends/xforms/FormBase.h b/src/frontends/xforms/FormBase.h index 8308f4bc08..5a25fd2a10 100644 --- a/src/frontends/xforms/FormBase.h +++ b/src/frontends/xforms/FormBase.h @@ -64,7 +64,7 @@ protected: // methods virtual void redraw(); /// Create the dialog if necessary, update it and display it. - void show(); + virtual void show(); /// Hide the dialog. virtual void hide(); /// Update the dialog. diff --git a/src/frontends/xforms/FormBibitem.C b/src/frontends/xforms/FormBibitem.C new file mode 100644 index 0000000000..06cb9316e9 --- /dev/null +++ b/src/frontends/xforms/FormBibitem.C @@ -0,0 +1,126 @@ +/** + * \file FormBibitem.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Angus Leeming + * \author John Levon + */ + +#include + +#include FORMS_H_LOCATION + +#ifdef __GNUG__ +#pragma implementation +#endif + + +#include "Dialogs.h" +#include "FormBibitem.h" +#include "LyXView.h" +#include "buffer.h" +#include "form_bibitem.h" +#include "lyxfunc.h" +#include "debug.h" + +using std::endl; + +FormBibitem::FormBibitem(LyXView * lv, Dialogs * d) + : FormCommand(lv, d, _("Bibliography Entry"), new OkCancelReadOnlyPolicy), + dialog_(0) +{ + d->showBibitem.connect(slot(this, &FormBibitem::showInset)); +} + + +FormBibitem::~FormBibitem() +{ + delete dialog_; +} + + +FL_FORM * FormBibitem::form() const +{ + if (dialog_) + return dialog_->form; + return 0; +} + + +void FormBibitem::connect() +{ + fl_set_form_maxsize(form(), 2 * minw_, minh_); + FormCommand::connect(); +} + + +void FormBibitem::build() +{ + dialog_ = build_bibitem(); + + // Workaround dumb xforms sizing bug + minw_ = form()->w; + minh_ = form()->h; + + fl_set_input_return(dialog_->key, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->label, FL_RETURN_CHANGED); + + // Manage the ok, apply, restore and cancel/close buttons + bc_.setOK(dialog_->button_ok); + bc_.setCancel(dialog_->button_cancel); + bc_.refresh(); + + bc_.addReadOnly(dialog_->key); + bc_.addReadOnly(dialog_->label); +} + + +bool FormBibitem::input(FL_OBJECT *, long) +{ + // minimal validation + if (!strcmp(fl_get_input(dialog_->key),"")) + return false; + + return true; +} + + +void FormBibitem::update() +{ + fl_set_input(dialog_->key, params.getContents().c_str()); + fl_set_input(dialog_->label, params.getOptions().c_str()); + // Surely, this should reset the buttons to their original state? + // It doesn't. Instead "Restore" becomes a "Close" + //bc_.refresh(); + bc_.readOnly(lv_->buffer()->isReadonly()); +} + + +void FormBibitem::apply() +{ + if (lv_->buffer()->isReadonly()) + return; + + params.setContents(fl_get_input(dialog_->key)); + params.setOptions(fl_get_input(dialog_->label)); + + if (inset_ != 0) { + // Only update if contents have changed + if (params != inset_->params()) { + // FIXME: confirm, is this only necessary for FormBibTeX ??? + if (params.getContents() != inset_->params().getContents()) + lv_->view()->ChangeCitationsIfUnique( + inset_->params().getContents(), params.getContents()); + + inset_->setParams(params); + lv_->view()->updateInset(inset_, true); + + // We need to do a redraw because the maximum + // InsetBibKey width could have changed + lv_->view()->redraw(); + lv_->view()->fitCursor(lv_->view()->getLyXText()); + } + } else + lyxerr[Debug::GUI] << "Editing non-existent bibitem !" << endl; +} diff --git a/src/frontends/xforms/FormBibitem.h b/src/frontends/xforms/FormBibitem.h new file mode 100644 index 0000000000..14c9dbfecc --- /dev/null +++ b/src/frontends/xforms/FormBibitem.h @@ -0,0 +1,48 @@ +/** + * \file FormBibitem.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Angus Leeming + * \author John Levon + */ + +#ifndef FORMBIBITEM_H +#define FORMBIBITEM_H + +#ifdef __GNUG__ +#pragma interface +#endif + +#include "FormInset.h" +struct FD_form_bibitem; + +/** + * For bibliography entry editing + */ +class FormBibitem : public FormCommand { +public: + /// + FormBibitem(LyXView *, Dialogs *); + /// + ~FormBibitem(); +private: + /// Connect signals etc. Set form's max size. + virtual void connect(); + /// Build the dialog + virtual void build(); + /// Update dialog before showing it + virtual void update(); + /// input handler + virtual bool input(FL_OBJECT *,long); + /// Apply from dialog (modify or create inset) + virtual void apply(); + /// Pointer to the actual instantiation of the xform's form + virtual FL_FORM * form() const; + /// + FD_form_bibitem * build_bibitem(); + /// Real GUI implementation. + FD_form_bibitem * dialog_; +}; + +#endif // FORMBIBITEM_H diff --git a/src/frontends/xforms/FormBibtex.C b/src/frontends/xforms/FormBibtex.C new file mode 100644 index 0000000000..16a328cbb7 --- /dev/null +++ b/src/frontends/xforms/FormBibtex.C @@ -0,0 +1,125 @@ +/** + * \file FormBibtex.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Angus Leeming + * \author John Levon + */ + +#include + +#include FORMS_H_LOCATION + +#ifdef __GNUG__ +#pragma implementation +#endif + + +#include "Dialogs.h" +#include "FormBibtex.h" +#include "LyXView.h" +#include "buffer.h" +#include "form_bibtex.h" +#include "lyxfunc.h" +#include "debug.h" + +using std::endl; + +FormBibtex::FormBibtex(LyXView * lv, Dialogs * d) + : FormCommand(lv, d, _("BibTeX Database"), new OkCancelReadOnlyPolicy), + dialog_(0) +{ + d->showBibtex.connect(slot(this, &FormBibtex::showInset)); +} + + +FormBibtex::~FormBibtex() +{ + delete dialog_; +} + + +FL_FORM * FormBibtex::form() const +{ + if (dialog_) + return dialog_->form; + return 0; +} + + +void FormBibtex::connect() +{ + fl_set_form_maxsize(form(), 2 * minw_, minh_); + FormCommand::connect(); +} + + +void FormBibtex::build() +{ + dialog_ = build_bibtex(); + + // Workaround dumb xforms sizing bug + minw_ = form()->w; + minh_ = form()->h; + + fl_set_input_return(dialog_->database, FL_RETURN_CHANGED); + fl_set_input_return(dialog_->style, FL_RETURN_CHANGED); + + // Manage the ok, apply, restore and cancel/close buttons + bc_.setOK(dialog_->button_ok); + bc_.setCancel(dialog_->button_cancel); + bc_.refresh(); + + bc_.addReadOnly(dialog_->database); + bc_.addReadOnly(dialog_->style); +} + + +bool FormBibtex::input(FL_OBJECT *, long) +{ + // minimal validation + if (!strcmp(fl_get_input(dialog_->database),"")) + return false; + + return true; +} + + +void FormBibtex::update() +{ + fl_set_input(dialog_->database, params.getContents().c_str()); + fl_set_input(dialog_->style, params.getOptions().c_str()); + // Surely, this should reset the buttons to their original state? + // It doesn't. Instead "Restore" becomes a "Close" + //bc_.refresh(); + bc_.readOnly(lv_->buffer()->isReadonly()); +} + + +void FormBibtex::apply() +{ + if (lv_->buffer()->isReadonly()) + return; + + params.setContents(fl_get_input(dialog_->database)); + params.setOptions(fl_get_input(dialog_->style)); + + if (inset_ != 0) { + // Only update if contents have changed + if (params != inset_->params()) { + if (params.getContents() != inset_->params().getContents()) + lv_->view()->ChangeCitationsIfUnique( + inset_->params().getContents(), params.getContents()); + + inset_->setParams(params); + lv_->view()->updateInset(inset_, true); + + // We need to do a redraw because the maximum + // InsetBibKey width could have changed + lv_->view()->redraw(); + lv_->view()->fitCursor(lv_->view()->getLyXText()); + } + } else + lyxerr[Debug::GUI] << "Editing non-existent bibtex inset !" << endl; +} diff --git a/src/frontends/xforms/FormBibtex.h b/src/frontends/xforms/FormBibtex.h new file mode 100644 index 0000000000..b5ec1a4b17 --- /dev/null +++ b/src/frontends/xforms/FormBibtex.h @@ -0,0 +1,48 @@ +/** + * \file FormBibtex.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Angus Leeming + * \author John Levon + */ + +#ifndef FORMBIBTEX_H +#define FORMBIBTEX_H + +#ifdef __GNUG__ +#pragma interface +#endif + +#include "FormInset.h" +struct FD_form_bibtex; + +/** + * For bibtex database setting + */ +class FormBibtex : public FormCommand { +public: + /// + FormBibtex(LyXView *, Dialogs *); + /// + ~FormBibtex(); +private: + /// Connect signals etc. Set form's max size. + virtual void connect(); + /// Build the dialog + virtual void build(); + /// Update dialog before showing it + virtual void update(); + /// input handler + virtual bool input(FL_OBJECT *, long); + /// Apply from dialog (modify or create inset) + virtual void apply(); + /// Pointer to the actual instantiation of the xform's form + virtual FL_FORM * form() const; + /// + FD_form_bibtex * build_bibtex(); + /// Real GUI implementation. + FD_form_bibtex * dialog_; +}; + +#endif // FORMBIBTEX_H diff --git a/src/frontends/xforms/FormInclude.C b/src/frontends/xforms/FormInclude.C new file mode 100644 index 0000000000..a4b0220957 --- /dev/null +++ b/src/frontends/xforms/FormInclude.C @@ -0,0 +1,211 @@ +/** + * \file FormInclude.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Alejandro Aguilar Sierra + * \author John Levon + */ +#include +#include + +#ifdef __GNUG__ +#pragma implementation +#endif + +#include "Dialogs.h" +#include "FormInclude.h" +#include "insets/insetinclude.h" +#include "filedlg.h" +#include "support/filetools.C" +#include "support/lstrings.h" +#include "LyXView.h" +#include "buffer.h" +#include "lyxrc.h" +#include "lyxfunc.h" + +#include "form_include.h" + +FormInclude::FormInclude(LyXView * lv, Dialogs * d) + : FormCommand(lv, d, _("Include file"), new OkCancelPolicy), + dialog_(0) +{ + // let the dialog be shown + // These are permanent connections so we won't bother + // storing a copy because we won't be disconnecting. + d->showInclude.connect(slot(this, &FormInclude::showInset)); + d->createInclude.connect(slot(this, &FormInclude::createInset)); +} + + +FormInclude::~FormInclude() +{ + delete dialog_; +} + + +FL_FORM * FormInclude::form() const +{ + if (dialog_) + return dialog_->form; + return 0; +} + + +void FormInclude::build() +{ + dialog_ = build_include(); + + // Workaround dumb xforms sizing bug + minw_ = form()->w; + minh_ = form()->h; + + // Manage the ok and cancel buttons + bc_.setOK(dialog_->button_ok); + bc_.setCancel(dialog_->button_cancel); + bc_.refresh(); + + bc_.addReadOnly(dialog_->browsebt); + bc_.addReadOnly(dialog_->flag1); + bc_.addReadOnly(dialog_->flag2); + bc_.addReadOnly(dialog_->flag3); + bc_.addReadOnly(dialog_->flag4); + bc_.addReadOnly(dialog_->filename); + bc_.addReadOnly(dialog_->flag41); +} + + +void FormInclude::update() +{ + bc_.readOnly(lv_->buffer()->isReadonly()); + + if (!inset_) { + fl_set_input(dialog_->filename, ""); + fl_set_button(dialog_->flag1, 0); + fl_set_button(dialog_->flag2, 0); + fl_set_button(dialog_->flag3, 1); + fl_set_button(dialog_->flag4, 0); + fl_set_button(dialog_->flag41, 0); + fl_deactivate_object(dialog_->flag41); + fl_set_object_lcol(dialog_->flag41, FL_INACTIVE); + return; + } + + fl_set_input(dialog_->filename, params.getContents().c_str()); + + string const cmdname = params.getCmdName(); + + /* FIXME: what do with Don't typeset here ... */ + //fl_set_button(dialog_->flag1, int(inset_->isNoLoad())); + + fl_set_button(dialog_->flag2, cmdname == "input"); + fl_set_button(dialog_->flag3, cmdname == "include"); + if (cmdname == "verbatiminput" || cmdname == "verbatiminput*") { + fl_set_button(dialog_->flag4, 1); + fl_set_button(dialog_->flag41, cmdname == "verbatiminput*"); + } else { + fl_set_button(dialog_->flag41, 0); + fl_deactivate_object(dialog_->flag41); + fl_set_object_lcol(dialog_->flag41, FL_INACTIVE); + } +} + + +void FormInclude::apply() +{ + if (lv_->buffer()->isReadonly()) + return; + + /* FIXME: no way to update internal flags of inset ??? */ + + //inset_->setNoLoad(fl_get_button(dialog_->flag1)); + + params.setContents(fl_get_input(dialog_->filename)); + cout << params.getContents() << endl; + if (fl_get_button(dialog_->flag2)) + params.setCmdName("input"); + else if (fl_get_button(dialog_->flag3)) + params.setCmdName("include"); + else if (fl_get_button(dialog_->flag4)) { + if (fl_get_button(dialog_->flag41)) + params.setCmdName("verbatiminput*"); + else + params.setCmdName("verbatiminput"); + } + + if (inset_) { + if (params != inset_->params()) { + inset_->setParams(params); + lv_->view()->updateInset(inset_, true); + } + } else + lv_->getLyXFunc()->Dispatch(LFUN_CHILD_INSERT, params.getAsString()); +} + +#ifdef WITH_WARNINGS +#warning convert this to use the buttoncontroller +#endif +bool FormInclude::input(FL_OBJECT *, long data) +{ + State state = static_cast(data); + + switch (state) { + case BROWSE: { + // Should browsing too be disabled in RO-mode? + LyXFileDlg fileDlg; + + string ext; + + fileDlg.SetButton(0, _("Documents"), lyxrc.document_path); + + /* input TeX, verbatim, or LyX file ? */ + if (fl_get_button(dialog_->flag2)) + ext = "*.tex"; + else if (fl_get_button(dialog_->flag4)) + ext = "*"; + else + ext = "*.lyx"; + + string mpath; + + /* FIXME: what do I do here ? */ + //if (inset_) + // mpath = OnlyPath(inset_->getMasterFilename()); + + string const filename = fileDlg.Select(_("Select Child Document"), + mpath, ext, fl_get_input(dialog_->filename)); + XFlush(fl_get_display()); + + // check selected filename + if (filename.empty()) + break; + + string const filename2 = MakeRelPath(filename, mpath); + + if (prefixIs(filename2, "..")) + fl_set_input(dialog_->filename, filename.c_str()); + else + fl_set_input(dialog_->filename, filename2.c_str()); + + } break; + + case LOAD: + apply(); + lv_->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, params.getContents()); + break; + + case VERBATIM: + fl_activate_object(dialog_->flag41); + fl_set_object_lcol(dialog_->flag41, FL_BLACK); + break; + + case INPUTINCLUDE: + cout << "inputinclude" << endl; + /* huh ? why doesn't this work ? */ + fl_deactivate_object(dialog_->flag41); + fl_set_object_lcol(dialog_->flag41, FL_INACTIVE); + fl_set_button(dialog_->flag41, 0); + break; + } + return true; +} diff --git a/src/frontends/xforms/FormInclude.h b/src/frontends/xforms/FormInclude.h new file mode 100644 index 0000000000..1e8f744638 --- /dev/null +++ b/src/frontends/xforms/FormInclude.h @@ -0,0 +1,61 @@ +/** + * \file FormInclude.h + * Copyright 2001 the LyX Team + * See the file COPYING + * + * \author Alejandro Aguilar Sierra + * \author John Levon + */ +#ifndef FORMINCLUDE_H +#define FORMINCLUDE_H + +#ifdef __GNUG__ +#pragma interface +#endif + +#include "FormInset.h" + +class InsetInclude; + +struct FD_form_include; + +/** This class provides an XForms implementation of the FormInclude Dialog. + */ +class FormInclude : public FormCommand { +public: + /// + FormInclude(LyXView *, Dialogs *); + /// + ~FormInclude(); +private: + /// + enum State { + /// the browse button + BROWSE=0, + /// the load file button + LOAD=5, + /// the verbatim radio choice + VERBATIM=10, + /// the input and include radio choices + INPUTINCLUDE=11 + }; + + /// Build the dialog + virtual void build(); + /// Filter the inputs + virtual bool input( FL_OBJECT *, long ); + /// Update dialog before showing it + virtual void update(); + /// Apply from dialog (modify or create inset) + virtual void apply(); + /// Pointer to the actual instantiation of the xform's form + virtual FL_FORM * form() const; + + /// Type definition from the fdesign produced header file. + FD_form_include * build_include(); + + /// Real GUI implementation. + FD_form_include * dialog_; +}; + +#endif diff --git a/src/frontends/xforms/FormSplash.C b/src/frontends/xforms/FormSplash.C new file mode 100644 index 0000000000..3700d1efd3 --- /dev/null +++ b/src/frontends/xforms/FormSplash.C @@ -0,0 +1,128 @@ +/** + * \file FormSplash.C + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Allan Rae + * \author John Levon + */ + +#include + +#include FORMS_H_LOCATION + +#ifdef __GNUG__ +#pragma implementation +#endif + +#include "Dialogs.h" +#include "LyXView.h" +#include "form_splash.h" +#include "FormSplash.h" +#include "xform_helpers.h" +#include "version.h" +#include "support/filetools.h" +#include "lyxrc.h" + +/* FIXME: Really, we shouldn't leave Splash hanging around, but I'm not sure + * how to make it self-destructive - jbl + */ + +extern "C" void C_FormSplashTimerCB(FL_OBJECT * ob, long) +{ + FormSplash::CloseCB(ob); +} + +extern "C" int C_FormSplashWMHideCB(FL_FORM * ob, void * d) +{ + return FormBase::WMHideCB(ob, d); +} + +FormSplash::FormSplash(LyXView * lv, Dialogs * d) + : FormBaseBI(lv, d, (string(_("LyX ")) + LYX_VERSION).c_str(), new IgnorantPolicy), + dialog_(0) +{ + d->showSplash.connect(slot(this, &FormSplash::show)); + d->hideSplash.connect(slot(this, &FormSplash::hide)); +} + + +FormSplash::~FormSplash() +{ + delete dialog_; +} + + +void FormSplash::CloseCB(FL_OBJECT * ob) +{ + FormSplash * pre = static_cast(ob->form->u_vdata); + pre->hide(); + delete pre->dialog_; + pre->dialog_ = 0; +} + + +void FormSplash::show() +{ + if (!dialog_) { + build(); + fl_set_form_atclose(dialog_->form, C_FormSplashWMHideCB, 0); + } + + int const xpos = WidthOfScreen(ScreenOfDisplay(fl_get_display(), fl_screen)); + int const ypos = HeightOfScreen(ScreenOfDisplay(fl_get_display(), fl_screen)); + + fl_set_form_position(dialog_->form, xpos, ypos); + + // Show the title form at most 5 secs + fl_set_timer(dialog_->splash_timer, 5); + + if (form()->visible) + fl_raise_form(form()); + else { + connect(); + fl_show_form(dialog_->form, FL_PLACE_CENTER, FL_NOBORDER, title.c_str()); + } +} + + +FL_FORM * FormSplash::form() const +{ + if (dialog_) + return dialog_->form; + return 0; +} + + +void FormSplash::build() +{ + dialog_ = build_splash(); + + // Workaround dumb xforms sizing bug + minw_ = form()->w; + minh_ = form()->h; + + string banner_file = LibFileSearch("images", "banner", "xpm"); + + if (lyxrc.show_banner && !banner_file.empty()) { + fl_set_form_dblbuffer(dialog_->form, 1); // use dbl buffer + fl_addto_form(dialog_->form); + FL_OBJECT * obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 0, 0, 425, 290, ""); + fl_set_pixmapbutton_file(obj, banner_file.c_str()); + + fl_set_pixmapbutton_focus_outline(obj, 3); + fl_set_button_shortcut(obj, "^M ^[", 1); + fl_set_object_boxtype(obj, FL_NO_BOX); + fl_set_object_callback(obj, C_FormSplashTimerCB, 0); + + obj = fl_add_text(FL_NORMAL_TEXT, 248, 265, 170, 16, LYX_VERSION); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_mapcolor(FL_FREE_COL2, 0x05, 0x2e, 0x4c); + fl_mapcolor(FL_FREE_COL3, 0xe1, 0xd2, 0x9b); + fl_set_object_color(obj, FL_FREE_COL2, FL_FREE_COL2); + fl_set_object_lcol(obj, FL_FREE_COL3); + fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); + fl_end_form(); + } +} diff --git a/src/frontends/xforms/FormSplash.h b/src/frontends/xforms/FormSplash.h new file mode 100644 index 0000000000..162eb75716 --- /dev/null +++ b/src/frontends/xforms/FormSplash.h @@ -0,0 +1,46 @@ +/** + * \file FormSplash.h + * Copyright 2001 the LyX Team + * Read the file COPYING + * + * \author Allan Rae + * \author John Levon + */ + +#ifndef FORMSPLASH_H +#define FORMSPLASH_H + +#include "FormBase.h" + +#ifdef __GNUG__ +#pragma interface +#endif + +struct FD_form_splash; + +/** The startup splash screen + */ +class FormSplash : public FormBaseBI { +public: + FormSplash(LyXView *, Dialogs *); + + ~FormSplash(); + + /// close the dialog + static void CloseCB(FL_OBJECT *); + +private: + /// show the dialog + virtual void show(); + /// Build the dialog + virtual void build(); + /// Pointer to the actual instantiation of the xform's form + virtual FL_FORM * form() const; + /// Fdesign generated method + FD_form_splash * build_splash(); + + /// Real GUI implementation. + FD_form_splash * dialog_; +}; + +#endif // FORMSPLASH_H diff --git a/src/frontends/xforms/Makefile.am b/src/frontends/xforms/Makefile.am index db785d5bd6..87502a6403 100644 --- a/src/frontends/xforms/Makefile.am +++ b/src/frontends/xforms/Makefile.am @@ -20,6 +20,14 @@ libxforms_la_SOURCES = \ GUIRunTime.C \ FormBase.C \ FormBase.h \ + FormBibitem.C \ + FormBibitem.h \ + form_bibitem.C \ + form_bibitem.h \ + FormBibtex.C \ + FormBibtex.h \ + form_bibtex.C \ + form_bibtex.h \ FormBrowser.C \ FormBrowser.h \ form_browser.C \ @@ -44,6 +52,10 @@ libxforms_la_SOURCES = \ FormGraphics.h \ form_graphics.C \ form_graphics.h \ + FormInclude.C \ + FormInclude.h \ + form_include.C \ + form_include.h \ FormIndex.C \ FormIndex.h \ form_index.C \ @@ -68,6 +80,10 @@ libxforms_la_SOURCES = \ FormRef.h \ form_ref.C \ form_ref.h \ + FormSplash.C \ + FormSplash.h \ + form_splash.C \ + form_splash.h \ FormTabular.C \ FormTabular.h \ form_tabular.C \ diff --git a/src/frontends/xforms/form_bibitem.C b/src/frontends/xforms/form_bibitem.C new file mode 100644 index 0000000000..a2ffad5524 --- /dev/null +++ b/src/frontends/xforms/form_bibitem.C @@ -0,0 +1,59 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +#include +#include "lyx_gui_misc.h" +#include "gettext.h" + +/* Form definition file generated with fdesign. */ + +#include FORMS_H_LOCATION +#include +#include "form_bibitem.h" +#include "FormBibitem.h" + +FD_form_bibitem::~FD_form_bibitem() +{ + if ( form->visible ) fl_hide_form( form ); + fl_free_form( form ); +} + + +FD_form_bibitem * FormBibitem::build_bibitem() +{ + FL_OBJECT *obj; + FD_form_bibitem *fdui = new FD_form_bibitem; + + fdui->form = fl_bgn_form(FL_NO_BOX, 220, 130); + fdui->form->u_vdata = this; + obj = fl_add_box(FL_UP_BOX, 0, 0, 220, 130, ""); + { + char const * const dummy = N_("Key:|#K"); + fdui->key = obj = fl_add_input(FL_NORMAL_INPUT, 80, 10, 130, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 20, 90, 90, 30, _("OK")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseOKCB, 3); + { + char const * const dummy = N_("Cancel|^["); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 90, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseCancelCB, 2); + { + char const * const dummy = N_("Label:|#L"); + fdui->label = obj = fl_add_input(FL_NORMAL_INPUT, 80, 50, 130, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fl_end_form(); + + fdui->form->fdui = fdui; + + return fdui; +} +/*---------------------------------------*/ + diff --git a/src/frontends/xforms/form_bibitem.h b/src/frontends/xforms/form_bibitem.h new file mode 100644 index 0000000000..2a5855e84d --- /dev/null +++ b/src/frontends/xforms/form_bibitem.h @@ -0,0 +1,24 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +/** Header file generated with fdesign **/ + +#ifndef FD_form_bibitem_h_ +#define FD_form_bibitem_h_ + +/** Callbacks, globals and object handlers **/ +extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); +extern "C" void C_FormBaseOKCB(FL_OBJECT *, long); +extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long); + + +/**** Forms and Objects ****/ +struct FD_form_bibitem { + ~FD_form_bibitem(); + + FL_FORM *form; + FL_OBJECT *key; + FL_OBJECT *button_ok; + FL_OBJECT *button_cancel; + FL_OBJECT *label; +}; + +#endif /* FD_form_bibitem_h_ */ diff --git a/src/frontends/xforms/form_bibtex.C b/src/frontends/xforms/form_bibtex.C new file mode 100644 index 0000000000..68c1f44ba3 --- /dev/null +++ b/src/frontends/xforms/form_bibtex.C @@ -0,0 +1,59 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +#include +#include "lyx_gui_misc.h" +#include "gettext.h" + +/* Form definition file generated with fdesign. */ + +#include FORMS_H_LOCATION +#include +#include "form_bibtex.h" +#include "FormBibtex.h" + +FD_form_bibtex::~FD_form_bibtex() +{ + if ( form->visible ) fl_hide_form( form ); + fl_free_form( form ); +} + + +FD_form_bibtex * FormBibtex::build_bibtex() +{ + FL_OBJECT *obj; + FD_form_bibtex *fdui = new FD_form_bibtex; + + fdui->form = fl_bgn_form(FL_NO_BOX, 220, 130); + fdui->form->u_vdata = this; + obj = fl_add_box(FL_UP_BOX, 0, 0, 220, 130, ""); + { + char const * const dummy = N_("Database:|#D"); + fdui->database = obj = fl_add_input(FL_NORMAL_INPUT, 80, 10, 130, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 20, 90, 90, 30, _("OK")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseOKCB, 3); + { + char const * const dummy = N_("Cancel|^["); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 90, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseCancelCB, 2); + { + char const * const dummy = N_("Style:|#S"); + fdui->style = obj = fl_add_input(FL_NORMAL_INPUT, 80, 50, 130, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fl_end_form(); + + fdui->form->fdui = fdui; + + return fdui; +} +/*---------------------------------------*/ + diff --git a/src/frontends/xforms/form_bibtex.h b/src/frontends/xforms/form_bibtex.h new file mode 100644 index 0000000000..8189af6e7a --- /dev/null +++ b/src/frontends/xforms/form_bibtex.h @@ -0,0 +1,24 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +/** Header file generated with fdesign **/ + +#ifndef FD_form_bibtex_h_ +#define FD_form_bibtex_h_ + +/** Callbacks, globals and object handlers **/ +extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); +extern "C" void C_FormBaseOKCB(FL_OBJECT *, long); +extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long); + + +/**** Forms and Objects ****/ +struct FD_form_bibtex { + ~FD_form_bibtex(); + + FL_FORM *form; + FL_OBJECT *database; + FL_OBJECT *button_ok; + FL_OBJECT *button_cancel; + FL_OBJECT *style; +}; + +#endif /* FD_form_bibtex_h_ */ diff --git a/src/frontends/xforms/form_include.C b/src/frontends/xforms/form_include.C new file mode 100644 index 0000000000..1b7650ea9a --- /dev/null +++ b/src/frontends/xforms/form_include.C @@ -0,0 +1,104 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +#include +#include "lyx_gui_misc.h" +#include "gettext.h" + +/* Form definition file generated with fdesign. */ + +#include FORMS_H_LOCATION +#include +#include "form_include.h" +#include "FormInclude.h" + +FD_form_include::~FD_form_include() +{ + if ( form->visible ) fl_hide_form( form ); + fl_free_form( form ); +} + + +FD_form_include * FormInclude::build_include() +{ + FL_OBJECT *obj; + FD_form_include *fdui = new FD_form_include; + + fdui->form = fl_bgn_form(FL_NO_BOX, 340, 210); + fdui->form->u_vdata = this; + obj = fl_add_box(FL_UP_BOX, 0, 0, 340, 210, ""); + obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 70, 160, 90, ""); + { + char const * const dummy = N_("Browse|#B"); + fdui->browsebt = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 30, 100, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + { + char const * const dummy = N_("Don't typeset|#D"); + fdui->flag1 = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 70, 150, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 120, 170, 100, 30, _("OK")); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseOKCB, 1); + { + char const * const dummy = N_("Cancel|^["); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 170, 100, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseCancelCB, 2); + { + char const * const dummy = N_("Load|#L"); + fdui->loadbt = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 130, 100, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 5); + { + char const * const dummy = N_("File name:|#F"); + fdui->filename = obj = fl_add_input(FL_NORMAL_INPUT, 10, 30, 210, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); + { + char const * const dummy = N_("Visible space|#s"); + fdui->flag41 = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 100, 150, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + + fdui->include_grp = fl_bgn_group(); + { + char const * const dummy = N_("Verbatim|#V"); + fdui->flag4 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 130, 160, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 10); + { + char const * const dummy = N_("Use input|#i"); + fdui->flag2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 100, 160, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 11); + { + char const * const dummy = N_("Use include|#U"); + fdui->flag3 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 70, 160, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 11); + fl_end_group(); + + fl_end_form(); + + fdui->form->fdui = fdui; + + return fdui; +} +/*---------------------------------------*/ + diff --git a/src/frontends/xforms/form_include.h b/src/frontends/xforms/form_include.h new file mode 100644 index 0000000000..80623e03fe --- /dev/null +++ b/src/frontends/xforms/form_include.h @@ -0,0 +1,31 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +/** Header file generated with fdesign **/ + +#ifndef FD_form_include_h_ +#define FD_form_include_h_ + +/** Callbacks, globals and object handlers **/ +extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); +extern "C" void C_FormBaseOKCB(FL_OBJECT *, long); +extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long); + + +/**** Forms and Objects ****/ +struct FD_form_include { + ~FD_form_include(); + + FL_FORM *form; + FL_OBJECT *browsebt; + FL_OBJECT *flag1; + FL_OBJECT *button_ok; + FL_OBJECT *button_cancel; + FL_OBJECT *loadbt; + FL_OBJECT *filename; + FL_OBJECT *flag41; + FL_OBJECT *include_grp; + FL_OBJECT *flag4; + FL_OBJECT *flag2; + FL_OBJECT *flag3; +}; + +#endif /* FD_form_include_h_ */ diff --git a/src/frontends/xforms/form_splash.C b/src/frontends/xforms/form_splash.C new file mode 100644 index 0000000000..c4d0e61f66 --- /dev/null +++ b/src/frontends/xforms/form_splash.C @@ -0,0 +1,38 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +#include +#include "lyx_gui_misc.h" +#include "gettext.h" + +/* Form definition file generated with fdesign. */ + +#include FORMS_H_LOCATION +#include +#include "form_splash.h" +#include "FormSplash.h" + +FD_form_splash::~FD_form_splash() +{ + if ( form->visible ) fl_hide_form( form ); + fl_free_form( form ); +} + + +FD_form_splash * FormSplash::build_splash() +{ + FL_OBJECT *obj; + FD_form_splash *fdui = new FD_form_splash; + + fdui->form = fl_bgn_form(FL_NO_BOX, 420, 290); + fdui->form->u_vdata = this; + obj = fl_add_box(FL_UP_BOX, 0, 0, 420, 290, ""); + fl_set_object_color(obj, FL_BLACK, FL_TOP_BCOL); + fdui->splash_timer = obj = fl_add_timer(FL_HIDDEN_TIMER, 110, 170, 190, 60, ""); + fl_set_object_callback(obj, C_FormSplashTimerCB, 0); + fl_end_form(); + + fdui->form->fdui = fdui; + + return fdui; +} +/*---------------------------------------*/ + diff --git a/src/frontends/xforms/form_splash.h b/src/frontends/xforms/form_splash.h new file mode 100644 index 0000000000..68b6df568a --- /dev/null +++ b/src/frontends/xforms/form_splash.h @@ -0,0 +1,19 @@ +// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext +/** Header file generated with fdesign **/ + +#ifndef FD_form_splash_h_ +#define FD_form_splash_h_ + +/** Callbacks, globals and object handlers **/ +extern "C" void C_FormSplashTimerCB(FL_OBJECT *, long); + + +/**** Forms and Objects ****/ +struct FD_form_splash { + ~FD_form_splash(); + + FL_FORM *form; + FL_OBJECT *splash_timer; +}; + +#endif /* FD_form_splash_h_ */ diff --git a/forms/bibforms.fd b/src/frontends/xforms/forms/form_bibitem.fd similarity index 88% rename from forms/bibforms.fd rename to src/frontends/xforms/forms/form_bibitem.fd index 81e0a9931b..8d2c10ad93 100644 --- a/forms/bibforms.fd +++ b/src/frontends/xforms/forms/form_bibitem.fd @@ -7,7 +7,7 @@ Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== -Name: bibitem_form +Name: form_bibitem Width: 220 Height: 130 Number of Objects: 5 @@ -41,12 +41,12 @@ style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Key:|#K -shortcut: +shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: key -callback: -argument: +callback: C_FormBaseInputCB +argument: 0 -------------------- class: FL_BUTTON @@ -62,8 +62,8 @@ label: OK shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: bibitem_cb +name: button_ok +callback: C_FormBaseOKCB argument: 3 -------------------- @@ -77,11 +77,11 @@ style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Cancel|^[ -shortcut: +shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: bibitem_cb +name: button_cancel +callback: C_FormBaseCancelCB argument: 2 -------------------- @@ -95,12 +95,12 @@ style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Label:|#L -shortcut: +shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: label -callback: -argument: +callback: C_FormBaseInputCB +argument: 0 ============================== create_the_forms diff --git a/src/frontends/xforms/forms/form_bibtex.fd b/src/frontends/xforms/forms/form_bibtex.fd new file mode 100644 index 0000000000..65693be144 --- /dev/null +++ b/src/frontends/xforms/forms/form_bibtex.fd @@ -0,0 +1,106 @@ +Magic: 13000 + +Internal Form Definition File + (do not change) + +Number of forms: 1 +Unit of measure: FL_COORD_PIXEL + +=============== FORM =============== +Name: form_bibtex +Width: 220 +Height: 130 +Number of Objects: 5 + +-------------------- +class: FL_BOX +type: UP_BOX +box: 0 0 220 130 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_INPUT +type: NORMAL_INPUT +box: 80 10 130 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Database:|#D +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: database +callback: C_FormBaseInputCB +argument: 0 + +-------------------- +class: FL_BUTTON +type: RETURN_BUTTON +box: 20 90 90 30 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: OK +shortcut: ^M +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: button_ok +callback: C_FormBaseOKCB +argument: 3 + +-------------------- +class: FL_BUTTON +type: NORMAL_BUTTON +box: 120 90 90 30 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Cancel|^[ +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: button_cancel +callback: C_FormBaseCancelCB +argument: 2 + +-------------------- +class: FL_INPUT +type: NORMAL_INPUT +box: 80 50 130 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT +style: FL_NORMAL_STYLE +size: FL_NORMAL_SIZE +lcol: FL_BLACK +label: Style:|#S +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: style +callback: C_FormBaseInputCB +argument: 0 + +============================== +create_the_forms diff --git a/forms/include_form.fd b/src/frontends/xforms/forms/form_include.fd similarity index 94% rename from forms/include_form.fd rename to src/frontends/xforms/forms/form_include.fd index 6b451c8103..0d82230ff3 100644 --- a/forms/include_form.fd +++ b/src/frontends/xforms/forms/form_include.fd @@ -7,7 +7,7 @@ Number of forms: 1 Unit of measure: FL_COORD_PIXEL =============== FORM =============== -Name: include +Name: form_include Width: 340 Height: 210 Number of Objects: 14 @@ -63,7 +63,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: browsebt -callback: include_cb +callback: C_FormBaseInputCB argument: 0 -------------------- @@ -81,7 +81,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: flag1 -callback: +callback: argument: -------------------- @@ -98,8 +98,8 @@ label: OK shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: include_cb +name: button_ok +callback: C_FormBaseOKCB argument: 1 -------------------- @@ -116,8 +116,8 @@ label: Cancel|^[ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: include_cb +name: button_cancel +callback: C_FormBaseCancelCB argument: 2 -------------------- @@ -134,8 +134,8 @@ label: Load|#L shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: include_cb +name: loadbt +callback: C_FormBaseInputCB argument: 5 -------------------- @@ -152,7 +152,7 @@ label: File name:|#F shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: input +name: filename callback: argument: @@ -207,7 +207,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: flag4 -callback: include_cb +callback: C_FormBaseInputCB argument: 10 -------------------- @@ -225,7 +225,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: flag2 -callback: include_cb +callback: C_FormBaseInputCB argument: 11 -------------------- @@ -243,7 +243,7 @@ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: flag3 -callback: include_cb +callback: C_FormBaseInputCB argument: 11 -------------------- diff --git a/src/frontends/xforms/forms/form_splash.fd b/src/frontends/xforms/forms/form_splash.fd new file mode 100644 index 0000000000..d746fbda4d --- /dev/null +++ b/src/frontends/xforms/forms/form_splash.fd @@ -0,0 +1,52 @@ +Magic: 13000 + +Internal Form Definition File + (do not change) + +Number of forms: 1 +Unit of measure: FL_COORD_PIXEL + +=============== FORM =============== +Name: form_splash +Width: 420 +Height: 290 +Number of Objects: 2 + +-------------------- +class: FL_BOX +type: UP_BOX +box: 0 0 420 290 +boxtype: FL_UP_BOX +colors: FL_BLACK FL_TOP_BCOL +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_TIMER +type: HIDDEN_TIMER +box: 110 170 190 60 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_RED +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: splash_timer +callback: C_FormSplashTimerCB +argument: 0 + +============================== +create_the_forms diff --git a/src/frontends/xforms/forms/makefile b/src/frontends/xforms/forms/makefile index 16555d36bf..e4ee97221c 100644 --- a/src/frontends/xforms/forms/makefile +++ b/src/frontends/xforms/forms/makefile @@ -17,17 +17,21 @@ SHELL = /bin/sh .SUFFIXES: .fd .c -SRCS := form_citation.fd \ +SRCS := form_bibitem.fd \ + form_bibtex.fd \ + form_citation.fd \ form_copyright.fd \ form_document.fd \ form_error.fd \ form_graphics.fd \ + form_include.fd \ form_index.fd \ form_browser.fd \ form_paragraph.fd \ form_preferences.fd \ form_print.fd \ form_ref.fd \ + form_splash.fd \ form_tabular.fd \ form_tabular_create.fd \ form_toc.fd \ diff --git a/src/graphics/GraphicsCacheItem_pimpl.C b/src/graphics/GraphicsCacheItem_pimpl.C index 1a3a58b6dd..c176a02aa3 100644 --- a/src/graphics/GraphicsCacheItem_pimpl.C +++ b/src/graphics/GraphicsCacheItem_pimpl.C @@ -64,8 +64,8 @@ typedef map CallbackMap; static CallbackMap callbackMap; -void -static callback(string cmd, int retval) +static +void callback(string cmd, int retval) { lyxerr << "callback, cmd=" << cmd << ", retval=" << retval << endl; diff --git a/src/include_form.h b/src/include_form.h deleted file mode 100644 index a4c99ea019..0000000000 --- a/src/include_form.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef FD_include_h_ -#define FD_include_h_ -/* Header file generated with fdesign. */ - -/**** Callback routines ****/ - -extern "C" void include_cb(FL_OBJECT *, long); - - -/**** Forms and Objects ****/ - -typedef struct { - FL_FORM *include; - void *vdata; - long ldata; - FL_OBJECT *browsebt; - FL_OBJECT *flag1; - FL_OBJECT *input; - FL_OBJECT *flag41; - FL_OBJECT *include_grp; - FL_OBJECT *flag4; - FL_OBJECT *flag2; - FL_OBJECT *flag3; -} FD_include; - -extern FD_include * create_form_include(void); - -#endif /* FD_include_h_ */ diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 2ae1eb1185..1c62dbdd16 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2001-02-12 John Levon + + * insetinclude.C: + * insetbib.h: + * insetbib.C: move dialogs to frontends/ + 2001-02-10 Dekel Tsur * insettext.C (LocalDispatch): Restore the language if the inset diff --git a/src/insets/insetbib.C b/src/insets/insetbib.C index c481ef05a8..06ab28f976 100644 --- a/src/insets/insetbib.C +++ b/src/insets/insetbib.C @@ -8,18 +8,18 @@ #endif #include FORMS_H_LOCATION +#include "frontends/Dialogs.h" #include "insetbib.h" #include "buffer.h" #include "debug.h" -#include "lyx_gui_misc.h" #include "BufferView.h" #include "gettext.h" -#include "bibforms.h" #include "lyxtext.h" #include "support/filetools.h" #include "support/path.h" #include "lyxrc.h" #include "font.h" +#include "LyXView.h" using std::ostream; using std::ifstream; @@ -29,54 +29,6 @@ using std::vector; using std::pair; using std::max; -FD_bibitem_form * bibitem_form = 0; - -FD_bibitem_form * create_form_bibitem_form(void); - -extern BufferView * current_view; - -// This is foul! -// called from both InsetBibKey and InsetBibtex dialogs yet cast off -// only to InsetBibKey holder. Real problems can ensue. -extern "C" -void bibitem_cb(FL_OBJECT *, long data) -{ - InsetBibKey::Holder * holder = - static_cast - (bibitem_form->bibitem_form->u_vdata); - - holder->inset->callback( bibitem_form, data ); -} - - -FD_bibitem_form * create_form_bibitem_form(void) -{ - FL_OBJECT * obj; - FD_bibitem_form * fdui = (FD_bibitem_form *) fl_calloc(1, sizeof(FD_bibitem_form)); - - fdui->bibitem_form = fl_bgn_form(FL_NO_BOX, 220, 130); - obj = fl_add_box(FL_UP_BOX, 0, 0, 220, 130, ""); - fdui->key = obj = fl_add_input(FL_NORMAL_INPUT, 80, 10, 130, 30, idex(_("Key:|#K"))); - fl_set_input_shortcut(obj, scex(_("Key:|#K")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - obj = fl_add_button(FL_RETURN_BUTTON, 20, 90, 90, 30, _("OK")); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, bibitem_cb, 1); - obj = fl_add_button(FL_NORMAL_BUTTON, 120, 90, 90, 30, idex(_("Cancel|^["))); - fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, bibitem_cb, 0); - fdui->label = obj = fl_add_input(FL_NORMAL_INPUT, 80, 50, 130, 30, idex(_("Label:|#L"))); - fl_set_input_shortcut(obj, scex(_("Label:|#L")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_end_form(); - - //fdui->bibitem_form->fdui = fdui; - - return fdui; -} - - int InsetBibKey::key_counter = 0; const string key_prefix = "key-"; @@ -91,10 +43,6 @@ InsetBibKey::InsetBibKey(InsetCommandParams const & p) InsetBibKey::~InsetBibKey() { - if (bibitem_form && bibitem_form->bibitem_form - && bibitem_form->bibitem_form->visible - && bibitem_form->bibitem_form->u_vdata == &holder) - fl_hide_form(bibitem_form->bibitem_form); } @@ -106,42 +54,6 @@ Inset * InsetBibKey::Clone(Buffer const &) const } -void InsetBibKey::callback( FD_bibitem_form * form, long data ) -{ - switch (data) { - case 1: - { - // Do NOT change this to - // holder.view->buffer() as this code is used by both - // InsetBibKey and InsetBibtex! Ughhhhhhh!!!! - if (current_view->buffer()->isReadonly()) { - WarnReadonly(current_view->buffer()->fileName()); - break; - } - - string key = fl_get_input(form->key); - string label = fl_get_input(form->label); - if (key != getContents()) - current_view->ChangeCitationsIfUnique(getContents(), - key); - - if (key != getContents() || label != getOptions()) { - setContents(key); - setOptions(label); - current_view->updateInset(this, true); - // We need to do a redraw becuase the maximum - // InsetBibKey width could have changed. - current_view->redraw(); - current_view->fitCursor(getLyXText(current_view)); - } // fall through to Cancel - } - case 0: - fl_hide_form(form->bibitem_form); - break; - } -} - - void InsetBibKey::setCounter(int c) { counter = c; @@ -195,41 +107,9 @@ string const InsetBibKey::getScreenLabel() const } -/** - The value in "Key:" isn't allways set right after a few bibkey insets have - been added/removed. Perhaps the wrong object is deleted/used somewhere - upwards? - (Joacim 1998-03-04) -*/ void InsetBibKey::Edit(BufferView * bv, int, int, unsigned int) -{ - if (bv->buffer()->isReadonly()) - WarnReadonly(bv->buffer()->fileName()); - - if (!bibitem_form) { - bibitem_form = create_form_bibitem_form(); - fl_set_form_atclose(bibitem_form->bibitem_form, - CancelCloseBoxCB, 0); - } - - holder.inset = this; - holder.view = bv; - - bibitem_form->bibitem_form->u_vdata = &holder; - // InsetBibtex uses the same form, with different labels - fl_set_object_label(bibitem_form->key, idex(_("Key:|#K"))); - fl_set_button_shortcut(bibitem_form->key, scex(_("Key:|#K")), 1); - fl_set_object_label(bibitem_form->label, idex(_("Label:|#L"))); - fl_set_button_shortcut(bibitem_form->label, scex(_("Label:|#L")), 1); - fl_set_input(bibitem_form->key, getContents().c_str()); - fl_set_input(bibitem_form->label, getOptions().c_str()); - if (bibitem_form->bibitem_form->visible) { - fl_raise_form(bibitem_form->bibitem_form); - } else { - fl_show_form(bibitem_form->bibitem_form, - FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT, - _("Bibliography item")); - } +{ + bv->owner()->getDialogs()->showBibitem(this); } @@ -240,10 +120,6 @@ InsetBibtex::InsetBibtex(InsetCommandParams const & p) InsetBibtex::~InsetBibtex() { - if (bibitem_form && bibitem_form->bibitem_form - && bibitem_form->bibitem_form->visible - && bibitem_form->bibitem_form->u_vdata == &holder) - fl_hide_form(bibitem_form->bibitem_form); } @@ -335,30 +211,9 @@ vector > const InsetBibtex::getKeys(Buffer const * buffer) } -// BibTeX should have its own dialog. This is provisional. void InsetBibtex::Edit(BufferView * bv, int, int, unsigned int) { - if (!bibitem_form) { - bibitem_form = create_form_bibitem_form(); - fl_set_form_atclose(bibitem_form->bibitem_form, - CancelCloseBoxCB, 0); - } - - holder.inset = this; - holder.view = bv; - bibitem_form->bibitem_form->u_vdata = &holder; - - fl_set_object_label(bibitem_form->key, _("Database:")); - fl_set_object_label(bibitem_form->label, _("Style: ")); - fl_set_input(bibitem_form->key, getContents().c_str()); - fl_set_input(bibitem_form->label, getOptions().c_str()); - if (bibitem_form->bibitem_form->visible) { - fl_raise_form(bibitem_form->bibitem_form); - } else { - fl_show_form(bibitem_form->bibitem_form, - FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT, - _("BibTeX")); - } + bv->owner()->getDialogs()->showBibtex(this); } diff --git a/src/insets/insetbib.h b/src/insets/insetbib.h index fa58d77894..6995e60055 100644 --- a/src/insets/insetbib.h +++ b/src/insets/insetbib.h @@ -20,7 +20,6 @@ #include "insetcommand.h" class Buffer; -struct FD_bibitem_form; /** Used to insert bibitem's information (key and label) @@ -60,8 +59,6 @@ public: /// string const getBibLabel() const; /// - void callback( FD_bibitem_form *, long ); - /// struct Holder { InsetBibKey * inset; BufferView * view; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index 698e5dc934..47cd6f2e60 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -7,9 +7,9 @@ #pragma implementation #endif -#include FORMS_H_LOCATION +#include "frontends/Dialogs.h" + #include "insetinclude.h" -#include "filedlg.h" #include "buffer.h" #include "bufferlist.h" #include "debug.h" @@ -17,9 +17,7 @@ #include "lyxrc.h" #include "LyXView.h" #include "LaTeXFeatures.h" -#include "lyx_gui_misc.h" // CancelCloseBoxCB #include "gettext.h" -#include "include_form.h" #include "support/FileInfo.h" #include "layout.h" #include "lyxfunc.h" @@ -29,168 +27,9 @@ using std::endl; using std::vector; using std::pair; -extern BufferView * current_view; - extern BufferList bufferlist; -FD_include * create_form_include(void) -{ - FL_OBJECT * obj; - FD_include * fdui = (FD_include *) fl_calloc(1, sizeof(FD_include)); - - fdui->include = fl_bgn_form(FL_NO_BOX, 340, 210); - obj = fl_add_box(FL_UP_BOX, 0, 0, 340, 210, ""); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 70, 160, 90, ""); - fdui->browsebt = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 30, 100, 30, idex(_("Browse|#B"))); - fl_set_button_shortcut(obj, scex(_("Browse|#B")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 0); - fdui->flag1 = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 70, 150, 30, idex(_("Don't typeset|#D"))); - fl_set_button_shortcut(obj, scex(_("Don't typeset|#D")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - obj = fl_add_button(FL_RETURN_BUTTON, 120, 170, 100, 30, _("OK")); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 1); - obj = fl_add_button(FL_NORMAL_BUTTON, 230, 170, 100, 30, idex(_("Cancel|^["))); - fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 2); - obj = fl_add_button(FL_NORMAL_BUTTON, 230, 130, 100, 30, idex(_("Load|#L"))); - fl_set_button_shortcut(obj, scex(_("Load|#L")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 5); - fdui->input = obj = fl_add_input(FL_NORMAL_INPUT, 10, 30, 210, 30, idex(_("File name:|#F"))); - fl_set_input_shortcut(obj, scex(_("File name:|#F")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); - fdui->flag41 = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 100, 150, 30, idex(_("Visible space|#s"))); - fl_set_button_shortcut(obj, scex(_("Visible space|#s")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - - fdui->include_grp = fl_bgn_group(); - fdui->flag4 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 130, 160, 30, idex(_("Verbatim|#V"))); - fl_set_button_shortcut(obj, scex(_("Verbatim|#V")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 10); - fdui->flag2 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 100, 160, 30, idex(_("Use input|#i"))); - fl_set_button_shortcut(obj, scex(_("Use input|#i")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 11); - fdui->flag3 = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 70, 160, 30, idex(_("Use include|#U"))); - fl_set_button_shortcut(obj, scex(_("Use include|#U")), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, include_cb, 11); - fl_end_group(); - - fl_end_form(); - - //fdui->include->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - - -FD_include * form = 0; - -extern "C" -void include_cb(FL_OBJECT *, long arg) -{ - - InsetInclude * inset = static_cast(form->include->u_vdata); - switch (arg) { - case 0: - { - // Should browsing too be disabled in RO-mode? - LyXFileDlg fileDlg; - string const mpath = OnlyPath(inset->getMasterFilename()); - string ext; - - if (fl_get_button(form->flag2)) // Use Input Button - ext = "*.tex"; - else if (fl_get_button(form->flag4)) // Verbatim all files - ext = "*"; - else - ext = "*.lyx"; - // launches dialog - fileDlg.SetButton(0, _("Documents"), lyxrc.document_path); - - // Use by default the master's path - string const filename = - fileDlg.Select(_("Select Child Document"), - mpath, ext, - inset->getContents()); - XFlush(fl_get_display()); - - // check selected filename - if (!filename.empty()) { - string const filename2 = MakeRelPath(filename, - mpath); - if (prefixIs(filename2, "..")) - fl_set_input(form->input, - filename.c_str()); - else - fl_set_input(form->input, - filename2.c_str()); - } - break; - } - - case 1: - if (!current_view->buffer()->isReadonly()) { - inset->setContents(fl_get_input(form->input)); - // don't typeset - inset->setNoLoad(fl_get_button(form->flag1)); - if (fl_get_button(form->flag2)) - inset->setInput(); - else if (fl_get_button(form->flag3)) - inset->setInclude(); - else if (fl_get_button(form->flag4)) { - inset->setVerb(); - inset->setVisibleSpace(fl_get_button(form->flag41)); - } - - fl_hide_form(form->include); - current_view->updateInset(inset, true); - break; - } // fall through - - case 2: - fl_hide_form(form->include); - break; - case 5: - if (!current_view->buffer()->isReadonly()) { - inset->setContents(fl_get_input(form->input)); - inset->setNoLoad(fl_get_button(form->flag1)); - if (fl_get_button(form->flag2)) - inset->setInput(); - else if (fl_get_button(form->flag3)) - inset->setInclude(); - else if (fl_get_button(form->flag4)) { - inset->setVerb(); - inset->setVisibleSpace(fl_get_button(form->flag41)); - } - - fl_hide_form(form->include); - current_view->updateInset(inset, true); - current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, inset->getContents()); - } - break; - - case 10: - fl_activate_object(form->flag41); - fl_set_object_lcol(form->flag41, FL_BLACK); - break; - case 11: - fl_deactivate_object(form->flag41); - fl_set_object_lcol(form->flag41, FL_INACTIVE); - fl_set_button(form->flag41, 0); - break; - } -} - - static inline string unique_id() { static unsigned int seed = 1000; @@ -214,18 +53,6 @@ InsetInclude::InsetInclude(InsetCommandParams const & p, Buffer const & bf) InsetInclude::~InsetInclude() { - if (form && form->include->u_vdata == this) { - // this inset is in the popup so hide the popup - // and remove the reference to this inset. ARRae - if (form->include) { - if (form->include->visible) { - fl_hide_form(form->include); - } - fl_free_form(form->include); - } - fl_free(form); - form = 0; - } } @@ -247,35 +74,7 @@ Inset * InsetInclude::Clone(Buffer const & buffer) const void InsetInclude::Edit(BufferView * bv, int, int, unsigned int) { - if (bv->buffer()->isReadonly()) - WarnReadonly(bv->buffer()->fileName()); - - if (!form) { - form = create_form_include(); - fl_set_form_atclose(form->include, CancelCloseBoxCB, 0); - } - form->include->u_vdata = this; - - fl_set_input(form->input, getContents().c_str()); - fl_set_button(form->flag1, int(isNoLoad())); - fl_set_button(form->flag2, int(isInput())); - fl_set_button(form->flag3, int(isInclude())); - fl_set_button(form->flag4, int(isVerb())); - if (isVerb()) - fl_set_button(form->flag41, int(isVerbVisibleSpace())); - else { - fl_set_button(form->flag41, 0); - fl_deactivate_object(form->flag41); - fl_set_object_lcol(form->flag41, FL_INACTIVE); - } - - if (form->include->visible) { - fl_raise_form(form->include); - } else { - fl_show_form(form->include, - FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT, - _("Include")); - } + bv->owner()->getDialogs()->showInclude(this); } diff --git a/src/lyx.C b/src/lyx.C index 8bf911377a..2e79c1fc94 100644 --- a/src/lyx.C +++ b/src/lyx.C @@ -9,24 +9,6 @@ #include #include "lyx.h" -FD_form_title *create_form_form_title(void) -{ - FL_OBJECT *obj; - FD_form_title *fdui = (FD_form_title *) fl_calloc(1, sizeof(FD_form_title)); - - fdui->form_title = fl_bgn_form(FL_NO_BOX, 420, 290); - obj = fl_add_box(FL_UP_BOX, 0, 0, 420, 290, ""); - fl_set_object_color(obj, FL_BLACK, FL_TOP_BCOL); - fdui->timer_title = obj = fl_add_timer(FL_HIDDEN_TIMER, 110, 170, 190, 60, ""); - fl_set_object_callback(obj, TimerCB, 0); - fl_end_form(); - - fdui->form_title->fdui = fdui; - - return fdui; -} -/*---------------------------------------*/ - FD_form_figure *create_form_form_figure(void) { FL_OBJECT *obj; diff --git a/src/lyx.h b/src/lyx.h index 6847ebfd40..9172685e08 100644 --- a/src/lyx.h +++ b/src/lyx.h @@ -4,8 +4,6 @@ #define FD_form_title_h_ /** Callbacks, globals and object handlers **/ -extern "C" void TimerCB(FL_OBJECT *, long); - extern "C" void FigureOKCB(FL_OBJECT *, long); extern "C" void FigureApplyCB(FL_OBJECT *, long); extern "C" void FigureCancelCB(FL_OBJECT *, long); @@ -20,15 +18,6 @@ extern "C" void ExternalCancelCB(FL_OBJECT *, long); /**** Forms and Objects ****/ -typedef struct { - FL_FORM *form_title; - void *vdata; - char *cdata; - long ldata; - FL_OBJECT *timer_title; -} FD_form_title; - -extern FD_form_title * create_form_form_title(void); typedef struct { FL_FORM *form_figure; void *vdata; diff --git a/src/lyx_cb.C b/src/lyx_cb.C index 6789987119..17fddc5b18 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -53,7 +53,6 @@ extern Combox * combo_language; extern Combox * combo_language2; extern BufferList bufferlist; extern void show_symbols_form(); -extern FD_form_title * fd_form_title; extern FD_form_character * fd_form_character; extern FD_form_preamble * fd_form_preamble; extern FD_form_figure * fd_form_figure; @@ -787,23 +786,6 @@ LyXFont const UserFreeFont(BufferParams const & params) } -/* callbacks for form form_title */ -extern "C" -void TimerCB(FL_OBJECT *, long) -{ - // only if the form still exists - if (lyxrc.show_banner - && fd_form_title - && fd_form_title->form_title) { - if (fd_form_title->form_title->visible) { - fl_hide_form(fd_form_title->form_title); - } - fl_free_form(fd_form_title->form_title); - fd_form_title->form_title = 0; - } -} - - /* callbacks for form form_character */ extern "C" diff --git a/src/lyx_gui.C b/src/lyx_gui.C index bd5e9915a0..6003d63680 100644 --- a/src/lyx_gui.C +++ b/src/lyx_gui.C @@ -41,12 +41,12 @@ #include "bufferlist.h" #include "language.h" #include "ColorHandler.h" +#include "frontends/Dialogs.h" #include "frontends/GUIRunTime.h" #include "frontends/xforms/xform_helpers.h" // for XformColor using std::endl; -FD_form_title * fd_form_title; FD_form_character * fd_form_character; FD_form_preamble * fd_form_preamble; FD_form_sendto * fd_form_sendto; @@ -279,32 +279,6 @@ void LyXGUI::create_forms() // Create forms // - // the title form - string banner_file = LibFileSearch("images", "banner", "xpm"); - if (lyxrc.show_banner && !banner_file.empty()) { - fd_form_title = create_form_form_title(); - fl_set_form_dblbuffer(fd_form_title->form_title, 1); // use dbl buffer - fl_set_form_atclose(fd_form_title->form_title, CancelCloseBoxCB, 0); - fl_addto_form(fd_form_title->form_title); - FL_OBJECT *obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 0, 0, 425, 290, ""); - fl_set_pixmapbutton_file(obj, banner_file.c_str()); - - fl_set_pixmapbutton_focus_outline(obj, 3); - fl_set_button_shortcut(obj, "^M ^[", 1); - fl_set_object_boxtype(obj, FL_NO_BOX); - fl_set_object_callback(obj, TimerCB, 0); - - obj = fl_add_text(FL_NORMAL_TEXT, 248, 265, 170, 16, LYX_VERSION); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_mapcolor(FL_FREE_COL2, 0x05, 0x2e, 0x4c); - fl_mapcolor(FL_FREE_COL3, 0xe1, 0xd2, 0x9b); - fl_set_object_color(obj, FL_FREE_COL2, FL_FREE_COL2); - fl_set_object_lcol(obj, FL_FREE_COL3); - fl_set_object_lalign(obj, FL_ALIGN_CENTER|FL_ALIGN_INSIDE); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); - fl_end_form(); - } - // the character form fd_form_character = create_form_form_character(); fl_set_form_atclose(fd_form_character->form_character, @@ -376,32 +350,16 @@ void LyXGUI::create_forms() // Show the main & title form int main_placement = FL_PLACE_CENTER | FL_FREE_SIZE; - int title_placement = FL_PLACE_CENTER; // Did we get a valid position? if (xpos >= 0 && ypos >= 0) { lyxViews->setPosition(xpos, ypos); - if (lyxrc.show_banner) { - // show the title form in the middle of the main form - fl_set_form_position(fd_form_title->form_title, - abs(xpos + (width/2) - (370 / 2)), - abs(ypos + (height/2) - (290 / 2))); - title_placement = FL_PLACE_GEOMETRY; - // The use of abs() above is a trick to ensure - // valid positions - } - main_placement = FL_PLACE_POSITION; + main_placement = FL_PLACE_POSITION; } - lyxViews->show(main_placement, FL_FULLBORDER, "LyX"); - if (lyxrc.show_banner) { - fl_show_form(fd_form_title->form_title, - title_placement, FL_NOBORDER, - _("LyX Banner")); - fl_redraw_form(fd_form_title->form_title); - fl_raise_form(fd_form_title->form_title); - // Show the title form at most 7 secs (lowered from 10 secs) - fl_set_timer(fd_form_title->timer_title, 7); - } + lyxViews->show(main_placement, FL_FULLBORDER, "LyX"); + + if (lyxrc.show_banner) + lyxViews->getDialogs()->showSplash(); } diff --git a/src/lyx_gui_misc.C b/src/lyx_gui_misc.C index 63ea295635..99ea77f214 100644 --- a/src/lyx_gui_misc.C +++ b/src/lyx_gui_misc.C @@ -18,12 +18,10 @@ #include #include "lyx_gui_misc.h" #include "BufferView.h" -#include "bibforms.h" #include "buffer.h" #include "credits_form.h" #include "form1.h" #include "gettext.h" -#include "include_form.h" #include "layout_forms.h" #include "lyx.h" #include "lyx_cb.h" @@ -55,8 +53,6 @@ extern FD_delim * fd_delim; extern FD_deco * fd_deco; extern FD_space * fd_space; extern FD_matrix * fd_matrix; -extern FD_bibitem_form * bibitem_form; -extern FD_include * form; extern void HideFiguresPopups(); @@ -69,9 +65,6 @@ extern "C" int CancelCloseBoxCB(FL_FORM *, void *) // that the xform colors have been re-mapped). void RedrawAllBufferRelatedDialogs() { - if (bibitem_form && bibitem_form->bibitem_form->visible) { - fl_redraw_form(bibitem_form->bibitem_form); - } if (fd_deco && fd_deco->deco->visible) { fl_redraw_form(fd_deco->deco); } @@ -110,9 +103,6 @@ void RedrawAllBufferRelatedDialogs() if (fd_space && fd_space->space->visible) { fl_redraw_form(fd_space->space); } - if (form && form->include->visible) { - fl_redraw_form(form->include); - } } // Prevents LyX from crashing when no buffers available @@ -167,16 +157,6 @@ void CloseAllBufferRelatedDialogs() fl_hide_form(fd_matrix->matrix); } } - if (bibitem_form) { - if (bibitem_form->bibitem_form->visible) { - fl_hide_form(bibitem_form->bibitem_form); - } - } - if (form) { - if (form->include->visible) { - fl_hide_form(form->include); - } - } HideFiguresPopups(); } @@ -254,16 +234,6 @@ void updateAllVisibleBufferRelatedDialogs(bool) } } #endif - if (bibitem_form) { - if (bibitem_form->bibitem_form->visible) { - fl_hide_form(bibitem_form->bibitem_form); - } - } - if (form) { - if (form->include->visible) { - fl_hide_form(form->include); - } - } HideFiguresPopups(); } diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 63670cc57b..ff17692e25 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -2751,17 +2751,35 @@ string const LyXFunc::Dispatch(int ac, } break; - case LFUN_CHILDINSERT: + case LFUN_CHILD_CREATE: { - InsetCommandParams p( "include", argument ); - Inset * inset = new InsetInclude(p, *owner->buffer()); - if (owner->view()->insertInset(inset, "Standard", true)) - inset->Edit(owner->view(), 0, 0, 0); - else - delete inset; + InsetCommandParams p("include"); + + if (!argument.empty()) { + if (contains(argument, "|")) { + p.setContents(token(argument, '|', 0)); + p.setOptions(token(argument, '|', 1)); + } else + p.setContents(argument); + Dispatch(LFUN_CHILD_INSERT, p.getAsString()); + } else + owner->getDialogs()->createInclude(p.getAsString()); } break; + case LFUN_CHILD_INSERT: + { + InsetCommandParams p; + p.setFromString(argument); + + InsetInclude * inset = new InsetInclude(p, *owner->buffer()); + if (!owner->view()->insertInset(inset)) + delete inset; + else + owner->view()->updateInset(inset, true); + } + break; + case LFUN_CHILDOPEN: { string const filename = diff --git a/src/lyxvc.h b/src/lyxvc.h index a0d8227ae6..e2cc228138 100644 --- a/src/lyxvc.h +++ b/src/lyxvc.h @@ -68,7 +68,11 @@ public: /// Undo last check-in. void undoLast(); - /// generate a log file and return the filename + /** + * Generate a log file and return the filename. + * It is the caller's responsibility to unlink the + * file after use. + */ const string getLogFile() const; /// diff --git a/src/support/lyxfunctional.h b/src/support/lyxfunctional.h index 19e15c20e8..55382cc081 100644 --- a/src/support/lyxfunctional.h +++ b/src/support/lyxfunctional.h @@ -5,6 +5,7 @@ /** \file lyxfunctional.h \brief Convenient function objects for use with LyX + This is currently a small collection of small function objects for use together with std::algorithms. **/ diff --git a/src/vspace.C b/src/vspace.C index 3c46446067..177f62de74 100644 --- a/src/vspace.C +++ b/src/vspace.C @@ -50,8 +50,7 @@ static LyXLength::UNIT unit[4] = { LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE }; -//static int number_index, unit_index; -int number_index, unit_index; +static int number_index, unit_index; static inline @@ -459,16 +458,16 @@ VSpace::VSpace (string const & data) bool VSpace::operator==(VSpace const & other) const { - if (this->kin == other.kin) - if (this->kin == LENGTH) - if (this->len == other.len) - return this->kp == other.kp; - else - return false; - else - return this->kp == other.kp; - else + if (this->kin != other.kin) return false; + + if (this->kin != LENGTH) + return this->kp == other.kp; + + if (!(this->len == other.len)) + return false; + + return this->kp == other.kp; }