OSDN Git Service

fix
authorsuma <devnull@localhost>
Thu, 18 Dec 2008 04:31:33 +0000 (13:31 +0900)
committersuma <devnull@localhost>
Thu, 18 Dec 2008 04:31:33 +0000 (13:31 +0900)
src/control/standard/hexview.cpp
src/control/standard/hexview.h
src/control/view.h

index 23f5fdb..af87ef5 100644 (file)
@@ -383,7 +383,7 @@ void HexView::mouseMoveEvent(QMouseEvent *ev)
                cur_->SelEnd = moveByMouse(ev->pos().x(), ev->pos().y());
                cur_->refreshSelected();
 
-               drawSelected();
+               drawSelected(false);
 
                if (config_.EnableCaret && cur_->SelEnd != cur_->SelEndO) {
                        drawCaret(false, cur_->SelEndO);
@@ -406,7 +406,7 @@ void HexView::mouseReleaseEvent(QMouseEvent *ev)
                cur_->Toggle = false;
                qDebug("mouse release - begin:%lld end:%lld", cur_->SelBegin, cur_->SelEnd);
 
-               drawSelected();
+               drawSelected(false);
 
                if (config_.EnableCaret && cur_->SelEnd != cur_->SelEndO) {
                        redrawCaret();
index 8c14aa8..5150378 100644 (file)
@@ -26,7 +26,7 @@ namespace Standard {
                bool EnableCaret;
                int CaretBlinkTime;
 
-       private:
+       protected:
                QFontMetrics FontMetrics;
                int top_;
                int x_[Num];    // pos of value
@@ -122,12 +122,12 @@ namespace Standard {
                void isSelected(bool &selected, quint64 &sb, quint64 &se, quint64 top, int yCount, uint size);
                void drawSelected(bool reset = false);
                void drawCaret(bool visible, quint64 pos, int ytop, int ymax);
-               void redrawCaret();
 
                void byteToHex(uchar c, QString &h);
                quint64 moveByMouse(int x, int y);
 
        public slots:
+               void redrawCaret();
                void drawCaret(bool visible);
                void drawCaret(bool visible, quint64 pos);
 
index c9dee5a..b015a54 100644 (file)
@@ -40,6 +40,11 @@ struct DrawColorInfo {
 
 typedef std::vector<DrawColorInfo> DCIList;
 
+// TODO: add caret support
+//       caret width, height, x, y
+//       caret color(QColor with Alpha)
+//       redraw support
+
 class View : public QWidget
 {
        Q_OBJECT