for (int iter = 0; iter < 4; ++iter) {
bullets_[iter] = ITEMIZE_DEFAULTS[iter];
}
-
+
QPopupMenu * pm = new QPopupMenu(this);
QPopupMenu * pm1 = new QPopupMenu(pm);
{
activeitem_->setText(0,"");
activeitem_->setPixmap(0,getPixmap(font,character));
-
+
activebullet_->setFont(font);
activebullet_->setCharacter(character);
}
{
activeitem_->setPixmap(0, QPixmap());
activeitem_->setText(0, toqstr(text));
-
+
activebullet_->setText(text);
}
void BulletsModule::ding3(int row, int col)
{
setBullet(4,6*row + col);
-}
+}
void BulletsModule::ding4(int row, int col)
void setBullet(int level, const Bullet & bullet);
///
Bullet getBullet(int level);
-
+
protected slots:
///
void standard(int row, int col);
void setActive(QListViewItem*);
/// set size
void setSize(int size);
-
+
private:
/// get the pixmap that matches font/character
QPixmap getPixmap(int font, int character);
QListViewItem * activeitem_;
/// store results
boost::array<Bullet,4> bullets_;
-
+
QBrowseBox * standard_;
QBrowseBox * maths_;
QBrowseBox * ding1_;
if (!bib.empty())
dialog_->databaseLB->insertItem(toqstr(bib));
}
-
+
dialog_->addBibCB->clear();
vector<string> const bib_str = getVectorFromString(
}
}
- if (!present)
+ if (!present)
styleCB->insertItem(toqstr(filen),0);
-
+
styleCB->setCurrentItem(pres);
form_->changed();
}
dialog_->layoutModule->pagestyleCO->insertItem(qt_("plain"));
dialog_->layoutModule->pagestyleCO->insertItem(qt_("headings"));
dialog_->layoutModule->pagestyleCO->insertItem(qt_("fancy"));
-
+
dialog_->layoutModule->lspacingCO->insertItem(
qt_("Single"), Spacing::Single);
dialog_->layoutModule->lspacingCO->insertItem(
// layout
params.textclass =
dialog_->layoutModule->classCO->currentItem();
-
+
params.fonts =
fromqstr(dialog_->layoutModule->fontsCO->currentText());
params.pagestyle =
fromqstr(dialog_->layoutModule->pagestyleCO->currentText());
-
+
switch (dialog_->layoutModule->lspacingCO->currentItem()) {
case 0:
params.spacing.set(Spacing::Single);
margin = margin - 1;
}
params.paperpackage = char(margin);
-
- // set params.papersize from params.papersize2
+
+ // set params.papersize from params.papersize2
// and params.paperpackage
params.setPaperStuff();
dialog_->langModule->quoteStyleCO->setCurrentItem(
params.quotes_language);
-
+
dialog_->langModule->defaultencodingCB->setChecked(true);
if (params.inputenc != "auto") {
connect(paperModule->facingPagesCB, SIGNAL(toggled(bool)),
this, SLOT(change_adaptor()));
- // bullets
+ // bullets
connect(bulletsModule->bulletsizeCO, SIGNAL(activated(int)),
this, SLOT(change_adaptor()));
connect(bulletsModule->bulletsLV, SIGNAL(selectionChanged()),
previewCB->setEnabled(false);
previewCB->setChecked(false);
break;
-
+
default:
visiblespaceCB->setEnabled(true);
previewCB->setEnabled(false);
res.second->populate(m->submenu());
} else {
FuncStatus const status = m->status();
-
+
insertItem(toqstr(getLabel(*m)), m->action());
setItemEnabled(m->action(), !status.disabled());
setItemChecked(m->action(), status.onoff(true));
return ok;
}
-
+
bool QLyXKeySym::isModifier() const
{
bool const mod(q_is_modifier(key_));
}
QChar const c(text_[0]);
- lyxerr[Debug::KEY] << "isText for key " << key_
+ lyxerr[Debug::KEY] << "isText for key " << key_
<< " isPrint is " << c.isPrint() << endl;
return c.isPrint();
}
-
+
bool operator==(LyXKeySym const & k1, LyXKeySym const & k2)
{
QLyXKeySym const & q1(static_cast<QLyXKeySym const &>(k1));
/// Is this normal insertable text ? (last ditch attempt only)
virtual bool isText() const;
-
+
/**
* Return the value of the keysym into the local ISO encoding.
* This converts the LyXKeySym to a 8-bit encoded character.
QPrefIdentityModule * idmod(dialog_->identityModule);
idmod->nameED->setText(toqstr(rc.user_name));
idmod->emailED->setText(toqstr(rc.user_email));
-
+
QPrefKeyboardModule * keymod(dialog_->keyboardModule);
box->insertItem(text);
}
-
+
};
-
+
QSearchDialog::QSearchDialog(QSearch * form)
: QSearchDialogBase(0, 0, false, 0),
void QSpellchecker::partialUpdate(int s)
{
- ControlSpellchecker::State const state =
+ ControlSpellchecker::State const state =
static_cast<ControlSpellchecker::State>(s);
switch (state) {
QSpellcheckerDialog(QSpellchecker * form);
public slots:
virtual void suggestionChanged(const QString &);
-
+
protected slots:
virtual void acceptClicked();
virtual void addClicked();
dialog_->urlED->setText(toqstr(params.getContents()));
dialog_->nameED->setText(toqstr(params.getOptions()));
dialog_->hyperlinkCB->setChecked(params.getCmdName() != "url");
-
+
bc().valid(isValid());
}
// into a static dialog return in the lyx code (for example,
// load autosave file QMessageBox. We have to just get the hell
// out.
-
+
::exit(0);
}
font_info * fi = fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
if (fi)
return fi;
-
+
font_info * fi2 = new font_info(f);
fontinfo_[f.family()][f.series()][f.realShape()][f.size()] = fi2;
return fi2;
return w;
}
-
+
bool qfont_loader::available(LyXFont const & f)
{
if (!lyxrc.use_gui)
#include <map>
-
+
#include "encoding.h"
#include "lyxfont.h"
#include <qfont.h>
#include <qfontmetrics.h>
-
+
/**
* Qt font loader for LyX. Matches LyXFonts against
* actual QFont instances, and also caches metrics.
QFontMetrics metrics;
typedef std::map<Uchar, int> WidthCache;
- /// cache of char widths
+ /// cache of char widths
WidthCache widthcache;
};
#include <qfontmetrics.h>
#include <qfont.h>
-
+
namespace {
QFontMetrics const & metrics(LyXFont const & f)
return fontloader.metrics(f);
}
-
+
int charwidth(Uchar val, LyXFont const & f)
{
if (!lyxrc.use_gui)
return 1;
- return fontloader.charwidth(f, val);
+ return fontloader.charwidth(f, val);
}
} // namespace anon
encoding = encodings.symbol_encoding();
return encoding;
}
-
+
int smallcapswidth(char const * s, size_t ls, LyXFont const & f)
{
QFontMetrics const & qsmallm = fontloader.metrics(smallfont);
Encoding const * encoding(fontencoding(f));
-
+
int w = 0;
for (size_t i = 0; i < ls; ++i) {
}
return w;
}
-
+
int width(char const * s, size_t ls, LyXFont const & f)
{
if (f.realShape() == LyXFont::SMALLCAPS_SHAPE) {
return smallcapswidth(s, ls, f);
}
-
+
Encoding const * encoding(fontencoding(f));
if (ls == 1) {
}
int w = 0;
-
+
for (size_t i = 0; i < ls; ++i) {
w += charwidth(encoding->ucs(s[i]), f);
}
-
+
return w;
}
/****************************************************************************
-** $Id: qgridview.C,v 1.1 2003/01/13 10:39:18 larsbj Exp $
+** $Id: qgridview.C,v 1.2 2003/02/25 13:35:26 leeming Exp $
**
** Implementation of QGridView class
**
cellw = cellWidth;
updateGrid();
updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
-
+
}
/*! \property QGridView::cellHeight
cellh = cellHeight;
updateGrid();
updateContents( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
-
+
}
/*!
#define QTTIMEOUT_H
#include "frontends/Timeout.h"
-#include <qobject.h>
+#include <qobject.h>
// stupid Qt
#undef emit
#include "support/lstrings.h"
#include "gettext.h"
#include "qt_helpers.h"
-
+
#include "lengthcombo.h"
-
+
#include <qglobal.h>
#include <qlineedit.h>
#include <qtextcodec.h>
#endif
}
-
+
string widgetsToLength(QLineEdit const * input, LengthCombo const * combo)
{
QString length = input->text();
#include <utility>
#include "lyxlength.h"
-
+
class LengthCombo;
class QLineEdit;
class QString;
-
+
string makeFontName(string const & family, string const & foundry);
-
+
std::pair<string,string> parseFontName(string const & name);
/// method to get a LyXLength from widgets
string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
-
+
/// method to set widgets from a LyXLength
void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
string const & len, LyXLength::UNIT default_unit);
-
+
/**
* toqstr - convert char * into unicode
*