mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Remove some more debug
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6592 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
50feda9c4c
commit
9c01e98af7
@ -141,12 +141,6 @@ void QContentPane::wheelEvent(QWheelEvent * 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()));
|
||||
@ -198,9 +192,6 @@ void QContentPane::paintEvent(QPaintEvent * e)
|
||||
|
||||
QRect r(e->rect());
|
||||
|
||||
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);
|
||||
|
@ -60,7 +60,7 @@ Image::FormatList QLImage::loadableFormats()
|
||||
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());
|
||||
|
||||
@ -74,17 +74,19 @@ Image::FormatList QLImage::loadableFormats()
|
||||
fmts.push_back(fit->name());
|
||||
}
|
||||
|
||||
lyxerr[Debug::GRAPHICS]
|
||||
<< "\nOf these, LyX recognises the following formats:\n";
|
||||
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;
|
||||
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;
|
||||
|
||||
return fmts;
|
||||
}
|
||||
@ -141,23 +143,16 @@ void QLImage::load(string const & filename)
|
||||
finishedLoading(false);
|
||||
return;
|
||||
}
|
||||
lyxerr[Debug::GRAPHICS] << "just Loaded." << endl;
|
||||
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)
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "pixmap isNull " << pixmap_.isNull()
|
||||
<< " xformed_pixmap_ isNull " << xformed_pixmap_.isNull() << endl;
|
||||
if (pixmap_.isNull() || params.display == NoDisplay)
|
||||
return false;
|
||||
|
||||
lyxerr[Debug::GRAPHICS] << "setPixmap()" << endl;
|
||||
|
||||
// FIXME: it's a fake kind of grayscale !
|
||||
|
||||
switch (params.display) {
|
||||
@ -232,8 +227,6 @@ void QLImage::rotate(Params const & params)
|
||||
// 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);
|
||||
@ -252,10 +245,6 @@ void QLImage::scale(Params const & params)
|
||||
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);
|
||||
|
@ -140,8 +140,6 @@ Painter & QLPainter::rectangle(int x, int y,
|
||||
line_style ls,
|
||||
line_width lw)
|
||||
{
|
||||
//lyxerr << "rectangle " << x << ',' << y << ' '
|
||||
// << w << ',' << h << endl;
|
||||
setPen(col, ls, lw).drawRect(x, y, w, h);
|
||||
return *this;
|
||||
}
|
||||
@ -151,8 +149,6 @@ Painter & QLPainter::fillRectangle(int x, int y,
|
||||
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;
|
||||
}
|
||||
@ -184,9 +180,6 @@ Painter & QLPainter::arc(int x, int y,
|
||||
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;
|
||||
|
@ -47,13 +47,7 @@ string const getLabel(MenuItem const & mi)
|
||||
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 label;
|
||||
}
|
||||
|
@ -111,9 +111,8 @@ void QLyXKeySym::set(QKeyEvent * ev)
|
||||
return;
|
||||
}
|
||||
text_ = ev->text();
|
||||
if (lyxerr.debugging()) {
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "Setting key to " << key_ << ", " << fromqstr(text_) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -121,18 +120,16 @@ void QLyXKeySym::init(string const & 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -140,9 +137,8 @@ bool QLyXKeySym::isOK() const
|
||||
bool QLyXKeySym::isModifier() const
|
||||
{
|
||||
bool const mod(q_is_modifier(key_));
|
||||
if (lyxerr.debugging()) {
|
||||
if (lyxerr.debugging())
|
||||
lyxerr[Debug::KEY] << "isMod is " << mod << endl;
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user