graphic and blockview support for style colors
git-svn-id: svn://db.shs.com.ru/libs@545 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -38,7 +38,7 @@ void BlockView::_init() {
|
||||
ghost_ = 0;
|
||||
grid_step = 10.;
|
||||
grid_points = 1;
|
||||
grid_pen = QPen(Qt::lightGray, 1, Qt::NoPen);
|
||||
grid_pen = QPen(palette().color(QPalette::Mid), 1, Qt::NoPen);
|
||||
thick = 1;
|
||||
thumb_hide_delay = 500;
|
||||
timer_thumb = 0;
|
||||
@@ -799,11 +799,11 @@ void BlockView::scrollContentsBy(int dx, int dy) {
|
||||
|
||||
|
||||
void BlockView::drawBackground(QPainter * painter, const QRectF & rect) {
|
||||
QGraphicsView::drawBackground(painter, rect);
|
||||
// QGraphicsView::drawBackground(painter, rect);
|
||||
if (mm_thumb) return;
|
||||
float rx, ry, sx = grid_step, sy = grid_step;
|
||||
double scl = qRound(1. / qSqrt(transform().determinant()));
|
||||
painter->eraseRect(rect);
|
||||
painter->fillRect(rect, palette().brush(QPalette::Base));
|
||||
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||
if (scl > 0.) {
|
||||
sx *= scl;
|
||||
|
||||
@@ -102,15 +102,15 @@ Graphic::Graphic(QWidget * parent): QFrame(parent), line_x_min(this), line_x_max
|
||||
curaction = gaMove;
|
||||
selbrush.setStyle(Qt::SolidPattern);
|
||||
selbrush.setColor(QColor(60, 175, 255, 100));
|
||||
text_color = Qt::black;
|
||||
grid_pen = QPen(Qt::gray, 0., Qt::DotLine);
|
||||
text_color = palette().color(QPalette::WindowText);
|
||||
grid_pen = QPen(palette().color(QPalette::Button), 0., Qt::DotLine);
|
||||
//graph_pen = QPen(Qt::red);
|
||||
//graph_pen.setCosmetic(true);
|
||||
graphics.append(GraphicType());
|
||||
curGraphic = 0;
|
||||
selpen = QPen(Qt::black);
|
||||
selpen = palette().color(QPalette::WindowText);
|
||||
selpen.setStyle(Qt::DashLine);
|
||||
back_color = Qt::white;
|
||||
back_color = palette().color(QPalette::Base);
|
||||
buttons_ = AllButtons;
|
||||
setOpenGL(false);
|
||||
setButtonsPosition(Graphic::Left);
|
||||
|
||||
@@ -383,10 +383,10 @@ protected:
|
||||
Graduation grad_x, grad_y;
|
||||
AxisType axis_type_x;
|
||||
double gridx, gridy, history, visible_time, inc_x, mdm, grid_numbers_x, grid_numbers_y, LN2, LN5, LN10;
|
||||
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle, need_mouse_pan;
|
||||
double eminx, eminy, emaxx, emaxy, pause_phase, gesture_angle;
|
||||
int legy, lastw, lasth, min_repaint_int, min_int, max_int, timer_pause, thick;
|
||||
bool aalias, aupdate, mupdate, grid, guides, isFit, isEmpty, isOGL, isHover, bufferActive, cancel, pause_, isPrinting, gestures;
|
||||
bool hasLblX, hasLblY, navigation, only_expand_y, only_expand_x, is_lines_update, leg_update, visible_update, fullscr;
|
||||
bool hasLblX, hasLblY, navigation, only_expand_y, only_expand_x, is_lines_update, leg_update, visible_update, fullscr, need_mouse_pan;
|
||||
|
||||
protected slots:
|
||||
void canvasPaintEvent();
|
||||
|
||||
Reference in New Issue
Block a user