void QContentPane::keyPressEvent(QKeyEvent * e)
{
void QContentPane::keyPressEvent(QKeyEvent * e)
{
- lyxerr[Debug::KEY] << "Press key " << e->key()
- << " text \""
- << (e->text().isEmpty() ?
- "none" :
- fromqstr(e->text()))
- << "\", ascii \"" << e->ascii() << '"' << endl;
QLyXKeySym * sym = new QLyXKeySym();
sym->set(e);
wa_->workAreaKeyPress(LyXKeySymPtr(sym), q_key_state(e->state()));
QLyXKeySym * sym = new QLyXKeySym();
sym->set(e);
wa_->workAreaKeyPress(LyXKeySymPtr(sym), q_key_state(e->state()));
- lyxerr[Debug::GUI] << "repainting " << r.x()
- << ',' << r.y() << ' ' << r.width()
- << ',' << r.height() << endl;
QPainter q(this);
q.drawPixmap(QPoint(r.x(), r.y()),
*pixmap_.get(), r);
QPainter q(this);
q.drawPixmap(QPoint(r.x(), r.y()),
*pixmap_.get(), r);
QStrListIterator it(qt_formats);
for (; it.current(); ++it) {
QStrListIterator it(qt_formats);
for (; it.current(); ++it) {
- lyxerr[Debug::GRAPHICS] << it.current() << endl;
+ lyxerr[Debug::GRAPHICS] << it.current() << endl;
string ext = lowercase(it.current());
string ext = lowercase(it.current());
fmts.push_back(fit->name());
}
fmts.push_back(fit->name());
}
- lyxerr[Debug::GRAPHICS]
- << "\nOf these, LyX recognises the following formats:\n";
-
- FormatList::const_iterator fbegin = fmts.begin();
- FormatList::const_iterator fend = fmts.end();
- for (FormatList::const_iterator fit = fbegin; fit != fend; ++fit) {
- if (fit != fbegin)
- lyxerr[Debug::GRAPHICS] << ", ";
- lyxerr[Debug::GRAPHICS] << *fit;
+ if (lyxerr.debugging()) {
+ lyxerr[Debug::GRAPHICS]
+ << "\nOf these, LyX recognises the following formats:\n";
+
+ FormatList::const_iterator fbegin = fmts.begin();
+ FormatList::const_iterator fend = fmts.end();
+ for (FormatList::const_iterator fit = fbegin; fit != fend; ++fit) {
+ if (fit != fbegin)
+ lyxerr[Debug::GRAPHICS] << ", ";
+ lyxerr[Debug::GRAPHICS] << *fit;
+ }
+ lyxerr[Debug::GRAPHICS] << '\n' << endl;
- lyxerr[Debug::GRAPHICS] << '\n' << endl;
finishedLoading(false);
return;
}
finishedLoading(false);
return;
}
- lyxerr[Debug::GRAPHICS] << "just Loaded." << endl;
xformed_pixmap_ = pixmap_;
xformed_pixmap_ = pixmap_;
- lyxerr[Debug::GRAPHICS] << "pixmap isNull " << pixmap_.isNull()
- << " xformed_pixmap_ isNull " << xformed_pixmap_.isNull() << endl;
finishedLoading(true);
}
bool QLImage::setPixmap(Params const & params)
{
finishedLoading(true);
}
bool QLImage::setPixmap(Params const & params)
{
- lyxerr[Debug::GRAPHICS] << "pixmap isNull " << pixmap_.isNull()
- << " xformed_pixmap_ isNull " << xformed_pixmap_.isNull() << endl;
if (pixmap_.isNull() || params.display == NoDisplay)
return false;
if (pixmap_.isNull() || params.display == NoDisplay)
return false;
- lyxerr[Debug::GRAPHICS] << "setPixmap()" << endl;
-
// FIXME: it's a fake kind of grayscale !
switch (params.display) {
// FIXME: it's a fake kind of grayscale !
switch (params.display) {
// The angle passed to flimage_rotate is the angle in one-tenth of a
// degree units.
// The angle passed to flimage_rotate is the angle in one-tenth of a
// degree units.
- lyxerr[Debug::GRAPHICS] << "rotating image by " << params.angle << " degrees" << endl;
-
QWMatrix m;
m.rotate(-params.angle);
xformed_pixmap_ = xformed_pixmap_.xForm(m);
QWMatrix m;
m.rotate(-params.angle);
xformed_pixmap_ = xformed_pixmap_.xForm(m);
if (width == getWidth() && height == getHeight())
return;
if (width == getWidth() && height == getHeight())
return;
- lyxerr[Debug::GRAPHICS] << "resizing image to " << width << '('
- << (double(width)/getWidth()) << "),"
- << height << '('
- << (double(height)/getHeight()) << ')' << endl;
QWMatrix m;
m.scale(double(width) / getWidth(), double(height) / getHeight());
xformed_pixmap_ = xformed_pixmap_.xForm(m);
QWMatrix m;
m.scale(double(width) / getWidth(), double(height) / getHeight());
xformed_pixmap_ = xformed_pixmap_.xForm(m);
line_style ls,
line_width lw)
{
line_style ls,
line_width lw)
{
- //lyxerr << "rectangle " << x << ',' << y << ' '
- // << w << ',' << h << endl;
setPen(col, ls, lw).drawRect(x, y, w, h);
return *this;
}
setPen(col, ls, lw).drawRect(x, y, w, h);
return *this;
}
int w, int h,
LColor::color col)
{
int w, int h,
LColor::color col)
{
- //lyxerr << "fillRectangle " << x << ',' << y << ' '
- // << w << ',' << h << endl;
qp_->fillRect(x, y, w, h, QColor(toqstr(lcolor.getX11Name(col))));
return *this;
}
qp_->fillRect(x, y, w, h, QColor(toqstr(lcolor.getX11Name(col))));
return *this;
}
unsigned int w, unsigned int h,
int a1, int a2, LColor::color col)
{
unsigned int w, unsigned int h,
int a1, int a2, LColor::color col)
{
- lyxerr[Debug::GUI] << "arc: " << x << ',' << y
- << ' ' << w << ',' << h << ", angles "
- << a1 << " - " << a2 << endl;
// LyX usings 1/64ths degree, Qt usings 1/16th
setPen(col).drawArc(x, y, w, h, a1 / 4, a2 / 4);
return *this;
// LyX usings 1/64ths degree, Qt usings 1/16th
setPen(col).drawArc(x, y, w, h, a1 / 4, a2 / 4);
return *this;
if (!binding.empty()) {
label += '\t' + binding;
}
if (!binding.empty()) {
label += '\t' + binding;
}
-
- lyxerr[Debug::GUI] << "Label: " << mi.label()
- << " Shortcut: " << mi.shortcut()
- << " Accel: " << binding << endl;
- } else
- lyxerr[Debug::GUI] << "Label: " << mi.label()
- << " Shortcut: " << mi.shortcut() << endl;
return;
}
text_ = ev->text();
return;
}
text_ = ev->text();
- if (lyxerr.debugging()) {
+ if (lyxerr.debugging())
lyxerr[Debug::KEY] << "Setting key to " << key_ << ", " << fromqstr(text_) << endl;
lyxerr[Debug::KEY] << "Setting key to " << key_ << ", " << fromqstr(text_) << endl;
{
key_ = string_to_qkey(symbolname);
text_ = toqstr(symbolname);
{
key_ = string_to_qkey(symbolname);
text_ = toqstr(symbolname);
- if (lyxerr.debugging()) {
+ if (lyxerr.debugging())
lyxerr[Debug::KEY] << "Init key to " << key_ << ", " << fromqstr(text_) << endl;
lyxerr[Debug::KEY] << "Init key to " << key_ << ", " << fromqstr(text_) << endl;
}
bool QLyXKeySym::isOK() const
{
bool const ok(!(text_.isEmpty() && key_ == Qt::Key_unknown));
}
bool QLyXKeySym::isOK() const
{
bool const ok(!(text_.isEmpty() && key_ == Qt::Key_unknown));
- if (lyxerr.debugging()) {
+ if (lyxerr.debugging())
lyxerr[Debug::KEY] << "isOK is " << ok << endl;
lyxerr[Debug::KEY] << "isOK is " << ok << endl;
bool QLyXKeySym::isModifier() const
{
bool const mod(q_is_modifier(key_));
bool QLyXKeySym::isModifier() const
{
bool const mod(q_is_modifier(key_));
- if (lyxerr.debugging()) {
+ if (lyxerr.debugging())
lyxerr[Debug::KEY] << "isMod is " << mod << endl;
lyxerr[Debug::KEY] << "isMod is " << mod << endl;