OSDN Git Service

rename refreshPixmap to drawView
authorsuma <devnull@localhost>
Tue, 10 Feb 2009 17:07:44 +0000 (02:07 +0900)
committersuma <devnull@localhost>
Tue, 10 Feb 2009 17:07:44 +0000 (02:07 +0900)
src/control/standard/addressview.cpp
src/control/standard/addressview.h
src/control/standard/hexview.cpp
src/control/standard/hexview.h
src/control/view.h

index e2a434b..4b58fc4 100644 (file)
@@ -11,7 +11,7 @@ AddressView::AddressView(QWidget *parent, Document *doc, Cursor *cur)
 {
 }
 
-void AddressView::refreshPixmap()
+void AddressView::drawView()
 {
        pix_.fill(QColor(0,255,0));
 
index e4aca00..566428c 100644 (file)
@@ -16,7 +16,7 @@ namespace Standard {
                AddressView(QWidget *parent = NULL, Document *doc = NULL, Cursor *cur = NULL);
 
        protected:
-               void refreshPixmap();
+               void drawView();
 
        protected:
                Cursor *cursor;
index 5c1e0c1..1462c99 100644 (file)
@@ -105,15 +105,15 @@ void HexView::resizeEvent(QResizeEvent *rs)
        QResizeEvent resize(size, rs->oldSize());
        View::resizeEvent(&resize);
        pix_.fill(config.Colors[Color::Background]);
-       refreshPixmap();
+       drawView();
 }
 
-void HexView::refreshPixmap()
+void HexView::drawView()
 {
-       refreshPixmap(DRAW_ALL);
+       drawView(DRAW_ALL);
 }
 
-void HexView::refreshPixmap(int type, int line_start, int end)
+void HexView::drawView(int type, int line_start, int end)
 {
        qDebug("refresh event type:%d line:%d end:%d", type, line_start, end);
        qDebug(" end:%llu endOld:%llu pos:%llu", cursor->SelEnd, cursor->SelEndOld, cursor->Position);
@@ -425,7 +425,7 @@ void HexView::drawCaret(bool visible, quint64 pos)
                // Redraw(draw unvisible)
                quint64 line = cursor->Position / HexConfig::Num;
                if (cursor->Top <= line && line - cursor->Top < config.drawableLines(height())) {
-                       refreshPixmap(DRAW_LINE, line - cursor->Top);
+                       drawView(DRAW_LINE, line - cursor->Top);
                }
        }
 
@@ -467,7 +467,7 @@ void HexView::mousePressEvent(QMouseEvent *ev)
                if (config.EnableCaret && cursor->SelEnd != cursor->SelEndOld) {
                        const int pos = (cursor->SelEndOld / HexConfig::Num) - cursor->Top;
                        if (pos <= config.drawableLines(height())) {
-                               refreshPixmap(DRAW_RANGE, pos, pos + 1);
+                               drawView(DRAW_RANGE, pos, pos + 1);
                        }
                }
 
@@ -571,7 +571,7 @@ void HexView::drawSelected(bool reset)
                cursor->Selected = false;
 
                // Redraw lines
-               refreshPixmap(DRAW_RANGE, begin_line, end_line);
+               drawView(DRAW_RANGE, begin_line, end_line);
        } else if (cursor->selMoved()) {
                // Selected range is changing
                if ((cursor->SelBegin < cursor->SelEndOld && cursor->SelBegin >= cursor->SelEnd ||
@@ -589,7 +589,7 @@ void HexView::drawSelected(bool reset)
                const int begin_line = begin / HexConfig::Num - cursor->Top;
                const int end_line   = end   / HexConfig::Num - cursor->Top + 1;
                // Redraw lines
-               refreshPixmap(DRAW_RANGE, begin_line, end_line);
+               drawView(DRAW_RANGE, begin_line, end_line);
        }
 }
 
@@ -662,7 +662,7 @@ void HexView::keyPressEvent(QKeyEvent *ev)
 
        // FIXME: refactoring refresh event
        if (cursor->SelEnd != old || cursor->Top != oldT) {
-               refreshPixmap();
+               drawView();
                drawCaret();
        }
 
index 4d649da..a7b1d50 100644 (file)
@@ -120,8 +120,8 @@ namespace Standard {
 
        protected:
 
-               void refreshPixmap();
-               void refreshPixmap(int type, int = 0, int = 0);
+               void drawView();
+               void drawView(int type, int = 0, int = 0);
                void drawLines(QPainter &painter, DCIList &dcolors, int y, int x_begin = 0, int x_end = HexConfig::Num);        // x: [)
                void drawText(QPainter &painter, const QString &hex, int x, int y);
 
index 449699e..25e8b9c 100644 (file)
@@ -71,7 +71,7 @@ protected:
        void getDrawColors(const DrawInfo &di, DCIList &ci);
 
 protected:
-       virtual void refreshPixmap() = 0;
+       virtual void drawView() = 0;
 
 };