mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
ws changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5758 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
271b807e8b
commit
13349032cb
@ -1,3 +1,7 @@
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* several files: ws changes
|
||||
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* text2.C (setCounter): clean up a bit, use boost.format.
|
||||
|
@ -65,7 +65,7 @@ void InsetList::iterator::setInset(Inset * inset)
|
||||
}
|
||||
|
||||
|
||||
InsetList::~InsetList()
|
||||
InsetList::~InsetList()
|
||||
{
|
||||
// If we begin storing a shared_ptr in the List
|
||||
// this code can be removed. (Lgb)
|
||||
@ -156,7 +156,7 @@ Inset * InsetList::release(pos_type pos)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Inset * InsetList::get(pos_type pos) const
|
||||
{
|
||||
InsetTable search_elem(pos, 0);
|
||||
@ -231,9 +231,9 @@ bool operator==(InsetList::iterator const & i1,
|
||||
InsetList::iterator const & i2)
|
||||
{
|
||||
return i1.it == i2.it;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool operator!=(InsetList::iterator const & i1,
|
||||
InsetList::iterator const & i2)
|
||||
|
@ -131,5 +131,5 @@ private:
|
||||
|
||||
/// singleton instance
|
||||
extern LyXAction lyxaction;
|
||||
|
||||
|
||||
#endif // LYXACTION_H
|
||||
|
@ -53,8 +53,8 @@ public:
|
||||
|
||||
/// return the next near miss after a MISSED result
|
||||
virtual string const nextMiss() = 0;
|
||||
|
||||
/// give an error message on messy exit
|
||||
|
||||
/// give an error message on messy exit
|
||||
virtual string const error() = 0;
|
||||
|
||||
};
|
||||
|
@ -8,9 +8,9 @@
|
||||
|
||||
#ifndef WORD_LANG_TUPLE_H
|
||||
#define WORD_LANG_TUPLE_H
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
/**
|
||||
* A word and its given language code ("en_US").
|
||||
* This is used for spellchecking.
|
||||
@ -18,11 +18,11 @@
|
||||
class WordLangTuple {
|
||||
public:
|
||||
WordLangTuple() {}
|
||||
|
||||
|
||||
WordLangTuple(string const & w, string const & c)
|
||||
: word_(w), code_(c)
|
||||
{}
|
||||
|
||||
|
||||
/// return the word
|
||||
string const & word() const {
|
||||
return word_;
|
||||
@ -39,5 +39,5 @@ private:
|
||||
/// language code of word
|
||||
string code_;
|
||||
};
|
||||
|
||||
|
||||
#endif // WORD_LANG_TUPLE_H
|
||||
|
@ -690,7 +690,7 @@ bool Converters::convert(Buffer const * buffer,
|
||||
<< " to " << real_outfile
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
if (!conv.parselog.empty()) {
|
||||
string const logfile = infile2 + ".log";
|
||||
string const script = LibScriptSearch(conv.parselog);
|
||||
|
@ -254,12 +254,12 @@ bool Encodings::IsComposeChar_hebrew(unsigned char c)
|
||||
|
||||
|
||||
// Special Arabic letters are ones that do not get connected from left
|
||||
// they are hamza, alef_madda, alef_hamza, waw_hamza, alef_hamza_under,
|
||||
// they are hamza, alef_madda, alef_hamza, waw_hamza, alef_hamza_under,
|
||||
// alef, tah_marbota, dal, thal, rah, zai, wow, alef_maksoura
|
||||
|
||||
bool Encodings::is_arabic_special(unsigned char c)
|
||||
{
|
||||
return (c >= 0xc1 && c <= 0xc5) ||
|
||||
return (c >= 0xc1 && c <= 0xc5) ||
|
||||
c == 0xc7 || c == 0xc9 ||
|
||||
c == 0xcf || c == 0xe8 ||
|
||||
(c >= 0xd0 && c <= 0xd2) ||
|
||||
|
@ -19,4 +19,3 @@ class FuncRequest;
|
||||
Inset * createInset(FuncRequest const & cmd);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -1,12 +1,16 @@
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* several files: ws changes
|
||||
|
||||
2002-11-17 John Levon <levon@movementarian.org>
|
||||
|
||||
* FileDialog.h: split Select() into open()/save() for
|
||||
benefit of Qt
|
||||
|
||||
|
||||
2002-11-01 Herbert Voss <voss@perce.de>
|
||||
|
||||
* ControlGraphics.C: "Default" is now a part of the rotate-list
|
||||
|
||||
|
||||
* ControlGraphics.C: "Default" is now a part of the rotate-list
|
||||
|
||||
2002-11-04 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* lyx_gui.h: do not use std:: on string
|
||||
|
@ -2,7 +2,7 @@
|
||||
* \file frontends/Dialogs.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*
|
||||
@ -22,23 +22,23 @@
|
||||
template<typename Signal>
|
||||
class BugfixSignal {
|
||||
public:
|
||||
Signal & operator()() { return thesignal(); }
|
||||
Signal const & operator()() const { return thesignal(); }
|
||||
Signal & operator()() { return thesignal(); }
|
||||
Signal const & operator()() const { return thesignal(); }
|
||||
|
||||
private:
|
||||
Signal & thesignal() const
|
||||
{
|
||||
if (!signal_.get())
|
||||
signal_.reset(new Signal);
|
||||
return *signal_;
|
||||
}
|
||||
Signal & thesignal() const
|
||||
{
|
||||
if (!signal_.get())
|
||||
signal_.reset(new Signal);
|
||||
return *signal_;
|
||||
}
|
||||
|
||||
mutable boost::scoped_ptr<Signal> signal_;
|
||||
mutable boost::scoped_ptr<Signal> signal_;
|
||||
};
|
||||
|
||||
|
||||
boost::signal0<void> & Dialogs::redrawGUI()
|
||||
{
|
||||
static BugfixSignal<boost::signal0<void> > thesignal;
|
||||
return thesignal();
|
||||
static BugfixSignal<boost::signal0<void> > thesignal;
|
||||
return thesignal();
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class LyXKeySym;
|
||||
|
||||
namespace LyXKeySymFactory {
|
||||
/**
|
||||
* Make a LyXKeySym. Used because we want to
|
||||
* Make a LyXKeySym. Used because we want to
|
||||
* generate a toolkit-specific instance.
|
||||
*/
|
||||
LyXKeySym * create();
|
||||
|
@ -3,20 +3,20 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
||||
#ifndef LYXSCREENFACTORY_H
|
||||
#define LYXSCREENFACTORY_H
|
||||
|
||||
|
||||
class WorkArea;
|
||||
class LyXScreen;
|
||||
|
||||
namespace LyXScreenFactory {
|
||||
/**
|
||||
* Make a screen renderer. Used because we want to
|
||||
* Make a screen renderer. Used because we want to
|
||||
* generate a toolkit-specific instance.
|
||||
*/
|
||||
LyXScreen * create(WorkArea & owner);
|
||||
|
@ -4,8 +4,8 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author John Levon
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -122,7 +122,7 @@ public:
|
||||
|
||||
/// focus the command buffer (minibuffer)
|
||||
boost::signal0<void> focus_command_buffer;
|
||||
|
||||
|
||||
/// view state string changed
|
||||
boost::signal0<void> view_state_changed;
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
|
||||
/// dispatch to current BufferView
|
||||
void dispatch(FuncRequest const & req);
|
||||
|
||||
|
||||
protected:
|
||||
/// view of a buffer. Eventually there will be several.
|
||||
boost::shared_ptr<BufferView> bufferview_;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author unknown
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -19,9 +19,9 @@
|
||||
#include "lyxfont.h"
|
||||
#include "WorkArea.h"
|
||||
#include "frontends/font_metrics.h"
|
||||
|
||||
|
||||
using std::max;
|
||||
|
||||
|
||||
Painter & Painter::button(int x, int y, int w, int h)
|
||||
{
|
||||
fillRectangle(x, y, w, h, LColor::buttonbg);
|
||||
@ -37,10 +37,10 @@ Painter & Painter::buttonFrame(int x, int y, int w, int h)
|
||||
|
||||
fillRectangle(x, y, w, d, LColor::top);
|
||||
fillRectangle(x, (y + h - d), w, d, LColor::bottom);
|
||||
|
||||
|
||||
// Now a couple of trapezoids
|
||||
int x1[4], y1[4];
|
||||
|
||||
|
||||
x1[0] = x + d; y1[0] = y + d;
|
||||
x1[1] = x + d; y1[1] = (y + h - d);
|
||||
x1[2] = x; y1[2] = y + h;
|
||||
@ -57,8 +57,8 @@ Painter & Painter::buttonFrame(int x, int y, int w, int h)
|
||||
}
|
||||
|
||||
|
||||
Painter & Painter::rectText(int x, int baseline,
|
||||
string const & str,
|
||||
Painter & Painter::rectText(int x, int baseline,
|
||||
string const & str,
|
||||
LyXFont const & font,
|
||||
LColor::color back,
|
||||
LColor::color frame)
|
||||
@ -68,23 +68,23 @@ Painter & Painter::rectText(int x, int baseline,
|
||||
int descent;
|
||||
|
||||
font_metrics::rectText(str, font, width, ascent, descent);
|
||||
|
||||
|
||||
if (back != LColor::none) {
|
||||
fillRectangle(x + 1, baseline - ascent + 1, width - 1,
|
||||
fillRectangle(x + 1, baseline - ascent + 1, width - 1,
|
||||
ascent + descent - 1, back);
|
||||
}
|
||||
|
||||
|
||||
if (frame != LColor::none) {
|
||||
rectangle(x, baseline - ascent, width, ascent + descent, frame);
|
||||
}
|
||||
|
||||
|
||||
text(x + 3, baseline, str, font);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Painter & Painter::buttonText(int x, int baseline,
|
||||
string const & str,
|
||||
string const & str,
|
||||
LyXFont const & font)
|
||||
{
|
||||
int width;
|
||||
@ -92,7 +92,7 @@ Painter & Painter::buttonText(int x, int baseline,
|
||||
int descent;
|
||||
|
||||
font_metrics::buttonText(str, font, width, ascent, descent);
|
||||
|
||||
|
||||
button(x, baseline - ascent, width, descent + ascent);
|
||||
text(x + 4, baseline, str, font);
|
||||
return *this;
|
||||
@ -103,7 +103,7 @@ void Painter::underline(LyXFont const & f, int x, int y, int width)
|
||||
{
|
||||
int const below = max(font_metrics::maxDescent(f) / 2, 2);
|
||||
int const height = max((font_metrics::maxDescent(f) / 4) - 1, 1);
|
||||
|
||||
|
||||
if (height < 2) {
|
||||
line(x, y + below, x + width, y + below, f.color());
|
||||
} else {
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TIMEOUT_H
|
||||
#define TIMEOUT_H
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Lars Gullik Bjønnes
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -3,16 +3,16 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
||||
#ifndef WORKAREAFACTORY_H
|
||||
#define WORKAREAFACTORY_H
|
||||
|
||||
|
||||
class WorkArea;
|
||||
|
||||
|
||||
namespace WorkAreaFactory {
|
||||
/**
|
||||
* Make a work area. Used because we want to generate
|
||||
|
@ -125,4 +125,3 @@ bool ButtonControllerBase::checkWidgets()
|
||||
// return valid status after checking ALL widgets
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* several files: ws changes
|
||||
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* ControlDocument.C (classApply): use boost.format
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
void addDaughter(void * key, ViewBase * v, ButtonControllerBase * bc);
|
||||
///
|
||||
void showDaughter(void *);
|
||||
|
||||
|
||||
private:
|
||||
///
|
||||
virtual void apply();
|
||||
@ -134,5 +134,5 @@ extern int const nr_latex_ams_ops;
|
||||
* math symbol.
|
||||
*/
|
||||
string const find_xpm(string const & name);
|
||||
|
||||
|
||||
#endif /* CONTROL_MATH_H */
|
||||
|
@ -23,10 +23,10 @@
|
||||
#include "LColor.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
||||
class Converters;
|
||||
class Formats;
|
||||
|
||||
|
||||
class ControlPrefs : public ControlDialogBI {
|
||||
public:
|
||||
ControlPrefs(LyXView &, Dialogs &);
|
||||
@ -34,29 +34,29 @@ public:
|
||||
// FIXME: we should probably devolve the individual
|
||||
// settings to methods here. But for now, this will
|
||||
// do
|
||||
|
||||
LyXRC & rc() { return rc_; }
|
||||
|
||||
LyXRC & rc() { return rc_; }
|
||||
|
||||
LyXRC const & rc() const { return rc_; }
|
||||
|
||||
|
||||
/// various file pickers
|
||||
string const browsebind(string const & file);
|
||||
string const browseUI(string const & file);
|
||||
string const browsekbmap(string const & file);
|
||||
string const browsedict(string const & file);
|
||||
|
||||
|
||||
/// general browse
|
||||
string const browse(string const & file, string const & title);
|
||||
|
||||
/// redraw widgets (for xforms color change)
|
||||
void redrawGUI();
|
||||
|
||||
|
||||
/// set a color
|
||||
void setColor(LColor::color col, string const & hex);
|
||||
|
||||
|
||||
/// update the screen fonts after change
|
||||
void updateScreenFonts();
|
||||
|
||||
|
||||
/// set global converters
|
||||
void setConverters(Converters const & conv);
|
||||
|
||||
@ -66,10 +66,10 @@ public:
|
||||
private:
|
||||
/// get current lyxrc
|
||||
virtual void setParams();
|
||||
|
||||
|
||||
/// apply current lyxrc
|
||||
virtual void apply();
|
||||
|
||||
|
||||
/// temporary lyxrc
|
||||
LyXRC rc_;
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "BufferView.h"
|
||||
#include "buffer.h"
|
||||
#include "lyxrc.h"
|
||||
#include "insets/insettabular.h"
|
||||
#include "insets/insettabular.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
@ -52,11 +52,11 @@ void ControlTabular::updateInset(InsetTabular * inset)
|
||||
view().build();
|
||||
dialog_built_ = true;
|
||||
}
|
||||
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ControlTabular::show(InsetTabular * inset)
|
||||
{
|
||||
inset_ = inset;
|
||||
@ -87,7 +87,7 @@ void ControlTabular::update()
|
||||
view().update();
|
||||
|
||||
// The widgets may not be valid, so refresh the button controller
|
||||
// FIXME: needed ?
|
||||
// FIXME: needed ?
|
||||
bc().refresh();
|
||||
}
|
||||
|
||||
@ -127,8 +127,8 @@ void ControlTabular::connectInset(InsetTabular * inset)
|
||||
}
|
||||
connect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
InsetTabular * ControlTabular::inset() const
|
||||
{
|
||||
lyx::Assert(inset_);
|
||||
@ -142,14 +142,14 @@ LyXTabular * ControlTabular::tabular() const
|
||||
return inset_->tabular.get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ControlTabular::set(LyXTabular::Feature f, string const & arg)
|
||||
{
|
||||
lyx::Assert(inset_);
|
||||
inset_->tabularFeatures(lv_.view().get(), f, arg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ControlTabular::metric() const
|
||||
{
|
||||
return lyxrc.default_papersize > BufferParams::PAPER_EXECUTIVEPAPER;
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
|
||||
/// get the inset
|
||||
InsetTabular * inset() const;
|
||||
|
||||
|
||||
/// get the contained tabular
|
||||
LyXTabular * tabular() const;
|
||||
|
||||
@ -40,16 +40,16 @@ public:
|
||||
|
||||
/// slot launching dialog to an existing inset.
|
||||
void showInset(InsetTabular *);
|
||||
|
||||
|
||||
/// update inset
|
||||
void updateInset(InsetTabular *);
|
||||
|
||||
|
||||
/// return true if units should default to metric
|
||||
bool metric() const;
|
||||
|
||||
|
||||
/// return true if actual cell is multicolumn
|
||||
bool isMulticolumnCell() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/// we can't do this ...
|
||||
@ -72,7 +72,7 @@ private:
|
||||
InsetTabular * inset_;
|
||||
/// inset::hide connection.
|
||||
boost::signals::connection ih_;
|
||||
|
||||
|
||||
/// is the dialog built ?
|
||||
bool dialog_built_;
|
||||
};
|
||||
|
@ -76,7 +76,7 @@ string const parseBibTeX(string data, string const & findkey);
|
||||
|
||||
/** Returns an iterator to the first key that meets the search
|
||||
criterion, or end() if unsuccessful.
|
||||
|
||||
|
||||
User supplies :
|
||||
the InfoMap of bibkeys info,
|
||||
the vector of keys to be searched,
|
||||
@ -111,7 +111,7 @@ struct CitationStyle {
|
||||
CitationStyle const getCitationStyle(string const & command);
|
||||
|
||||
/** Returns the LaTeX citation command
|
||||
|
||||
|
||||
User supplies :
|
||||
The CiteStyle enum,
|
||||
a flag forcing the full author list,
|
||||
@ -125,11 +125,11 @@ std::vector<CiteStyle> const getCiteStyles(bool usingNatbib);
|
||||
/**
|
||||
"Translates" the available Citation Styles into strings for this key.
|
||||
The returned string is displayed by the GUI.
|
||||
|
||||
|
||||
|
||||
|
||||
[XX] is used in place of the actual reference
|
||||
Eg, the vector will contain: [XX], Jones et al. [XX], ...
|
||||
|
||||
|
||||
User supplies :
|
||||
the key,
|
||||
the InfoMap of bibkeys info,
|
||||
@ -143,10 +143,10 @@ getNumericalStrings(string const & key,
|
||||
/**
|
||||
"Translates" the available Citation Styles into strings for this key.
|
||||
The returned string is displayed by the GUI.
|
||||
|
||||
|
||||
Eg, the vector will contain:
|
||||
Jones et al. (1990), (Jones et al. 1990), Jones et al. 1990, ...
|
||||
|
||||
|
||||
User supplies :
|
||||
the key,
|
||||
the InfoMap of bibkeys info,
|
||||
|
@ -31,19 +31,19 @@ vector<FamilyPair> const getFamilyData()
|
||||
pr.first = _("No change");
|
||||
pr.second = LyXFont::IGNORE_FAMILY;
|
||||
family[0] = pr;
|
||||
|
||||
|
||||
pr.first = _("Roman");
|
||||
pr.second = LyXFont::ROMAN_FAMILY;
|
||||
family[1] = pr;
|
||||
|
||||
|
||||
pr.first = _("Sans Serif");
|
||||
pr.second = LyXFont::SANS_FAMILY;
|
||||
family[2] = pr;
|
||||
|
||||
|
||||
pr.first = _("Typewriter");
|
||||
pr.second = LyXFont::TYPEWRITER_FAMILY;
|
||||
family[3] = pr;
|
||||
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = LyXFont::INHERIT_FAMILY;
|
||||
family[4] = pr;
|
||||
@ -57,19 +57,19 @@ vector<SeriesPair> const getSeriesData()
|
||||
vector<SeriesPair> series(4);
|
||||
|
||||
SeriesPair pr;
|
||||
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.second = LyXFont::IGNORE_SERIES;
|
||||
series[0] = pr;
|
||||
|
||||
|
||||
pr.first = _("Medium");
|
||||
pr.second = LyXFont::MEDIUM_SERIES;
|
||||
series[1] = pr;
|
||||
|
||||
|
||||
pr.first = _("Bold");
|
||||
pr.second = LyXFont::BOLD_SERIES;
|
||||
series[2] = pr;
|
||||
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = LyXFont::INHERIT_SERIES;
|
||||
series[3] = pr;
|
||||
@ -83,27 +83,27 @@ vector<ShapePair> const getShapeData()
|
||||
vector<ShapePair> shape(6);
|
||||
|
||||
ShapePair pr;
|
||||
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.second = LyXFont::IGNORE_SHAPE;
|
||||
shape[0] = pr;
|
||||
|
||||
|
||||
pr.first = _("Upright");
|
||||
pr.second = LyXFont::UP_SHAPE;
|
||||
shape[1] = pr;
|
||||
|
||||
|
||||
pr.first = _("Italic");
|
||||
pr.second = LyXFont::ITALIC_SHAPE;
|
||||
shape[2] = pr;
|
||||
|
||||
|
||||
pr.first = _("Slanted");
|
||||
pr.second = LyXFont::SLANTED_SHAPE;
|
||||
shape[3] = pr;
|
||||
|
||||
|
||||
pr.first = _("Small Caps");
|
||||
pr.second = LyXFont::SMALLCAPS_SHAPE;
|
||||
shape[4] = pr;
|
||||
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = LyXFont::INHERIT_SHAPE;
|
||||
shape[5] = pr;
|
||||
@ -117,59 +117,59 @@ vector<SizePair> const getSizeData()
|
||||
vector<SizePair> size(14);
|
||||
|
||||
SizePair pr;
|
||||
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.second = LyXFont::IGNORE_SIZE;
|
||||
size[0] = pr;
|
||||
|
||||
|
||||
pr.first = _("Tiny");
|
||||
pr.second = LyXFont::SIZE_TINY;
|
||||
size[1] = pr;
|
||||
|
||||
|
||||
pr.first = _("Smallest");
|
||||
pr.second = LyXFont::SIZE_SCRIPT;
|
||||
size[2] = pr;
|
||||
|
||||
|
||||
pr.first = _("Smaller");
|
||||
pr.second = LyXFont::SIZE_FOOTNOTE;
|
||||
size[3] = pr;
|
||||
|
||||
|
||||
pr.first = _("Small");
|
||||
pr.second = LyXFont::SIZE_SMALL;
|
||||
size[4] = pr;
|
||||
|
||||
|
||||
pr.first = _("Normal");
|
||||
pr.second = LyXFont::SIZE_NORMAL;
|
||||
size[5] = pr;
|
||||
|
||||
|
||||
pr.first = _("Large");
|
||||
pr.second = LyXFont::SIZE_LARGE;
|
||||
size[6] = pr;
|
||||
|
||||
|
||||
pr.first = _("Larger");
|
||||
pr.second = LyXFont::SIZE_LARGER;
|
||||
size[7] = pr;
|
||||
|
||||
|
||||
pr.first = _("Largest");
|
||||
pr.second = LyXFont::SIZE_LARGEST;
|
||||
size[8] = pr;
|
||||
|
||||
|
||||
pr.first = _("Huge");
|
||||
pr.second = LyXFont::SIZE_HUGE;
|
||||
size[9] = pr;
|
||||
|
||||
|
||||
pr.first = _("Huger");
|
||||
pr.second = LyXFont::SIZE_HUGER;
|
||||
size[10] = pr;
|
||||
|
||||
|
||||
pr.first = _("Increase");
|
||||
pr.second = LyXFont::INCREASE_SIZE;
|
||||
size[11] = pr;
|
||||
|
||||
|
||||
pr.first = _("Decrease");
|
||||
pr.second = LyXFont::DECREASE_SIZE;
|
||||
size[12] = pr;
|
||||
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = LyXFont::INHERIT_SIZE;
|
||||
size[13] = pr;
|
||||
@ -183,23 +183,23 @@ vector<BarPair> const getBarData()
|
||||
vector<BarPair> bar(5);
|
||||
|
||||
BarPair pr;
|
||||
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.second = IGNORE;
|
||||
bar[0] = pr;
|
||||
|
||||
|
||||
pr.first = _("Emph");
|
||||
pr.second = EMPH_TOGGLE;
|
||||
bar[1] = pr;
|
||||
|
||||
|
||||
pr.first = _("Underbar");
|
||||
pr.second = UNDERBAR_TOGGLE;
|
||||
bar[2] = pr;
|
||||
|
||||
|
||||
pr.first = _("Noun");
|
||||
pr.second = NOUN_TOGGLE;
|
||||
bar[3] = pr;
|
||||
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = INHERIT;
|
||||
bar[4] = pr;
|
||||
@ -213,47 +213,47 @@ vector<ColorPair> const getColorData()
|
||||
vector<ColorPair> color(11);
|
||||
|
||||
ColorPair pr;
|
||||
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.second = LColor::ignore;
|
||||
color[0] = pr;
|
||||
|
||||
|
||||
pr.first = _("No color");
|
||||
pr.second = LColor::none;
|
||||
color[1] = pr;
|
||||
|
||||
|
||||
pr.first = _("Black");
|
||||
pr.second = LColor::black;
|
||||
color[2] = pr;
|
||||
|
||||
|
||||
pr.first = _("White");
|
||||
pr.second = LColor::white;
|
||||
color[3] = pr;
|
||||
|
||||
|
||||
pr.first = _("Red");
|
||||
pr.second = LColor::red;
|
||||
color[4] = pr;
|
||||
|
||||
|
||||
pr.first = _("Green");
|
||||
pr.second = LColor::green;
|
||||
color[5] = pr;
|
||||
|
||||
|
||||
pr.first = _("Blue");
|
||||
pr.second = LColor::blue;
|
||||
color[6] = pr;
|
||||
|
||||
|
||||
pr.first = _("Cyan");
|
||||
pr.second = LColor::cyan;
|
||||
color[7] = pr;
|
||||
|
||||
|
||||
pr.first = _("Magenta");
|
||||
pr.second = LColor::magenta;
|
||||
color[8] = pr;
|
||||
|
||||
|
||||
pr.first = _("Yellow");
|
||||
pr.second = LColor::yellow;
|
||||
color[9] = pr;
|
||||
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = LColor::inherit;
|
||||
color[10] = pr;
|
||||
|
@ -45,7 +45,7 @@ string const browseFile(LyXView * lv, string const & filename,
|
||||
FileDialog::Result result;
|
||||
|
||||
while (true) {
|
||||
if (save)
|
||||
if (save)
|
||||
result = fileDlg.save(lastPath, pattern,
|
||||
OnlyFilename(filename));
|
||||
else
|
||||
@ -73,7 +73,7 @@ string const browseRelFile(LyXView * lv, string const & filename,
|
||||
string const & refpath,
|
||||
string const & title,
|
||||
string const & pattern,
|
||||
bool save,
|
||||
bool save,
|
||||
pair<string,string> const & dir1,
|
||||
pair<string,string> const & dir2)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author unknown
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -23,22 +23,22 @@ class LyXFont;
|
||||
*
|
||||
* The geometry is the standard typographical geometry,
|
||||
* as follows :
|
||||
*
|
||||
*
|
||||
* --------------+------------------<maxAscent
|
||||
* | |
|
||||
* <-------> (right bearing)
|
||||
* <-> (left bearing)
|
||||
* char ascent>___ |
|
||||
* ^ oooo | oooo
|
||||
* origin>____ | oo oo | oo oo
|
||||
* \| oo oo | oo oo
|
||||
* --------------+---ooooo--|--oooo-<baseline
|
||||
* | oo |
|
||||
* char | oo oo |
|
||||
* descent>______| oooo |
|
||||
* ^ oooo | oooo
|
||||
* origin>____ | oo oo | oo oo
|
||||
* \| oo oo | oo oo
|
||||
* --------------+---ooooo--|--oooo-<baseline
|
||||
* | oo |
|
||||
* char | oo oo |
|
||||
* descent>______| oooo |
|
||||
* <- width ->
|
||||
* --------------+----------+-------<maxDescent
|
||||
*
|
||||
*
|
||||
*/
|
||||
namespace font_metrics {
|
||||
/// return the maximum ascent of the font
|
||||
@ -66,21 +66,21 @@ namespace font_metrics {
|
||||
}
|
||||
/// FIXME ??
|
||||
int signedWidth(string const & s, LyXFont const & f);
|
||||
/**
|
||||
/**
|
||||
* fill in width,ascent,descent with the values for the
|
||||
* given string in the font.
|
||||
*/
|
||||
void rectText(string const & str, LyXFont const & font,
|
||||
int & width,
|
||||
int & ascent,
|
||||
int & width,
|
||||
int & ascent,
|
||||
int & descent);
|
||||
/**
|
||||
/**
|
||||
* fill in width,ascent,descent with the values for the
|
||||
* given string in the font for a button.
|
||||
*/
|
||||
void buttonText(string const & str, LyXFont const & font,
|
||||
int & width,
|
||||
int & ascent,
|
||||
int & width,
|
||||
int & ascent,
|
||||
int & descent);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* several files: ws changes
|
||||
|
||||
2002-09-25 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Dialogs.C:
|
||||
@ -24,10 +28,10 @@
|
||||
* dialogs/GERT.glade: Make ERT Properties dialog follow the GNOME hig.
|
||||
* GLog.C: use std::string, all the conversion is wasteful
|
||||
* GFloat.C
|
||||
* GFloat.h
|
||||
* GFloat.h
|
||||
* dialogs/GFloat.glade: Implement the Float Properties Dialog
|
||||
* dialogs/GAbout.glade
|
||||
* GAbout.C
|
||||
* dialogs/GAbout.glade
|
||||
* GAbout.C
|
||||
* GAbout.h: Temporary Aboutlyx implementation, waiting on some
|
||||
gtkmm bugs to finalise it.
|
||||
|
||||
@ -44,8 +48,8 @@
|
||||
|
||||
2002-06-02 Michael A. Koziarski <michael@koziarski.com>
|
||||
|
||||
== Gtkmm2 upgrade ==
|
||||
|
||||
== Gtkmm2 upgrade ==
|
||||
|
||||
* dialogs/*: Updated to glade-2 format.
|
||||
* Dialogs.C: add() calls updated
|
||||
* GError.C
|
||||
@ -75,7 +79,7 @@
|
||||
2002-05-23 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* FileDialog.C: LyXView moved into frontends/
|
||||
|
||||
|
||||
2002-04-09 Michael A. Koziarski <michael@koziarski.com>
|
||||
|
||||
* dialoges/GERT.glade
|
||||
|
@ -40,7 +40,7 @@ bool Dialogs::tooltipsEnabled()
|
||||
Dialogs::Dialogs(LyXView * lv)
|
||||
{
|
||||
|
||||
add(new GUI<ControlError,GErrorDialog,
|
||||
add(new GUI<ControlError,GErrorDialog,
|
||||
OkCancelPolicy, gnomeBC>(*lv, *this));
|
||||
add(new GUI<ControlERT, GERT,
|
||||
NoRepeatedApplyReadOnlyPolicy, gnomeBC>(*lv, *this));
|
||||
|
@ -1,11 +1,10 @@
|
||||
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file GAbout.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Michael Koziarski
|
||||
* \author Michael Koziarski
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -38,14 +37,14 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
|
||||
/// Returns true if the dialog input is in a valid state.
|
||||
bool validate() const;
|
||||
|
||||
|
||||
/// generated by accessors.py
|
||||
Gtk::Button * close_btn() const;
|
||||
/// generated by accessors.py
|
||||
@ -55,7 +54,7 @@ private:
|
||||
/// generated by accessors.py
|
||||
Gtk::TextView * copyright() const;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@ void GERT::build()
|
||||
|
||||
// Make sure everything is in the correct state.
|
||||
bc().refresh();
|
||||
|
||||
|
||||
// Manage the read-only aware widgets.
|
||||
bc().addReadOnly(open());
|
||||
bc().addReadOnly(inlined());
|
||||
@ -75,7 +75,7 @@ void GERT::apply()
|
||||
controller().params().status = InsetERT::Open;
|
||||
else if (collapsed()->get_active())
|
||||
controller().params().status = InsetERT::Collapsed;
|
||||
else
|
||||
else
|
||||
controller().params().status = InsetERT::Inlined;
|
||||
|
||||
}
|
||||
@ -99,19 +99,19 @@ void GERT::update()
|
||||
|
||||
}
|
||||
|
||||
Gtk::Button * GERT::close_btn() const
|
||||
Gtk::Button * GERT::close_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_close_btn");
|
||||
return getWidget<Gtk::Button>("r_close_btn");
|
||||
}
|
||||
Gtk::RadioButton * GERT::open() const
|
||||
Gtk::RadioButton * GERT::open() const
|
||||
{
|
||||
return getWidget<Gtk::RadioButton>("r_open");
|
||||
return getWidget<Gtk::RadioButton>("r_open");
|
||||
}
|
||||
Gtk::RadioButton * GERT::collapsed() const
|
||||
Gtk::RadioButton * GERT::collapsed() const
|
||||
{
|
||||
return getWidget<Gtk::RadioButton>("r_collapsed");
|
||||
return getWidget<Gtk::RadioButton>("r_collapsed");
|
||||
}
|
||||
Gtk::RadioButton * GERT::inlined() const
|
||||
Gtk::RadioButton * GERT::inlined() const
|
||||
{
|
||||
return getWidget<Gtk::RadioButton>("r_inlined");
|
||||
return getWidget<Gtk::RadioButton>("r_inlined");
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
@ -57,7 +57,7 @@ private:
|
||||
Gtk::RadioButton * collapsed() const;
|
||||
/// generated by accessors.py
|
||||
Gtk::RadioButton * inlined() const;
|
||||
|
||||
|
||||
|
||||
/// do input validation
|
||||
SigC::Connection slot_open;
|
||||
|
@ -46,12 +46,12 @@ void GErrorDialog::update()
|
||||
textarea()->get_buffer()->set_text(controller().params());
|
||||
}
|
||||
|
||||
Gtk::Button * GErrorDialog::button_close() const
|
||||
Gtk::Button * GErrorDialog::button_close() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_button_close");
|
||||
return getWidget<Gtk::Button>("r_button_close");
|
||||
}
|
||||
|
||||
Gtk::TextView * GErrorDialog::textarea() const
|
||||
Gtk::TextView * GErrorDialog::textarea() const
|
||||
{
|
||||
return getWidget<Gtk::TextView>("r_textarea");
|
||||
return getWidget<Gtk::TextView>("r_textarea");
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
void apply() {}
|
||||
///
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
@ -50,7 +50,7 @@ private:
|
||||
|
||||
///
|
||||
void CloseClicked() { CancelButton(); }
|
||||
|
||||
|
||||
/// generated by accessors.py
|
||||
Gtk::Button * button_close() const;
|
||||
/// generated by accessors.py
|
||||
|
@ -1,11 +1,10 @@
|
||||
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file GFloat.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Michael Koziarski
|
||||
* \author Michael Koziarski
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -39,14 +38,14 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
|
||||
/// Returns true if the dialog input is in a valid state.
|
||||
bool validate() const;
|
||||
|
||||
|
||||
///
|
||||
void connect_signals();
|
||||
///
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Michael Koziarski
|
||||
* \author Michael Koziarski
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -77,15 +77,15 @@ void GLog::update()
|
||||
}
|
||||
|
||||
|
||||
Gtk::Button * GLog::refresh_btn() const
|
||||
Gtk::Button * GLog::refresh_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_refresh_btn");
|
||||
return getWidget<Gtk::Button>("r_refresh_btn");
|
||||
}
|
||||
Gtk::Button * GLog::close_btn() const
|
||||
Gtk::Button * GLog::close_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_close_btn");
|
||||
return getWidget<Gtk::Button>("r_close_btn");
|
||||
}
|
||||
Gtk::TextView * GLog::log_text() const
|
||||
Gtk::TextView * GLog::log_text() const
|
||||
{
|
||||
return getWidget<Gtk::TextView>("r_log_text");
|
||||
return getWidget<Gtk::TextView>("r_log_text");
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file GLog.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Michael Koziarski
|
||||
* \author Michael Koziarski
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -37,14 +36,14 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
|
||||
/// Returns true if the dialog input is in a valid state.
|
||||
bool validate() const;
|
||||
|
||||
|
||||
/// generated by accessors.py
|
||||
Gtk::Button * refresh_btn() const;
|
||||
/// generated by accessors.py
|
||||
@ -52,7 +51,7 @@ private:
|
||||
/// generated by accessors.py
|
||||
Gtk::TextView * log_text() const;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -64,24 +64,24 @@ void GPreamble::connect_signals()
|
||||
signal_changed().connect(SigC::slot(*this, &GPreamble::InputChanged));
|
||||
}
|
||||
|
||||
void GPreamble::disconnect_signals()
|
||||
void GPreamble::disconnect_signals()
|
||||
{
|
||||
slot_preamble_.disconnect();
|
||||
}
|
||||
|
||||
Gtk::Button * GPreamble::ok_btn() const
|
||||
Gtk::Button * GPreamble::ok_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
}
|
||||
Gtk::Button * GPreamble::apply_btn() const
|
||||
Gtk::Button * GPreamble::apply_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
}
|
||||
Gtk::Button * GPreamble::cancel_btn() const
|
||||
Gtk::Button * GPreamble::cancel_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
}
|
||||
Gtk::TextView * GPreamble::preamble() const
|
||||
Gtk::TextView * GPreamble::preamble() const
|
||||
{
|
||||
return getWidget<Gtk::TextView>("r_preamble");
|
||||
return getWidget<Gtk::TextView>("r_preamble");
|
||||
}
|
||||
|
@ -36,14 +36,14 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
|
||||
/// Returns true if the dialog input is in a valid state.
|
||||
bool validate() const;
|
||||
|
||||
|
||||
///
|
||||
void connect_signals();
|
||||
///
|
||||
@ -58,10 +58,10 @@ private:
|
||||
/// generated by accessors.py
|
||||
Gtk::TextView * preamble() const;
|
||||
|
||||
///
|
||||
///
|
||||
SigC::Connection slot_preamble_;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -33,13 +33,13 @@ GTabularCreate::~GTabularCreate()
|
||||
void GTabularCreate::build()
|
||||
{
|
||||
// Connect the buttons.
|
||||
ok_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::OKClicked));
|
||||
cancel_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::CancelClicked));
|
||||
apply_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::ApplyClicked));
|
||||
|
||||
ok_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::OKClicked));
|
||||
cancel_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::CancelClicked));
|
||||
apply_btn()->signal_clicked().connect(SigC::slot(*this,
|
||||
>abularCreate::ApplyClicked));
|
||||
|
||||
// Manage the buttons state
|
||||
bc().setOK(ok_btn());
|
||||
bc().setCancel(cancel_btn());
|
||||
@ -65,29 +65,28 @@ void GTabularCreate::update()
|
||||
|
||||
bool GTabularCreate::validate() const
|
||||
{
|
||||
return ( rows()->get_value_as_int() > 0 ) &&
|
||||
return ( rows()->get_value_as_int() > 0 ) &&
|
||||
( cols()->get_value_as_int() > 0 );
|
||||
}
|
||||
|
||||
|
||||
Gtk::Button * GTabularCreate::ok_btn() const
|
||||
Gtk::Button * GTabularCreate::ok_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
}
|
||||
Gtk::Button * GTabularCreate::apply_btn() const
|
||||
Gtk::Button * GTabularCreate::apply_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
}
|
||||
Gtk::Button * GTabularCreate::cancel_btn() const
|
||||
Gtk::Button * GTabularCreate::cancel_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
}
|
||||
Gtk::SpinButton * GTabularCreate::rows() const
|
||||
Gtk::SpinButton * GTabularCreate::rows() const
|
||||
{
|
||||
return getWidget<Gtk::SpinButton>("r_rows");
|
||||
return getWidget<Gtk::SpinButton>("r_rows");
|
||||
}
|
||||
Gtk::SpinButton * GTabularCreate::cols() const
|
||||
Gtk::SpinButton * GTabularCreate::cols() const
|
||||
{
|
||||
return getWidget<Gtk::SpinButton>("r_cols");
|
||||
return getWidget<Gtk::SpinButton>("r_cols");
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
~GTabularCreate();
|
||||
|
||||
void apply();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
|
@ -90,7 +90,7 @@ void GUrl::apply()
|
||||
void GUrl::update()
|
||||
{
|
||||
disconnect_signals();
|
||||
|
||||
|
||||
url()->set_text(controller().params().getContents());
|
||||
name()->set_text(controller().params().getOptions());
|
||||
|
||||
@ -105,33 +105,31 @@ bool GUrl::validate() const
|
||||
return !url()->get_text().empty() && !name()->get_text().empty();
|
||||
}
|
||||
|
||||
Gtk::Button * GUrl::restore_btn() const
|
||||
Gtk::Button * GUrl::restore_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_restore_btn");
|
||||
return getWidget<Gtk::Button>("r_restore_btn");
|
||||
}
|
||||
Gtk::Button * GUrl::ok_btn() const
|
||||
Gtk::Button * GUrl::ok_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
return getWidget<Gtk::Button>("r_ok_btn");
|
||||
}
|
||||
Gtk::Button * GUrl::apply_btn() const
|
||||
Gtk::Button * GUrl::apply_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
return getWidget<Gtk::Button>("r_apply_btn");
|
||||
}
|
||||
Gtk::Button * GUrl::cancel_btn() const
|
||||
Gtk::Button * GUrl::cancel_btn() const
|
||||
{
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
return getWidget<Gtk::Button>("r_cancel_btn");
|
||||
}
|
||||
Gtk::Entry * GUrl::url() const
|
||||
Gtk::Entry * GUrl::url() const
|
||||
{
|
||||
return getWidget<Gtk::Entry>("r_url");
|
||||
return getWidget<Gtk::Entry>("r_url");
|
||||
}
|
||||
Gtk::Entry * GUrl::name() const
|
||||
Gtk::Entry * GUrl::name() const
|
||||
{
|
||||
return getWidget<Gtk::Entry>("r_name");
|
||||
return getWidget<Gtk::Entry>("r_name");
|
||||
}
|
||||
Gtk::CheckButton * GUrl::html_cb() const
|
||||
Gtk::CheckButton * GUrl::html_cb() const
|
||||
{
|
||||
return getWidget<Gtk::CheckButton>("r_html_cb");
|
||||
return getWidget<Gtk::CheckButton>("r_html_cb");
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
|
||||
void apply();
|
||||
void update();
|
||||
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
void build();
|
||||
@ -65,7 +65,7 @@ private:
|
||||
Gtk::Entry * name() const;
|
||||
/// generated by accessors.py
|
||||
Gtk::CheckButton * html_cb() const;
|
||||
|
||||
|
||||
/// Keeps the connection to the input validator.
|
||||
SigC::Connection slot_url_;
|
||||
SigC::Connection slot_name_;
|
||||
|
@ -33,7 +33,7 @@ GnomeBase::~GnomeBase()
|
||||
{}
|
||||
|
||||
|
||||
void GnomeBase::loadXML()
|
||||
void GnomeBase::loadXML()
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Change this before declaring it production code! (be 20010325)
|
||||
@ -75,22 +75,22 @@ void GnomeBase::OKClicked()
|
||||
OKButton();
|
||||
}
|
||||
|
||||
void GnomeBase::CancelClicked()
|
||||
{
|
||||
void GnomeBase::CancelClicked()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "GnomeBase::CancelClicked()\n";
|
||||
CancelButton();
|
||||
CancelButton();
|
||||
}
|
||||
|
||||
void GnomeBase::ApplyClicked()
|
||||
{
|
||||
void GnomeBase::ApplyClicked()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "GnomeBase::ApplyClicked()\n";
|
||||
ApplyButton();
|
||||
ApplyButton();
|
||||
}
|
||||
|
||||
void GnomeBase::RestoreClicked()
|
||||
{
|
||||
void GnomeBase::RestoreClicked()
|
||||
{
|
||||
lyxerr[Debug::GUI] << "GnomeBase::RestoreClicked()\n";
|
||||
RestoreButton();
|
||||
RestoreButton();
|
||||
}
|
||||
|
||||
void GnomeBase::InputChanged()
|
||||
|
@ -12,4 +12,3 @@
|
||||
|
||||
|
||||
#include "gnome_helpers.h"
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Angus Leeming
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Lars Gullik Bjønnes
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
*
|
||||
* Keyboard modifier state representation.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -14,15 +14,15 @@
|
||||
#define KEY_STATE_H
|
||||
|
||||
/// modifier key states
|
||||
namespace key_modifier {
|
||||
namespace key_modifier {
|
||||
enum state {
|
||||
none = 0, //< no modifiers held
|
||||
ctrl = 1, //< control button held
|
||||
ctrl = 1, //< control button held
|
||||
alt = 2, //< alt/meta key held
|
||||
shift = 4 //< shift key held
|
||||
};
|
||||
|
||||
|
||||
|
||||
inline state operator|(state const & s1, state const & s2)
|
||||
{
|
||||
int const i1(static_cast<int>(s1));
|
||||
@ -30,12 +30,12 @@ inline state operator|(state const & s1, state const & s2)
|
||||
return static_cast<state>(i1 | i2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void operator|=(state & s1, state s2)
|
||||
{
|
||||
s1 = static_cast<state>(s1 | s2);
|
||||
s1 = static_cast<state>(s1 | s2);
|
||||
}
|
||||
|
||||
|
||||
} // namespace key_modifier
|
||||
|
||||
#endif // KEY_STATE_H
|
||||
|
@ -6,7 +6,7 @@
|
||||
* GUII representation of mouse presses and
|
||||
* mouse button states
|
||||
*
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -30,7 +30,7 @@ inline void operator|=(state & s1, state s2)
|
||||
{
|
||||
s1 = static_cast<state>(s1 | s2);
|
||||
}
|
||||
|
||||
|
||||
} // namespace mouse_button
|
||||
|
||||
#endif // MOUSE_STATE_H
|
||||
|
@ -30,7 +30,7 @@ BulletsModule::BulletsModule(QWidget * parent, char const * name, WFlags fl)
|
||||
: BulletsModuleBase(parent, name, fl), le_(bullet1LE)
|
||||
{
|
||||
QPopupMenu * pm = new QPopupMenu(this);
|
||||
|
||||
|
||||
QPopupMenu * pm1 = new QPopupMenu(pm);
|
||||
QPopupMenu * pm2 = new QPopupMenu(pm);
|
||||
QPopupMenu * pm3 = new QPopupMenu(pm);
|
||||
@ -68,7 +68,7 @@ BulletsModule::BulletsModule(QWidget * parent, char const * name, WFlags fl)
|
||||
string bmfile;
|
||||
bmfile = LibFileSearch("images", "standard", "xpm");
|
||||
standard_->insertItem(QPixmap(bmfile.c_str()));
|
||||
|
||||
|
||||
bmfile = LibFileSearch("images", "amssymb", "xpm");
|
||||
maths_->insertItem(QPixmap(bmfile.c_str()));
|
||||
|
||||
@ -89,31 +89,31 @@ BulletsModule::BulletsModule(QWidget * parent, char const * name, WFlags fl)
|
||||
|
||||
connect(maths_, SIGNAL(selected(int, int)),
|
||||
this, SLOT(maths(int, int)));
|
||||
|
||||
|
||||
connect(ding1_, SIGNAL(selected(int, int)),
|
||||
this, SLOT(ding1(int, int)));
|
||||
|
||||
|
||||
connect(ding2_, SIGNAL(selected(int, int)),
|
||||
this, SLOT(ding2(int, int)));
|
||||
|
||||
|
||||
connect(ding3_, SIGNAL(selected(int, int)),
|
||||
this, SLOT(ding3(int, int)));
|
||||
|
||||
|
||||
connect(ding4_, SIGNAL(selected(int, int)),
|
||||
this, SLOT(ding4(int, int)));
|
||||
|
||||
|
||||
connect(setbullet1TB, SIGNAL(pressed()),
|
||||
this, SLOT(setlevel1()));
|
||||
|
||||
|
||||
connect(setbullet2TB, SIGNAL(pressed()),
|
||||
this, SLOT(setlevel2()));
|
||||
|
||||
|
||||
connect(setbullet3TB, SIGNAL(pressed()),
|
||||
this, SLOT(setlevel3()));
|
||||
|
||||
|
||||
connect(setbullet4TB, SIGNAL(pressed()),
|
||||
this, SLOT(setlevel4()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -170,4 +170,3 @@ void BulletsModule::setlevel4()
|
||||
{
|
||||
le_ = bullet4LE;
|
||||
}
|
||||
|
||||
|
@ -52,8 +52,8 @@ protected slots:
|
||||
void setlevel3();
|
||||
///
|
||||
void setlevel4();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
QLineEdit * le_;
|
||||
|
||||
|
@ -1,15 +1,19 @@
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* several files: ws changes
|
||||
|
||||
2002-11-30 John Levon <levon@movementarian.org>
|
||||
|
||||
* QParagraph.C: another fix from Otto Tronarp
|
||||
|
||||
|
||||
2002-11-30 John Levon <levon@movementarian.org>
|
||||
|
||||
* various: string(widget->text()) is not good.
|
||||
|
||||
|
||||
2002-11-28 John Levon <levon@movementarian.org>
|
||||
|
||||
* qt_helpers.C: fix build
|
||||
|
||||
|
||||
2002-11-28 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||
|
||||
* qsetborder.[Ch]: implement John's setEnabled bool
|
||||
@ -20,15 +24,15 @@
|
||||
2002-11-28 John Levon <levon@movementarian.org>
|
||||
|
||||
* QSpellcheckerDialog.C: fix Escape + restarting spellcheck
|
||||
|
||||
|
||||
2002-11-28 John Levon <levon@movementarian.org>
|
||||
|
||||
* QSpellcheckerDialog.C: small fix
|
||||
|
||||
|
||||
2002-11-28 John Levon <levon@movementarian.org>
|
||||
|
||||
* QDocument.C: fix line spacing
|
||||
|
||||
|
||||
2002-11-27 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||
|
||||
* ui/TabularDialog.ui:
|
||||
@ -47,10 +51,10 @@
|
||||
|
||||
* qsetborder.h:
|
||||
* qsetborder.C: cleanup
|
||||
|
||||
|
||||
* QTabular.C:
|
||||
* QTabularDialog.C: cleanups, fixes
|
||||
|
||||
|
||||
2002-11-27 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||
|
||||
* ui/TabularDialog.ui:
|
||||
|
@ -226,7 +226,7 @@ void Dialogs::showTabular(InsetTabular * it)
|
||||
|
||||
void Dialogs::updateTabular(InsetTabular * it)
|
||||
{
|
||||
pimpl_->tabular.controller().updateInset(it);
|
||||
pimpl_->tabular.controller().updateInset(it);
|
||||
}
|
||||
|
||||
|
||||
|
@ -187,7 +187,7 @@ PreambleDialog;
|
||||
|
||||
typedef GUI<ControlPrefs, QPrefs, OkApplyCancelPolicy, Qt2BC>
|
||||
PrefsDialog;
|
||||
|
||||
|
||||
typedef GUI<ControlPrint, QPrint, OkApplyCancelPolicy, Qt2BC>
|
||||
PrintDialog;
|
||||
|
||||
@ -208,7 +208,7 @@ TabularCreateDialog;
|
||||
|
||||
typedef GUI<ControlTabular, QTabular, OkApplyCancelReadOnlyPolicy, Qt2BC>
|
||||
TabularDialog;
|
||||
|
||||
|
||||
typedef GUI<ControlTexinfo, QTexinfo, OkCancelPolicy, Qt2BC>
|
||||
TexinfoDialog;
|
||||
|
||||
|
@ -92,14 +92,14 @@ void QBibtex::update_contents()
|
||||
|
||||
|
||||
dialog_->styleCB->clear();
|
||||
|
||||
|
||||
int item_nr(-1);
|
||||
|
||||
|
||||
vector<string> const str = getVectorFromString(
|
||||
controller().getBibStyles(), "\n");
|
||||
for (vector<string>::const_iterator it = str.begin();
|
||||
it != str.end(); ++it) {
|
||||
string item(ChangeExtension(*it, ""));
|
||||
string item(ChangeExtension(*it, ""));
|
||||
if (item == bibstyle)
|
||||
item_nr = int(it - str.begin());
|
||||
dialog_->styleCB->insertItem(item.c_str());
|
||||
|
@ -48,7 +48,7 @@ QBrowseBox::QBrowseBox(int rows, int cols, QWidget* parent, const char* name, WF
|
||||
// setMouseTracking must be called after setFocusPolicy
|
||||
viewport()->setMouseTracking(true);
|
||||
inloop=false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -168,13 +168,13 @@ int QBrowseBox::exec(int x,int y)
|
||||
repaint();
|
||||
qApp->enter_loop();
|
||||
inloop = true;
|
||||
|
||||
|
||||
if (activecell_.x()!=-1 && activecell_.y()!=-1 )
|
||||
return coordsToIndex( activecell_.x(),activecell_.y());
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void QBrowseBox::keyPressEvent(QKeyEvent * e)
|
||||
{
|
||||
switch(e->key()) {
|
||||
@ -271,7 +271,7 @@ void QBrowseBox::contentsMouseMoveEvent(QMouseEvent * e)
|
||||
{
|
||||
int x = e->pos().x();
|
||||
int y = e->pos().y();
|
||||
|
||||
|
||||
int cellx;
|
||||
int celly;
|
||||
|
||||
|
@ -28,24 +28,24 @@ class QBrowseBox : public QGridView
|
||||
public:
|
||||
QBrowseBox(int rows, int cols, QWidget* parent=0, char const * name=0, WFlags f=0);
|
||||
~QBrowseBox();
|
||||
|
||||
|
||||
void insertItem(QString const & text, int row, int col);
|
||||
void insertItem(char const * text, int row, int col);
|
||||
void insertItem(QPixmap pixmap, int row, int col);
|
||||
void insertItem(QPixmap pixmap);
|
||||
void removeItem(int row, int col);
|
||||
void clear();
|
||||
|
||||
|
||||
QString text(int row, int col);
|
||||
QPixmap pixmap(int row, int col);
|
||||
|
||||
|
||||
int exec(QPoint const & pos);
|
||||
int exec(int x, int y);
|
||||
int exec(QWidget const * trigger);
|
||||
|
||||
|
||||
signals:
|
||||
void selected(int, int);
|
||||
|
||||
void selected(int, int);
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent * e);
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
@ -53,7 +53,7 @@ protected:
|
||||
virtual void closeEvent(QCloseEvent * e);
|
||||
virtual void contentsMouseMoveEvent(QMouseEvent * e);
|
||||
virtual void paintCell(QPainter *, int row, int col);
|
||||
|
||||
|
||||
private:
|
||||
// make sure the automatically generated one is not used
|
||||
QBrowseBox & operator=(QBrowseBox const &);
|
||||
@ -62,14 +62,14 @@ private:
|
||||
void moveRight();
|
||||
void moveUp();
|
||||
void moveDown();
|
||||
|
||||
|
||||
int coordsToIndex(int row, int col);
|
||||
|
||||
|
||||
QString * texts_;
|
||||
QPixmap* pixmaps_;
|
||||
QPoint activecell_;
|
||||
bool firstrelease_;
|
||||
bool inloop;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -106,7 +106,7 @@ void QDocument::build_dialog()
|
||||
}
|
||||
|
||||
// paper
|
||||
char const * sizes[] = {
|
||||
char const * sizes[] = {
|
||||
_("Default") , _("Custom") , _("US letter") , _("US legal")
|
||||
, _("US executive") , _("A3") , _("A4") , _("A5")
|
||||
, _("B3") , _("B4") , _("B5"), 0 };
|
||||
@ -208,7 +208,7 @@ void QDocument::apply()
|
||||
params.user_defined_bullets[1].setText(dialog_->bulletsModule->bullet2LE->text().latin1());
|
||||
params.user_defined_bullets[2].setText(dialog_->bulletsModule->bullet3LE->text().latin1());
|
||||
params.user_defined_bullets[3].setText(dialog_->bulletsModule->bullet4LE->text().latin1());
|
||||
|
||||
|
||||
params.user_defined_bullets[0].setSize(dialog_->bulletsModule->bulletsize1CO->currentItem()-1);
|
||||
params.user_defined_bullets[1].setSize(dialog_->bulletsModule->bulletsize2CO->currentItem()-1);
|
||||
params.user_defined_bullets[2].setSize(dialog_->bulletsModule->bulletsize3CO->currentItem()-1);
|
||||
@ -336,7 +336,7 @@ void QDocument::apply()
|
||||
params.paperpackage = char(margin);
|
||||
|
||||
MarginsModuleBase const * m(dialog_->marginsModule);
|
||||
|
||||
|
||||
params.leftmargin =
|
||||
LyXLength(m->innerLE->text().toDouble(),
|
||||
m->innerUnit->currentLengthItem()
|
||||
@ -439,7 +439,7 @@ void QDocument::update_contents()
|
||||
dialog_->bulletsModule->bullet3LE->setText(s);
|
||||
s = params.user_defined_bullets[3].getText().c_str();
|
||||
dialog_->bulletsModule->bullet4LE->setText(s);
|
||||
|
||||
|
||||
dialog_->bulletsModule->bulletsize1CO->setCurrentItem(
|
||||
params.user_defined_bullets[0].getSize() + 1);
|
||||
dialog_->bulletsModule->bulletsize2CO->setCurrentItem(
|
||||
@ -448,9 +448,9 @@ void QDocument::update_contents()
|
||||
params.user_defined_bullets[2].getSize() + 1);
|
||||
dialog_->bulletsModule->bulletsize4CO->setCurrentItem(
|
||||
params.user_defined_bullets[3].getSize() + 1);
|
||||
|
||||
|
||||
// packages
|
||||
char const * enc[] = {
|
||||
char const * enc[] = {
|
||||
"default" , "auto" , "latin1" , "latin2" , "latin3" ,
|
||||
"latin4" , "latin5" , "latin9" , "koi8-r" , "koi8-u" ,
|
||||
"cp866" , "cp1251" , "iso88595" , "pt154" };
|
||||
@ -478,7 +478,7 @@ void QDocument::update_contents()
|
||||
case Spacing::Onehalf: nitem = 1; break;
|
||||
case Spacing::Default: case Spacing::Single: nitem = 0; break;
|
||||
}
|
||||
|
||||
|
||||
dialog_->packagesModule->lspacingCO->setCurrentItem(nitem);
|
||||
if (params.spacing.getSpace() == Spacing::Other) {
|
||||
dialog_->packagesModule->lspacingLE->setText(
|
||||
@ -578,9 +578,9 @@ void QDocument::update_contents()
|
||||
tostr(LyXLength(params.paperheight).value()).c_str());
|
||||
|
||||
// margins
|
||||
|
||||
|
||||
MarginsModuleBase * m(dialog_->marginsModule);
|
||||
|
||||
|
||||
int item = params.paperpackage;
|
||||
if (params.use_geometry) {
|
||||
item = 1;
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
void saveDocDefault();
|
||||
/// reset to default params
|
||||
void useClassDefaults();
|
||||
|
||||
|
||||
/// FIXME
|
||||
std::vector<string> lang_;
|
||||
};
|
||||
|
@ -72,7 +72,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
moduleLB->insertItem(_("Bibliography"), BIBLIOGRAPHY);
|
||||
moduleLB->insertItem(_("Preamble"), PREAMBLE);
|
||||
moduleLB->setCurrentItem(LAYOUT);
|
||||
moduleLB->setMinimumSize(moduleLB->sizeHint());
|
||||
moduleLB->setMinimumSize(moduleLB->sizeHint());
|
||||
|
||||
layoutModule = new ClassModuleBase(this);
|
||||
paperModule = new PaperModuleBase(this);
|
||||
@ -95,7 +95,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
moduleStack->addWidget(preambleModule, PREAMBLE);
|
||||
|
||||
moduleStack->raiseWidget(LAYOUT);
|
||||
|
||||
|
||||
|
||||
// take care of title
|
||||
QFont f = titleL->font();
|
||||
@ -103,15 +103,15 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
titleL->setFont(f);
|
||||
setTitle(LAYOUT);
|
||||
|
||||
// preamble
|
||||
// preamble
|
||||
connect(preambleModule->preambleMLE, SIGNAL(textChanged()),
|
||||
this , SLOT(change_adaptor()));
|
||||
// biblio
|
||||
// biblio
|
||||
connect(biblioModule->natbibCB, SIGNAL(toggled(bool)),
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(biblioModule->citeStyleCO, SIGNAL(activated(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
// language & quote
|
||||
// language & quote
|
||||
connect(langModule->singleQuoteRB, SIGNAL(toggled(bool)),
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(langModule->doubleQuoteRB, SIGNAL(toggled(bool)),
|
||||
@ -120,14 +120,14 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(langModule->quoteStyleCO, SIGNAL(activated(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
// numbering
|
||||
// numbering
|
||||
connect(numberingModule->sectionnrDepthSB,
|
||||
SIGNAL(valueChanged(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(numberingModule->tocDepthSB,
|
||||
SIGNAL(valueChanged(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
// packages
|
||||
// packages
|
||||
connect(packagesModule->lspacingCO, SIGNAL(activated(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(packagesModule->lspacingCO, SIGNAL(activated(int)),
|
||||
@ -141,7 +141,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(packagesModule->psdriverCO, SIGNAL(activated(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
// layout
|
||||
// layout
|
||||
connect(layoutModule->classCO, SIGNAL(activated(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(layoutModule->optionsLE,
|
||||
@ -175,7 +175,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
connect(layoutModule->skipRB, SIGNAL(toggled(bool)),
|
||||
this , SLOT(enableSkip(bool)));
|
||||
|
||||
// margins
|
||||
// margins
|
||||
connect(marginsModule->marginCO, SIGNAL(activated(int)),
|
||||
this , SLOT(setCustomMargins(int)));
|
||||
|
||||
@ -210,7 +210,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
connect(marginsModule->footskipUnit, SIGNAL(activated(int)),
|
||||
this , SLOT(change_adaptor()));
|
||||
|
||||
// paper
|
||||
// paper
|
||||
connect(paperModule->papersizeCO, SIGNAL(activated(int)),
|
||||
this , SLOT(setMargins(int)));
|
||||
connect(paperModule->papersizeCO, SIGNAL(activated(int)),
|
||||
@ -237,7 +237,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
connect(paperModule->facingPagesCB, SIGNAL(toggled(bool)),
|
||||
this , SLOT(change_adaptor()));
|
||||
|
||||
// bullets
|
||||
// bullets
|
||||
connect(bulletsModule->bullet1LE, SIGNAL(textChanged(const QString&)),
|
||||
this , SLOT(change_adaptor()));
|
||||
connect(bulletsModule->bulletsize1CO, SIGNAL(activated(int)),
|
||||
@ -353,7 +353,7 @@ void QDocumentDialog::setMargins(int papersize)
|
||||
_("Very wide Margins "), 0 };
|
||||
char const * normal[] = {
|
||||
_("Default"), _("Custom"), 0 };
|
||||
|
||||
|
||||
int olditem = marginsModule->marginCO->currentItem();
|
||||
marginsModule->marginCO->clear();
|
||||
marginsModule->marginCO->insertStrList(normal);
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
void updateFontsize(string const &, string const &);
|
||||
void updatePagestyle(string const &, string const &);
|
||||
|
||||
|
||||
public slots:
|
||||
void setTitle(int);
|
||||
void change_adaptor();
|
||||
@ -58,10 +58,10 @@ protected slots:
|
||||
void setSkip(int);
|
||||
void enableSkip(bool);
|
||||
void classChanged();
|
||||
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
|
||||
|
||||
private:
|
||||
enum Module {
|
||||
LAYOUT,
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
friend class QExternalDialog;
|
||||
|
||||
QExternal();
|
||||
|
||||
|
||||
private:
|
||||
/// Apply changes
|
||||
virtual void apply();
|
||||
|
@ -66,7 +66,7 @@ void QGraphicsDialog::change_adaptor()
|
||||
void QGraphicsDialog::change_bb()
|
||||
{
|
||||
form_->controller().bbChanged = true;
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
<< "[controller().bb_Changed set to true]\n";
|
||||
form_->changed();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "debug.h"
|
||||
|
||||
#include "ControlMath.h"
|
||||
|
||||
|
||||
#include "QMathDialog.h"
|
||||
#include "QMath.h"
|
||||
|
||||
|
@ -85,7 +85,7 @@ void QMathMatrixDialog::slotOK()
|
||||
ostringstream os;
|
||||
os << nx << ' ' << ny << ' ' << c << ' ' << sh;
|
||||
form_->insertMatrix(os.str().c_str());
|
||||
|
||||
|
||||
// close the dialog
|
||||
close();
|
||||
}
|
||||
|
@ -232,10 +232,10 @@ void QPrefs::apply()
|
||||
QPrefScreenFontsModule * fontmod(dialog_->screenfontsModule);
|
||||
|
||||
LyXRC const oldrc(rc);
|
||||
|
||||
|
||||
boost::tie(rc.roman_font_name, rc.roman_font_foundry)
|
||||
= parseFontName(fontmod->screenRomanCO->currentText().latin1());
|
||||
boost::tie(rc.sans_font_name, rc.sans_font_foundry) =
|
||||
boost::tie(rc.sans_font_name, rc.sans_font_foundry) =
|
||||
parseFontName(fontmod->screenSansCO->currentText().latin1());
|
||||
boost::tie(rc.typewriter_font_name, rc.typewriter_font_foundry) =
|
||||
parseFontName(fontmod->screenTypewriterCO->currentText().latin1());
|
||||
@ -475,7 +475,7 @@ void QPrefs::update_contents()
|
||||
dialog_->select_roman(fontmod->screenRomanCO->currentText());
|
||||
dialog_->select_sans(fontmod->screenSansCO->currentText());
|
||||
dialog_->select_typewriter(fontmod->screenTypewriterCO->currentText());
|
||||
|
||||
|
||||
fontmod->screenZoomSB->setValue(rc.zoom);
|
||||
fontmod->screenDpiSB->setValue(int(rc.dpi));
|
||||
fontmod->screenTinyED->setText(tostr(rc.font_sizes[LyXFont::SIZE_TINY]).c_str());
|
||||
|
@ -17,12 +17,12 @@
|
||||
#endif
|
||||
|
||||
#include "converter.h"
|
||||
|
||||
|
||||
#include "Qt2Base.h"
|
||||
#include "ControlPrefs.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class QPrefsDialog;
|
||||
|
||||
class QPrefs
|
||||
@ -33,11 +33,11 @@ public:
|
||||
friend class QPrefsDialog;
|
||||
|
||||
QPrefs();
|
||||
|
||||
|
||||
private:
|
||||
/// Apply changes
|
||||
virtual void apply();
|
||||
|
||||
|
||||
/// update (do we need this?)
|
||||
virtual void update_contents();
|
||||
|
||||
|
@ -137,7 +137,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
pane_map_[i] = keyboardModule;
|
||||
|
||||
// output
|
||||
|
||||
|
||||
i = new QListViewItem(out, _("Ascii"));
|
||||
pane_map_[i] = asciiModule;
|
||||
i = new QListViewItem(out, i, _("Date format"));
|
||||
@ -153,13 +153,13 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
pane_map_[i] = convertersModule;
|
||||
i = new QListViewItem(prefsLV, i, _("File formats"));
|
||||
pane_map_[i] = fileformatsModule;
|
||||
|
||||
|
||||
prefsLV->setMinimumSize(prefsLV->sizeHint());
|
||||
|
||||
// Qt sucks
|
||||
resize(minimumSize());
|
||||
|
||||
// FIXME: put in controller
|
||||
// FIXME: put in controller
|
||||
for (int i = 0; i < LColor::ignore; ++i) {
|
||||
LColor::color lc = static_cast<LColor::color>(i);
|
||||
if (lc == LColor::none
|
||||
@ -183,23 +183,23 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
|
||||
QFontDatabase fontdb;
|
||||
QStringList families(fontdb.families());
|
||||
|
||||
|
||||
connect(screenfontsModule->screenRomanCO, SIGNAL(activated(const QString&)), this, SLOT(select_roman(const QString&)));
|
||||
connect(screenfontsModule->screenSansCO, SIGNAL(activated(const QString&)), this, SLOT(select_sans(const QString&)));
|
||||
connect(screenfontsModule->screenTypewriterCO, SIGNAL(activated(const QString&)), this, SLOT(select_typewriter(const QString&)));
|
||||
|
||||
|
||||
for (QStringList::Iterator it = families.begin(); it != families.end(); ++it) {
|
||||
screenfontsModule->screenRomanCO->insertItem(*it);
|
||||
screenfontsModule->screenSansCO->insertItem(*it);
|
||||
screenfontsModule->screenTypewriterCO->insertItem(*it);
|
||||
}
|
||||
|
||||
screenfontsModule->screenRomanCO->insertItem(*it);
|
||||
screenfontsModule->screenSansCO->insertItem(*it);
|
||||
screenfontsModule->screenTypewriterCO->insertItem(*it);
|
||||
}
|
||||
|
||||
connect(uiModule->uiFilePB, SIGNAL(clicked()), this, SLOT(select_ui()));
|
||||
connect(uiModule->bindFilePB, SIGNAL(clicked()), this, SLOT(select_bind()));
|
||||
|
||||
|
||||
connect(keyboardModule->firstKeymapPB, SIGNAL(clicked()), this, SLOT(select_keymap1()));
|
||||
connect(keyboardModule->secondKeymapPB, SIGNAL(clicked()), this, SLOT(select_keymap2()));
|
||||
|
||||
|
||||
connect(spellcheckerModule->persDictionaryPB, SIGNAL(clicked()), this, SLOT(select_dict()));
|
||||
|
||||
connect(pathsModule->templateDirPB, SIGNAL(clicked()), this, SLOT(select_templatedir()));
|
||||
@ -207,10 +207,10 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
connect(pathsModule->backupDirPB, SIGNAL(clicked()), this, SLOT(select_backupdir()));
|
||||
connect(pathsModule->workingDirPB, SIGNAL(clicked()), this, SLOT(select_workingdir()));
|
||||
connect(pathsModule->lyxserverDirPB, SIGNAL(clicked()), this, SLOT(select_lyxpipe()));
|
||||
|
||||
|
||||
connect(colorsModule->colorChangePB, SIGNAL(clicked()), this, SLOT(change_color()));
|
||||
connect(colorsModule->lyxObjectsLB, SIGNAL(selected(int)), this, SLOT(change_color()));
|
||||
|
||||
|
||||
connect(fileformatsModule->formatNewPB, SIGNAL(clicked()), this, SLOT(new_format()));
|
||||
connect(fileformatsModule->formatRemovePB, SIGNAL(clicked()), this, SLOT(remove_format()));
|
||||
connect(fileformatsModule->formatModifyPB, SIGNAL(clicked()), this, SLOT(modify_format()));
|
||||
@ -220,10 +220,10 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
connect(convertersModule->converterRemovePB, SIGNAL(clicked()), this, SLOT(remove_converter()));
|
||||
connect(convertersModule->converterModifyPB, SIGNAL(clicked()), this, SLOT(modify_converter()));
|
||||
connect(convertersModule->convertersLB, SIGNAL(highlighted(int)), this, SLOT(switch_converter(int)));
|
||||
|
||||
|
||||
// Qt really sucks. This is as ugly as it looks, but the alternative
|
||||
// means having to derive every module == bloat
|
||||
|
||||
|
||||
connect(convertersModule->converterNewPB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||
connect(convertersModule->converterRemovePB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||
connect(convertersModule->converterModifyPB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||
@ -333,31 +333,31 @@ void QPrefsDialog::change_adaptor()
|
||||
|
||||
|
||||
void QPrefsDialog::updateConverters()
|
||||
{
|
||||
{
|
||||
QPrefConvertersModule * convertmod(convertersModule);
|
||||
|
||||
|
||||
convertmod->converterFromCO->clear();
|
||||
convertmod->converterToCO->clear();
|
||||
|
||||
|
||||
Formats::const_iterator cit = form_->formats_.begin();
|
||||
Formats::const_iterator end = form_->formats_.end();
|
||||
for (; cit != end; ++cit) {
|
||||
convertmod->converterFromCO->insertItem(cit->prettyname().c_str());
|
||||
convertmod->converterToCO->insertItem(cit->prettyname().c_str());
|
||||
}
|
||||
|
||||
convertmod->convertersLB->clear();
|
||||
|
||||
convertmod->convertersLB->clear();
|
||||
|
||||
Converters::const_iterator ccit = form_->converters_.begin();
|
||||
Converters::const_iterator cend = form_->converters_.end();
|
||||
for (; ccit != cend; ++ccit) {
|
||||
string const name(ccit->From->prettyname() + " -> " +
|
||||
ccit->To->prettyname());
|
||||
ccit->To->prettyname());
|
||||
convertmod->convertersLB->insertItem(name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::switch_converter(int nr)
|
||||
{
|
||||
Converter const & c(form_->converters_.get(nr));
|
||||
@ -367,31 +367,31 @@ void QPrefsDialog::switch_converter(int nr)
|
||||
convertersModule->converterFlagED->setText(c.flags.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FIXME: user must
|
||||
// specify unique from/to or it doesn't appear. This is really bad UI
|
||||
void QPrefsDialog::new_converter()
|
||||
{
|
||||
Format const & from(form_->formats_.get(convertersModule->converterFromCO->currentItem()));
|
||||
Format const & to(form_->formats_.get(convertersModule->converterToCO->currentItem()));
|
||||
|
||||
{
|
||||
Format const & from(form_->formats_.get(convertersModule->converterFromCO->currentItem()));
|
||||
Format const & to(form_->formats_.get(convertersModule->converterToCO->currentItem()));
|
||||
|
||||
Converter const * old = form_->converters_.getConverter(from.name(), to.name());
|
||||
form_->converters_.add(from.name(), to.name(), "", "");
|
||||
if (!old) {
|
||||
form_->converters_.updateLast(form_->formats_);
|
||||
}
|
||||
updateConverters();
|
||||
convertersModule->convertersLB->setCurrentItem(convertersModule->convertersLB->count() - 1);
|
||||
convertersModule->convertersLB->setCurrentItem(convertersModule->convertersLB->count() - 1);
|
||||
}
|
||||
|
||||
|
||||
void QPrefsDialog::modify_converter()
|
||||
{
|
||||
Format const & from(form_->formats_.get(convertersModule->converterFromCO->currentItem()));
|
||||
Format const & to(form_->formats_.get(convertersModule->converterToCO->currentItem()));
|
||||
Format const & from(form_->formats_.get(convertersModule->converterFromCO->currentItem()));
|
||||
Format const & to(form_->formats_.get(convertersModule->converterToCO->currentItem()));
|
||||
string flags(convertersModule->converterFlagED->text().latin1());
|
||||
string name(convertersModule->converterED->text().latin1());
|
||||
|
||||
|
||||
Converter const * old = form_->converters_.getConverter(from.name(), to.name());
|
||||
form_->converters_.add(from.name(), to.name(), name, flags);
|
||||
if (!old) {
|
||||
@ -403,19 +403,19 @@ void QPrefsDialog::modify_converter()
|
||||
|
||||
void QPrefsDialog::remove_converter()
|
||||
{
|
||||
Format const & from(form_->formats_.get(convertersModule->converterFromCO->currentItem()));
|
||||
Format const & to(form_->formats_.get(convertersModule->converterToCO->currentItem()));
|
||||
Format const & from(form_->formats_.get(convertersModule->converterFromCO->currentItem()));
|
||||
Format const & to(form_->formats_.get(convertersModule->converterToCO->currentItem()));
|
||||
form_->converters_.erase(from.name(), to.name());
|
||||
updateConverters();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::updateFormats()
|
||||
{
|
||||
QPrefFileformatsModule * formatmod(fileformatsModule);
|
||||
|
||||
formatmod->formatsLB->clear();
|
||||
|
||||
|
||||
Formats::const_iterator cit = form_->formats_.begin();
|
||||
Formats::const_iterator end = form_->formats_.end();
|
||||
for (; cit != end; ++cit) {
|
||||
@ -436,11 +436,11 @@ void QPrefsDialog::switch_format(int nr)
|
||||
!form_->converters_.formatIsUsed(f.name()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::new_format()
|
||||
{
|
||||
form_->formats_.add(_("New"));
|
||||
form_->formats_.sort();
|
||||
form_->formats_.sort();
|
||||
updateFormats();
|
||||
fileformatsModule->formatsLB->setCurrentItem(form_->formats_.getNumber(_("New")));
|
||||
updateConverters();
|
||||
@ -453,21 +453,21 @@ void QPrefsDialog::modify_format()
|
||||
string const oldpretty(oldformat.prettyname());
|
||||
string const name(fileformatsModule->formatED->text().latin1());
|
||||
form_->formats_.erase(oldformat.name());
|
||||
|
||||
string const prettyname = fileformatsModule->guiNameED->text().latin1();
|
||||
string const extension = fileformatsModule->extensionED->text().latin1();
|
||||
string const shortcut = fileformatsModule->shortcutED->text().latin1();
|
||||
string const viewer = fileformatsModule->viewerED->text().latin1();
|
||||
|
||||
form_->formats_.add(name, extension, prettyname, shortcut);
|
||||
|
||||
string const prettyname = fileformatsModule->guiNameED->text().latin1();
|
||||
string const extension = fileformatsModule->extensionED->text().latin1();
|
||||
string const shortcut = fileformatsModule->shortcutED->text().latin1();
|
||||
string const viewer = fileformatsModule->viewerED->text().latin1();
|
||||
|
||||
form_->formats_.add(name, extension, prettyname, shortcut);
|
||||
form_->formats_.sort();
|
||||
form_->formats_.setViewer(name, viewer);
|
||||
form_->formats_.setViewer(name, viewer);
|
||||
|
||||
fileformatsModule->formatsLB->setUpdatesEnabled(false);
|
||||
updateFormats();
|
||||
updateFormats();
|
||||
fileformatsModule->formatsLB->setUpdatesEnabled(true);
|
||||
fileformatsModule->formatsLB->update();
|
||||
|
||||
|
||||
updateConverters();
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ void QPrefsDialog::select_bind()
|
||||
uiModule->bindFileED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_keymap1()
|
||||
{
|
||||
string file(form_->controller().browsekbmap(keyboardModule->firstKeymapED->text().latin1()));
|
||||
@ -522,7 +522,7 @@ void QPrefsDialog::select_keymap1()
|
||||
keyboardModule->firstKeymapED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_keymap2()
|
||||
{
|
||||
string file(form_->controller().browsekbmap(keyboardModule->secondKeymapED->text().latin1()));
|
||||
@ -538,7 +538,7 @@ void QPrefsDialog::select_dict()
|
||||
spellcheckerModule->persDictionaryED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_templatedir()
|
||||
{
|
||||
string file(form_->controller().browse(pathsModule->templateDirED->text().latin1(), _("Select a document templates directory")));
|
||||
@ -546,7 +546,7 @@ void QPrefsDialog::select_templatedir()
|
||||
pathsModule->templateDirED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_tempdir()
|
||||
{
|
||||
string file(form_->controller().browse(pathsModule->tempDirED->text().latin1(), _("Select a temporary directory")));
|
||||
@ -554,7 +554,7 @@ void QPrefsDialog::select_tempdir()
|
||||
pathsModule->tempDirED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_backupdir()
|
||||
{
|
||||
string file(form_->controller().browse(pathsModule->backupDirED->text().latin1(), _("Select a backups directory")));
|
||||
@ -562,7 +562,7 @@ void QPrefsDialog::select_backupdir()
|
||||
pathsModule->backupDirED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_workingdir()
|
||||
{
|
||||
string file(form_->controller().browse(pathsModule->workingDirED->text().latin1(), _("Selection a documents directory")));
|
||||
@ -570,7 +570,7 @@ void QPrefsDialog::select_workingdir()
|
||||
pathsModule->workingDirED->setText(file.c_str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QPrefsDialog::select_lyxpipe()
|
||||
{
|
||||
string file(form_->controller().browse(pathsModule->lyxserverDirED->text().latin1(), _("Give a filename for the LyX server pipe")));
|
||||
|
@ -17,12 +17,12 @@
|
||||
#endif
|
||||
|
||||
#include "LColor.h"
|
||||
|
||||
|
||||
#include "ui/QPrefsDialogBase.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class QPrefs;
|
||||
class QListViewItem;
|
||||
class QPrefAsciiModule;
|
||||
@ -46,7 +46,7 @@ public:
|
||||
friend class QPrefs;
|
||||
|
||||
QPrefsDialog(QPrefs *);
|
||||
|
||||
|
||||
~QPrefsDialog();
|
||||
|
||||
void updateConverters();
|
||||
@ -62,14 +62,14 @@ public slots:
|
||||
void new_format();
|
||||
void modify_format();
|
||||
void remove_format();
|
||||
|
||||
|
||||
void switch_converter(int);
|
||||
void new_converter();
|
||||
void modify_converter();
|
||||
void remove_converter();
|
||||
|
||||
|
||||
void change_color();
|
||||
|
||||
|
||||
void select_ui();
|
||||
void select_bind();
|
||||
void select_keymap1();
|
||||
@ -84,17 +84,17 @@ public slots:
|
||||
void select_roman(const QString&);
|
||||
void select_sans(const QString&);
|
||||
void select_typewriter(const QString&);
|
||||
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent * e);
|
||||
|
||||
|
||||
private:
|
||||
typedef std::map<QListViewItem *, QWidget *> PaneMap;
|
||||
|
||||
PaneMap pane_map_;
|
||||
|
||||
std::vector<LColor::color> colors_;
|
||||
|
||||
|
||||
QPrefAsciiModule * asciiModule;
|
||||
QPrefDateModule * dateModule;
|
||||
QPrefKeyboardModule * keyboardModule;
|
||||
|
@ -100,7 +100,7 @@ void QSpellchecker::partialUpdate(int id)
|
||||
case 0:
|
||||
dialog_->spellcheckPR->setProgress(controller().getProgress());
|
||||
break;
|
||||
|
||||
|
||||
case 1: {
|
||||
dialog_->wordED->setText(controller().getWord().c_str());
|
||||
dialog_->suggestionsLB->clear();
|
||||
@ -111,11 +111,11 @@ void QSpellchecker::partialUpdate(int id)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
dialog_->spellcheckPB->setEnabled(true);
|
||||
hide();
|
||||
lyxerr << controller().getMessage() << endl;
|
||||
lyxerr << controller().getMessage() << endl;
|
||||
QMessageBox::information(0, _("Spellcheck complete"),
|
||||
controller().getMessage().c_str(),
|
||||
_("OK"));
|
||||
|
@ -34,7 +34,7 @@ protected slots:
|
||||
virtual void suggestionChanged(const QString &);
|
||||
virtual void replaceChanged(const QString &);
|
||||
virtual void reject();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent * e);
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <qcheckbox.h>
|
||||
#include "lengthcombo.h"
|
||||
#include "qsetborder.h"
|
||||
|
||||
|
||||
typedef Qt2CB<ControlTabular, Qt2DB<QTabularDialog> > base_class;
|
||||
|
||||
QTabular::QTabular()
|
||||
@ -90,7 +90,7 @@ void QTabular::update_borders()
|
||||
{
|
||||
LyXTabular * tabular(controller().tabular());
|
||||
int cell(controller().inset()->getActCell());
|
||||
|
||||
|
||||
if (!controller().isMulticolumnCell()) {
|
||||
dialog_->borders->setLeftEnabled(true);
|
||||
dialog_->borders->setRightEnabled(true);
|
||||
@ -134,7 +134,7 @@ void QTabular::update_contents()
|
||||
|
||||
int const row(tabular->row_of_cell(cell));
|
||||
int const col(tabular->column_of_cell(cell));
|
||||
|
||||
|
||||
dialog_->tabularRowED->setText(tostr(row + 1).c_str());
|
||||
dialog_->tabularColumnED->setText(tostr(col + 1).c_str());
|
||||
|
||||
@ -151,7 +151,7 @@ void QTabular::update_contents()
|
||||
|
||||
LyXLength pwidth;
|
||||
string special;
|
||||
|
||||
|
||||
if (multicol) {
|
||||
special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_MULTI);
|
||||
pwidth = tabular->GetMColumnPWidth(cell);
|
||||
@ -159,7 +159,7 @@ void QTabular::update_contents()
|
||||
special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_COLUMN);
|
||||
pwidth = tabular->GetColumnPWidth(cell);
|
||||
}
|
||||
|
||||
|
||||
dialog_->specialAlignmentED->setText(special.c_str());
|
||||
|
||||
bool const isReadonly = bc().bp().isReadOnly();
|
||||
@ -246,7 +246,7 @@ void QTabular::update_contents()
|
||||
dialog_->newpageCB->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
LyXTabular::ltType ltt;
|
||||
bool use_empty;
|
||||
bool row_set = tabular->GetRowOfLTHead(row, ltt);
|
||||
@ -350,7 +350,7 @@ void QTabular::closeGUI()
|
||||
str2 = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_MULTI);
|
||||
else
|
||||
str2 = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_COLUMN);
|
||||
|
||||
|
||||
if (str1 != str2) {
|
||||
if (controller().isMulticolumnCell())
|
||||
controller().set(LyXTabular::SET_SPECIAL_MULTI, str1);
|
||||
|
@ -32,10 +32,10 @@ public:
|
||||
friend class QTabularDialog;
|
||||
|
||||
QTabular();
|
||||
|
||||
|
||||
protected:
|
||||
virtual bool isValid();
|
||||
|
||||
|
||||
private:
|
||||
/// We can't use this ...
|
||||
virtual void apply() {}
|
||||
|
@ -17,7 +17,7 @@
|
||||
#endif
|
||||
|
||||
#include "ControlTabular.h"
|
||||
|
||||
|
||||
#include "QTabular.h"
|
||||
#include "QTabularDialog.h"
|
||||
#include "tabular.h"
|
||||
@ -60,25 +60,25 @@ void QTabularDialog::columnAppend_clicked()
|
||||
form_->controller().set(LyXTabular::APPEND_COLUMN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QTabularDialog::rowAppend_clicked()
|
||||
{
|
||||
form_->controller().set(LyXTabular::APPEND_ROW);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QTabularDialog::columnDelete_clicked()
|
||||
{
|
||||
form_->controller().set(LyXTabular::DELETE_COLUMN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QTabularDialog::rowDelete_clicked()
|
||||
{
|
||||
form_->controller().set(LyXTabular::DELETE_ROW);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QTabularDialog::borderSet_clicked()
|
||||
{
|
||||
form_->controller().set(LyXTabular::SET_ALL_LINES);
|
||||
@ -92,7 +92,7 @@ void QTabularDialog::borderUnset_clicked()
|
||||
form_->update_borders();
|
||||
form_->changed();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QTabularDialog::leftBorder_changed()
|
||||
{
|
||||
@ -146,8 +146,8 @@ void QTabularDialog::specialAlignment_changed()
|
||||
|
||||
void QTabularDialog::width_changed()
|
||||
{
|
||||
string const width =
|
||||
LyXLength(widthED->text().toDouble(),
|
||||
string const width =
|
||||
LyXLength(widthED->text().toDouble(),
|
||||
widthUnit->currentLengthItem()).asString();
|
||||
if (form_->controller().isMulticolumnCell())
|
||||
form_->controller().set(LyXTabular::SET_MPWIDTH, width);
|
||||
|
@ -29,11 +29,11 @@ public:
|
||||
|
||||
protected slots:
|
||||
virtual void change_adaptor();
|
||||
|
||||
|
||||
virtual void close_clicked();
|
||||
virtual void columnAppend_clicked();
|
||||
virtual void rowAppend_clicked();
|
||||
virtual void columnDelete_clicked();
|
||||
virtual void columnDelete_clicked();
|
||||
virtual void rowDelete_clicked();
|
||||
virtual void borderSet_clicked();
|
||||
virtual void borderUnset_clicked();
|
||||
@ -67,7 +67,7 @@ protected slots:
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent * e);
|
||||
|
||||
|
||||
private:
|
||||
QTabular * form_;
|
||||
};
|
||||
|
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
#include "bulletstrings.h"
|
||||
|
||||
char const * bullets_standard[36] = {
|
||||
|
@ -57,4 +57,3 @@ void LengthCombo::setEnabled(bool b)
|
||||
{
|
||||
QComboBox::setEnabled(b);
|
||||
}
|
||||
|
||||
|
@ -10,22 +10,22 @@
|
||||
|
||||
#include "qcoloritem.h"
|
||||
|
||||
#include <qfont.h>
|
||||
#include <qfont.h>
|
||||
#include <qfontmetrics.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
|
||||
QColorItem::QColorItem(QColor c, QString const & t)
|
||||
: color_(c), text_(t)
|
||||
{
|
||||
QFont font;
|
||||
QFontMetrics metrics(font);
|
||||
|
||||
|
||||
ascent_ = metrics.ascent();
|
||||
width_ = 40 + metrics.width(t);
|
||||
height_ = metrics.ascent() + metrics.descent() + 6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QColorItem::paint(QPainter * p)
|
||||
{
|
||||
p->fillRect(2, 2, 35, height_, color_);
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <qlistbox.h>
|
||||
#include <qcolor.h>
|
||||
|
||||
|
||||
class QColorItem : public QListBoxItem {
|
||||
|
||||
public:
|
||||
@ -19,11 +19,11 @@ public:
|
||||
QColor color() {
|
||||
return color_;
|
||||
}
|
||||
|
||||
|
||||
void color(QColor c) {
|
||||
color_ = c;
|
||||
}
|
||||
|
||||
|
||||
virtual int height(const QListBox *) const {
|
||||
return height_;
|
||||
}
|
||||
@ -31,17 +31,17 @@ public:
|
||||
virtual int width(const QListBox *) const {
|
||||
return width_;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter * p);
|
||||
|
||||
|
||||
private:
|
||||
int ascent_;
|
||||
|
||||
|
||||
int height_;
|
||||
|
||||
int width_;
|
||||
|
||||
|
||||
QColor color_;
|
||||
|
||||
QString text_;
|
||||
|
@ -120,7 +120,7 @@ string const symbolPattern(LyXFont::FONT_FAMILY family)
|
||||
|
||||
default:
|
||||
return string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool addFontPath()
|
||||
@ -136,7 +136,7 @@ bool addFontPath()
|
||||
lyxerr << "Adding " << dir << " to the font path.\n";
|
||||
string const command = "xset fp+ " + dir;
|
||||
Systemcall s;
|
||||
if (!s.startscript(Systemcall::Wait, command))
|
||||
if (!s.startscript(Systemcall::Wait, command))
|
||||
return true;
|
||||
lyxerr << "Unable to add font path.\n";
|
||||
}
|
||||
@ -152,7 +152,7 @@ bool isAvailable(QFont const & font, LyXFont const & f) {
|
||||
if (tmp.empty())
|
||||
return false;
|
||||
else
|
||||
return token(tmp, '-', 2) ==
|
||||
return token(tmp, '-', 2) ==
|
||||
token(font.rawName().latin1(), '-', 2);
|
||||
#endif
|
||||
}
|
||||
@ -174,7 +174,7 @@ qfont_loader::font_info::font_info(LyXFont const & f)
|
||||
font.setRawName(pat.c_str());
|
||||
}
|
||||
}
|
||||
} else
|
||||
} else
|
||||
switch (f.family()) {
|
||||
case LyXFont::ROMAN_FAMILY:
|
||||
font.setFamily(makeFontName(lyxrc.roman_font_name,
|
||||
|
@ -8,11 +8,11 @@
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "qfontexample.h"
|
||||
|
||||
|
||||
#include <qpainter.h>
|
||||
|
||||
|
||||
void QFontExample::set(QFont const & font, QString const & text)
|
||||
{
|
||||
font_ = font;
|
||||
@ -20,22 +20,22 @@ void QFontExample::set(QFont const & font, QString const & text)
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
QSize QFontExample::sizeHint() const
|
||||
{
|
||||
QFontMetrics m(font_);
|
||||
QFontMetrics m(font_);
|
||||
return QSize(m.width(text_) + 10, m.ascent() + m.descent() + 6);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void QFontExample::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter p;
|
||||
QPainter p;
|
||||
QFontMetrics m(font_);
|
||||
|
||||
|
||||
p.begin(this);
|
||||
p.setFont(font_);
|
||||
p.drawRect(0, 0, width() - 1, height() - 1);
|
||||
p.drawRect(0, 0, width() - 1, height() - 1);
|
||||
p.drawText(5, 3 + m.ascent(), text_);
|
||||
p.end();
|
||||
}
|
||||
|
@ -16,14 +16,14 @@ class QFontExample : public QWidget {
|
||||
public:
|
||||
QFontExample(QWidget * parent, const char * name)
|
||||
: QWidget(parent, name) {}
|
||||
|
||||
|
||||
void set(QFont const & font, QString const & text);
|
||||
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent * p);
|
||||
|
||||
|
||||
private:
|
||||
QFont font_;
|
||||
QString text_;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**********************************************************************
|
||||
** $Id: qgridview.h,v 1.1 2002/10/09 08:59:02 leuven Exp $
|
||||
** $Id: qgridview.h,v 1.2 2002/12/01 22:59:19 larsbj Exp $
|
||||
**
|
||||
** Definition of QGridView class
|
||||
**
|
||||
@ -65,7 +65,7 @@ public:
|
||||
virtual void setCellWidth( int );
|
||||
int cellHeight() const;
|
||||
virtual void setCellHeight( int );
|
||||
|
||||
|
||||
QRect cellRect() const;
|
||||
QRect cellGeometry( int row, int column );
|
||||
QSize gridSize() const;
|
||||
@ -102,28 +102,28 @@ private: // Disabled copy constructor and operator=
|
||||
#endif
|
||||
};
|
||||
|
||||
inline int QGridView::cellWidth() const
|
||||
inline int QGridView::cellWidth() const
|
||||
{ return cellw; }
|
||||
|
||||
inline int QGridView::cellHeight() const
|
||||
inline int QGridView::cellHeight() const
|
||||
{ return cellh; }
|
||||
|
||||
inline int QGridView::rowAt( int y ) const
|
||||
inline int QGridView::rowAt( int y ) const
|
||||
{ return y / cellh; }
|
||||
|
||||
inline int QGridView::columnAt( int x ) const
|
||||
inline int QGridView::columnAt( int x ) const
|
||||
{ return x / cellw; }
|
||||
|
||||
inline int QGridView::numRows() const
|
||||
inline int QGridView::numRows() const
|
||||
{ return nrows; }
|
||||
|
||||
inline int QGridView::numCols() const
|
||||
inline int QGridView::numCols() const
|
||||
{return ncols; }
|
||||
|
||||
inline QRect QGridView::cellRect() const
|
||||
{ return QRect( 0, 0, cellw, cellh ); }
|
||||
|
||||
inline QSize QGridView::gridSize() const
|
||||
inline QSize QGridView::gridSize() const
|
||||
{ return QSize( ncols * cellw, nrows * cellh ); }
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ bool q_is_modifier(int qkey)
|
||||
int string_to_qkey(string const & str)
|
||||
{
|
||||
// FIX! (Lgb)
|
||||
|
||||
|
||||
if (str == "Escape") return Qt::Key_Escape;
|
||||
if (str == "Tab") return Qt::Key_Tab;
|
||||
if (str == "BackSpace") return Qt::Key_BackSpace;
|
||||
|
@ -31,7 +31,7 @@ QSetBorder::QSetBorder(QWidget * parent, char const * name, WFlags fl)
|
||||
setMinimumSize(w,h);
|
||||
setMaximumSize(w,h);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QSetBorder::paintEvent(QPaintEvent * e)
|
||||
{
|
||||
@ -46,9 +46,9 @@ void QSetBorder::init()
|
||||
QPainter paint;
|
||||
paint.begin(&buffer);
|
||||
paint.setPen(Qt::black);
|
||||
|
||||
|
||||
// FIXME: wow, readable !! :)
|
||||
|
||||
|
||||
paint.drawLine(m + l , m, m + l, m + l);
|
||||
paint.drawLine(w - (m + l), m, w - (m + l), m + l);
|
||||
|
||||
@ -64,7 +64,7 @@ void QSetBorder::init()
|
||||
paint.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QSetBorder::mousePressEvent(QMouseEvent * e)
|
||||
{
|
||||
if (e->y() > e->x()) {
|
||||
@ -117,7 +117,7 @@ void QSetBorder::drawLeft(bool draw)
|
||||
col = QColor("grey");
|
||||
drawLine(col, m + l, m + l + 2, m + l, h - m - l - 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QSetBorder::drawRight(bool draw)
|
||||
{
|
||||
@ -127,7 +127,7 @@ void QSetBorder::drawRight(bool draw)
|
||||
drawLine(col, h - m - l + 1, m + l + 2, h - m - l + 1, h - m - l - 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QSetBorder::drawTop(bool draw)
|
||||
{
|
||||
QColor col(draw ? Qt::black : Qt::white);
|
||||
@ -186,14 +186,14 @@ void QSetBorder::setRight(bool border)
|
||||
right_.set = border;
|
||||
drawRight(border);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QSetBorder::setTop(bool border)
|
||||
{
|
||||
top_.set = border;
|
||||
drawTop(border);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void QSetBorder::setBottom(bool border)
|
||||
{
|
||||
|
@ -52,12 +52,12 @@ public slots:
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent * e);
|
||||
void paintEvent(QPaintEvent * e);
|
||||
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
||||
void drawLine(QColor const & col, int x, int y, int x2, int y2);
|
||||
|
||||
|
||||
void drawLeft(bool);
|
||||
void drawRight(bool);
|
||||
void drawTop(bool);
|
||||
@ -81,5 +81,5 @@ private:
|
||||
|
||||
QPixmap buffer;
|
||||
};
|
||||
|
||||
|
||||
#endif // QSETBORDER_H
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author unknown
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -1,3 +1,7 @@
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* sevral files: ws changes
|
||||
|
||||
2002-12-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* checkedwidgets.C (setWidget): make sure that FL_LCOL and FL_COL1
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Allan Rae
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Allan Rae
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
* \file xforms/Dialogs_impl.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
@ -268,21 +268,21 @@ WrapDialog;
|
||||
struct Dialogs::Impl {
|
||||
Impl(LyXView & lv, Dialogs & d);
|
||||
|
||||
AboutlyxDialog aboutlyx;
|
||||
AboutlyxDialog aboutlyx;
|
||||
BibitemDialog bibitem;
|
||||
BibtexDialog bibtex;
|
||||
CharacterDialog character;
|
||||
BibtexDialog bibtex;
|
||||
CharacterDialog character;
|
||||
CitationDialog citation;
|
||||
DocumentDialog document;
|
||||
ErrorDialog error;
|
||||
ErrorDialog error;
|
||||
ERTDialog ert;
|
||||
ExternalDialog external;
|
||||
ExternalDialog external;
|
||||
FileDialog file;
|
||||
FloatDialog floats;
|
||||
FloatDialog floats;
|
||||
ForksDialog forks;
|
||||
GraphicsDialog graphics;
|
||||
GraphicsDialog graphics;
|
||||
IncludeDialog include;
|
||||
IndexDialog index;
|
||||
IndexDialog index;
|
||||
LogFileDialog logfile;
|
||||
MathPanelDialog mathpanel;
|
||||
MinipageDialog minipage;
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Asger Alstrup
|
||||
* \author John Levon
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Edwin Leuven
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Angus Leeming
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user