mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
clean up dos style line ending.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fae3013531
commit
4213d1851a
@ -80,7 +80,7 @@ void QBranches::update()
|
||||
// restore selected branch
|
||||
if (bname == sel_branch)
|
||||
branchesLV->setSelected(newItem, true);
|
||||
}
|
||||
}
|
||||
emit changed();
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ void QBranches::on_colorPB_clicked()
|
||||
if (selItem != 0)
|
||||
sel_branch = selItem->text(0);
|
||||
if (!sel_branch.isEmpty()) {
|
||||
QColor initial("lightskyblue");
|
||||
QColor initial("lightskyblue");
|
||||
string current_branch = fromqstr(sel_branch);
|
||||
Branch * branch =
|
||||
branchlist_.find(current_branch);
|
||||
|
@ -39,9 +39,9 @@ public:
|
||||
|
||||
void update(BufferParams const & params);
|
||||
void apply(BufferParams & params) const;
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
protected:
|
||||
void toggleBranch(Q3ListViewItem * selItem);
|
||||
|
@ -354,7 +354,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
||||
|
||||
|
||||
branchesModule = new QBranches;
|
||||
connect(branchesModule, SIGNAL(changed()), this, SLOT(change_adaptor()));
|
||||
connect(branchesModule, SIGNAL(changed()), this, SLOT(change_adaptor()));
|
||||
|
||||
|
||||
preambleModule = new UiWidget<Ui::PreambleUi>;
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "MenuBackend.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include <QMenuBar>
|
||||
#include <QCursor>
|
||||
|
@ -255,9 +255,9 @@ void QLPainter::drawPixmap(int x, int y, QPixmap const & pixmap)
|
||||
QPainter qp(qwa_->paintDevice());
|
||||
qp.drawPixmap(x, y, pixmap);
|
||||
}
|
||||
|
||||
void QLPainter::drawImage(int x, int y, QImage const & image)
|
||||
{
|
||||
QPainter qp(qwa_->paintDevice());
|
||||
qp.drawImage(x, y, image);
|
||||
}
|
||||
|
||||
void QLPainter::drawImage(int x, int y, QImage const & image)
|
||||
{
|
||||
QPainter qp(qwa_->paintDevice());
|
||||
qp.drawImage(x, y, image);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ class LyXFont;
|
||||
class QPaintDevice;
|
||||
class QPainter;
|
||||
class QString;
|
||||
class QPixmap;
|
||||
class QImage;
|
||||
class QPixmap;
|
||||
class QImage;
|
||||
class QWorkArea;
|
||||
|
||||
/**
|
||||
@ -34,16 +34,16 @@ public:
|
||||
|
||||
~QLPainter();
|
||||
|
||||
/// begin painting
|
||||
/**
|
||||
Not used in the the Qt4 frontend.
|
||||
/// begin painting
|
||||
/**
|
||||
Not used in the the Qt4 frontend.
|
||||
*/
|
||||
virtual void start() {}
|
||||
|
||||
/// end painting
|
||||
/**
|
||||
Not used in the the Qt4 frontend.
|
||||
*/
|
||||
/**
|
||||
Not used in the the Qt4 frontend.
|
||||
*/
|
||||
virtual void end() {}
|
||||
|
||||
/// return the width of the work area in pixels
|
||||
@ -129,9 +129,9 @@ public:
|
||||
/// draw a pixmap from the image cache
|
||||
virtual void drawPixmap(int x, int y, QPixmap const & pixmap);
|
||||
|
||||
/// draw a pixmap from the image cache
|
||||
virtual void drawImage(int x, int y, QImage const & image);
|
||||
|
||||
/// draw a pixmap from the image cache
|
||||
virtual void drawImage(int x, int y, QImage const & image);
|
||||
|
||||
private:
|
||||
/// draw small caps text
|
||||
void smallCapsText(int x, int y,
|
||||
|
@ -70,7 +70,7 @@ void QLPopupMenu::update()
|
||||
lyxerr[Debug::GUI] << "\tTriggered menu: " << name_ << endl;
|
||||
|
||||
clear();
|
||||
|
||||
|
||||
if (name_.empty())
|
||||
return;
|
||||
|
||||
|
@ -58,10 +58,10 @@ private:
|
||||
|
||||
/// Top Level Menu
|
||||
Menu topLevelMenu_;
|
||||
|
||||
/// Mac specific menu hack
|
||||
/// \todo Fix it
|
||||
void specialMacXmenuHack();
|
||||
|
||||
/// Mac specific menu hack
|
||||
/// \todo Fix it
|
||||
void specialMacXmenuHack();
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -493,10 +493,10 @@ void QWorkArea::resizeEvent(QResizeEvent * resizeEvent)
|
||||
verticalScrollBar()->setPageStep(viewport()->height());
|
||||
|
||||
screen_device_ = QPixmap(viewport()->width(), viewport()->height());
|
||||
paint_device_ = QImage(viewport()->width(), viewport()->height(), QImage::Format_RGB32);
|
||||
paint_device_ = QImage(viewport()->width(), viewport()->height(), QImage::Format_RGB32);
|
||||
|
||||
this->workAreaResize();
|
||||
|
||||
|
||||
/*
|
||||
lyxerr[Debug::GUI] << BOOST_CURRENT_FUNCTION
|
||||
<< "\n QWidget width\t" << this->QWidget::width()
|
||||
@ -505,21 +505,21 @@ void QWorkArea::resizeEvent(QResizeEvent * resizeEvent)
|
||||
<< "\n viewport height\t" << viewport()->height()
|
||||
<< "\n QResizeEvent rect left\t" << rect().left()
|
||||
<< "\n QResizeEvent rect right\t" << rect().right()
|
||||
<< endl;
|
||||
<< endl;
|
||||
*/
|
||||
}
|
||||
|
||||
void QWorkArea::update(int x, int y, int w, int h)
|
||||
{
|
||||
//screen_device_.fromImage(paint_device_);
|
||||
QPainter q(&screen_device_);
|
||||
q.drawImage(x, y, paint_device_.copy(x, y, w, h));
|
||||
|
||||
viewport()->update(x, y, w, h);
|
||||
}
|
||||
|
||||
void QWorkArea::update(int x, int y, int w, int h)
|
||||
{
|
||||
//screen_device_.fromImage(paint_device_);
|
||||
QPainter q(&screen_device_);
|
||||
q.drawImage(x, y, paint_device_.copy(x, y, w, h));
|
||||
|
||||
viewport()->update(x, y, w, h);
|
||||
}
|
||||
|
||||
void QWorkArea::paintEvent(QPaintEvent * e)
|
||||
{
|
||||
{
|
||||
/*
|
||||
lyxerr[Debug::GUI] << BOOST_CURRENT_FUNCTION
|
||||
<< "\n QWidget width\t" << this->width()
|
||||
@ -532,23 +532,23 @@ void QWorkArea::paintEvent(QPaintEvent * e)
|
||||
<< "\n QPaintEvent y\t" << e->rect().y()
|
||||
<< "\n QPaintEvent w\t" << e->rect().width()
|
||||
<< "\n QPaintEvent h\t" << e->rect().height()
|
||||
<< endl;
|
||||
<< endl;
|
||||
*/
|
||||
QPainter q(viewport());
|
||||
q.drawPixmap(e->rect(), screen_device_, e->rect());
|
||||
}
|
||||
|
||||
QPixmap QWorkArea::copyScreen(int x, int y, int w, int h) const
|
||||
{
|
||||
return screen_device_.copy(x, y, w, h);
|
||||
}
|
||||
|
||||
void QWorkArea::drawScreen(int x, int y, QPixmap pixmap)
|
||||
{
|
||||
QPainter q(&screen_device_);
|
||||
q.drawPixmap(x, y, pixmap);
|
||||
viewport()->update(x, y, pixmap.width(), pixmap.height());
|
||||
}
|
||||
|
||||
QPixmap QWorkArea::copyScreen(int x, int y, int w, int h) const
|
||||
{
|
||||
return screen_device_.copy(x, y, w, h);
|
||||
}
|
||||
|
||||
void QWorkArea::drawScreen(int x, int y, QPixmap pixmap)
|
||||
{
|
||||
QPainter q(&screen_device_);
|
||||
q.drawPixmap(x, y, pixmap);
|
||||
viewport()->update(x, y, pixmap.width(), pixmap.height());
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
@ -26,9 +26,9 @@
|
||||
#include "QLPainter.h"
|
||||
#include "LyXView.h"
|
||||
|
||||
#include "funcrequest.h"
|
||||
#include "frontends/Timeout.h"
|
||||
|
||||
#include "funcrequest.h"
|
||||
#include "frontends/Timeout.h"
|
||||
|
||||
#include <QAbstractScrollArea>
|
||||
#include <QMouseEvent>
|
||||
#include <QWheelEvent>
|
||||
@ -36,8 +36,8 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QPaintEvent>
|
||||
#include <QTimer>
|
||||
#include <QImage>
|
||||
#include <QPixmap>
|
||||
#include <QImage>
|
||||
#include <QPixmap>
|
||||
|
||||
#include <queue>
|
||||
|
||||
@ -132,19 +132,19 @@ public:
|
||||
|
||||
/// return the backing pixmap
|
||||
QPaintDevice * paintDevice() { return &paint_device_; }
|
||||
|
||||
/// update the passed area.
|
||||
void update(int x, int y, int w, int h);
|
||||
|
||||
/// return a screen copy of the defined area.
|
||||
/// update the passed area.
|
||||
void update(int x, int y, int w, int h);
|
||||
|
||||
/// return a screen copy of the defined area.
|
||||
QPixmap copyScreen(int x, int y, int w, int h) const;
|
||||
|
||||
/// Draw a pixmap onto the backing pixmap.
|
||||
/**
|
||||
QPixmap is implicitely shared so no need to pass by reference.
|
||||
*/
|
||||
void drawScreen(int x, int y, QPixmap pixmap);
|
||||
|
||||
/// Draw a pixmap onto the backing pixmap.
|
||||
/**
|
||||
QPixmap is implicitely shared so no need to pass by reference.
|
||||
*/
|
||||
void drawScreen(int x, int y, QPixmap pixmap);
|
||||
|
||||
protected:
|
||||
|
||||
/// repaint part of the widget
|
||||
@ -171,16 +171,16 @@ protected:
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
|
||||
/// Timeout event Slot for keyboard bufferring.
|
||||
|
||||
/// Timeout event Slot for keyboard bufferring.
|
||||
/// \todo This is not used currently in the code, remove?
|
||||
void keyeventTimeout();
|
||||
|
||||
/// Adjust the LyX buffer view with the position of the scrollbar.
|
||||
/**
|
||||
* The action argument is not used in the the code, it is there
|
||||
* only for the connection to the vertical srollbar signal which
|
||||
* emits an 'int' action.
|
||||
void keyeventTimeout();
|
||||
|
||||
/// Adjust the LyX buffer view with the position of the scrollbar.
|
||||
/**
|
||||
* The action argument is not used in the the code, it is there
|
||||
* only for the connection to the vertical srollbar signal which
|
||||
* emits an 'int' action.
|
||||
*/
|
||||
void adjustViewWithScrollBar(int action = 0);
|
||||
|
||||
@ -188,8 +188,8 @@ private:
|
||||
|
||||
/// Buffer view width.
|
||||
int workWidth_;
|
||||
|
||||
/// Buffer view height.
|
||||
|
||||
/// Buffer view height.
|
||||
int workHeight_;
|
||||
|
||||
/// Our painter.
|
||||
@ -198,19 +198,19 @@ private:
|
||||
/// The slot connected to SyntheticMouseEvent::timeout.
|
||||
void generateSyntheticMouseEvent();
|
||||
|
||||
///
|
||||
///
|
||||
SyntheticMouseEvent synthetic_mouse_event_;
|
||||
|
||||
/// Our client side painting device.
|
||||
QImage paint_device_;
|
||||
|
||||
/// Our server side painting device.
|
||||
QPixmap screen_device_;
|
||||
|
||||
/// \todo remove
|
||||
/// Our server side painting device.
|
||||
QPixmap screen_device_;
|
||||
|
||||
/// \todo remove
|
||||
QTimer step_timer_;
|
||||
|
||||
/// \todo remove
|
||||
|
||||
/// \todo remove
|
||||
std::queue<boost::shared_ptr<QKeyEvent> > keyeventQueue_;
|
||||
|
||||
double_click dc_event_;
|
||||
|
@ -14,12 +14,12 @@
|
||||
|
||||
#include "LColor.h"
|
||||
|
||||
LColorCache lcolorcache;
|
||||
|
||||
const QColor grey40(0x66, 0x66, 0x66);
|
||||
const QColor grey60(0x99, 0x99, 0x99);
|
||||
const QColor grey80(0xcc, 0xcc, 0xcc);
|
||||
const QColor grey90(0xe5, 0xe5, 0xe5);
|
||||
LColorCache lcolorcache;
|
||||
|
||||
const QColor grey40(0x66, 0x66, 0x66);
|
||||
const QColor grey60(0x99, 0x99, 0x99);
|
||||
const QColor grey80(0xcc, 0xcc, 0xcc);
|
||||
const QColor grey90(0xe5, 0xe5, 0xe5);
|
||||
|
||||
|
||||
LColorCache::LColorCache()
|
||||
|
@ -37,7 +37,7 @@ PanelStack::PanelStack(QWidget * parent)
|
||||
|
||||
list_->setColumnCount(1);
|
||||
list_->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
|
||||
stack_->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
|
||||
stack_->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
|
||||
|
||||
list_->setSortingEnabled(false);
|
||||
// list_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
@ -80,8 +80,8 @@ void PanelStack::addCategory(string const & n, string const & parent)
|
||||
//it->second->addChild(item);
|
||||
}
|
||||
|
||||
panel_map_[n] = item;
|
||||
|
||||
panel_map_[n] = item;
|
||||
|
||||
list_->setFixedWidth(list_->sizeHint().width());
|
||||
/*
|
||||
item->setFlags(false);
|
||||
|
@ -9,18 +9,18 @@
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <config.h>
|
||||
|
||||
#include "QWorkArea.h"
|
||||
#include "qscreen.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QPainter>
|
||||
#include "QWorkArea.h"
|
||||
#include "qscreen.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
|
||||
#include "debug.h"
|
||||
#include "lcolorcache.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "lcolorcache.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
@ -45,7 +45,7 @@ WorkArea & QScreen::workarea() const
|
||||
|
||||
void QScreen::expose(int x, int y, int w, int h)
|
||||
{
|
||||
lyxerr[Debug::GUI] << "expose " << w << 'x' << h
|
||||
lyxerr[Debug::GUI] << "expose " << w << 'x' << h
|
||||
<< '+' << x << '+' << y << std::endl;
|
||||
|
||||
owner_.update(x, y, w, h);
|
||||
@ -85,14 +85,14 @@ void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape)
|
||||
// 1 the rectangle of the original screen.
|
||||
// 2 the vertical line of the cursor.
|
||||
// 3 the horizontal line of the L-shaped cursor (if necessary).
|
||||
|
||||
|
||||
QColor const & required_color = lcolorcache.get(LColor::cursor);
|
||||
bool const cursor_color_changed = required_color != cursor_color_;
|
||||
if (cursor_color_changed)
|
||||
cursor_color_ = required_color;
|
||||
|
||||
vcursor_ = QPixmap(cursor_w_, cursor_h_);
|
||||
vcursor_ .fill(cursor_color_);
|
||||
cursor_color_ = required_color;
|
||||
|
||||
vcursor_ = QPixmap(cursor_w_, cursor_h_);
|
||||
vcursor_ .fill(cursor_color_);
|
||||
|
||||
switch (shape) {
|
||||
case BAR_SHAPE:
|
||||
@ -102,14 +102,14 @@ void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape)
|
||||
if (cursor_w_ != hcursor_.width() ||
|
||||
cursor_color_changed) {
|
||||
if (cursor_w_ != hcursor_.width())
|
||||
hcursor_ = QPixmap(cursor_w_, 1);
|
||||
hcursor_.fill(cursor_color_);
|
||||
hcursor_ = QPixmap(cursor_w_, 1);
|
||||
hcursor_.fill(cursor_color_);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Save the old area (no cursor).
|
||||
nocursor_ = owner_.copyScreen(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
|
||||
// Save the old area (no cursor).
|
||||
nocursor_ = owner_.copyScreen(cursor_x_, cursor_y_, cursor_w_, cursor_h_);
|
||||
|
||||
// Draw the new (vertical) cursor using the cached store.
|
||||
owner_.drawScreen(cursor_x_, cursor_y_, vcursor_);
|
||||
|
@ -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.
|
||||
*/
|
||||
@ -12,12 +12,12 @@
|
||||
#ifndef QSCREEN_H
|
||||
#define QSCREEN_H
|
||||
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
class QColor;
|
||||
#include "screen.h"
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
class QColor;
|
||||
|
||||
class QWorkArea;
|
||||
class WorkArea;
|
||||
|
Loading…
Reference in New Issue
Block a user