OSDN Git Service

add simple code to View Redrawing event master
authorsuma <suma@users.sourceforge.jp>
Fri, 3 Jul 2009 15:13:13 +0000 (00:13 +0900)
committersuma <suma@users.sourceforge.jp>
Fri, 3 Jul 2009 15:13:13 +0000 (00:13 +0900)
src/control/standard/hexview.cpp
src/control/standard/textview.cpp
src/hex.pro.user

index a1c8200..1a002fd 100644 (file)
@@ -573,6 +573,7 @@ void HexView::keyPressEvent(QKeyEvent *ev)
                        removeData(pos, len);
                        cursor_->moveRelativePosition(pos, false, false);
                        // TODO: drawView [pos. pos+len]
+                       drawView();
                        cursor_->HighNibble = true;
                } else if (0 < cursor_->Position) {
                        removeData(cursor_->Position - 1, 1);
@@ -591,6 +592,7 @@ void HexView::keyPressEvent(QKeyEvent *ev)
                        removeData(pos, len);
                        cursor_->moveRelativePosition(0, false, false);
                        // TODO: drawView [pos. pos+len]
+                       drawView();
                        cursor_->HighNibble = true;
                } else if (cursor_->Position < document_->length()) {
                        removeData(cursor_->Position, 1);
@@ -659,15 +661,17 @@ void HexView::changeData(quint64 pos, uchar character, bool highNibble)
        document_->insert(pos, &character, 1);
        cursor_->HighNibble = !highNibble;
        // TODO: implement Redraw Event
-       drawView(DRAW_LINE, pos / HexConfig::Num - cursor_->Top);
+       //drawView(DRAW_LINE, pos / HexConfig::Num - cursor_->Top);
+       drawView();
 }
 
 void HexView::insertData(quint64 pos, uchar character)
 {
        document_->insert(pos, &character, 1);
        // TODO: implement Redraw Event
-       drawViewAfter(pos);
-       drawCaret();
+       //drawViewAfter(pos);
+       //drawCaret();
+       drawView();
 }
 
 void HexView::removeData(quint64 pos, quint64 len)
@@ -675,6 +679,7 @@ void HexView::removeData(quint64 pos, quint64 len)
        document_->remove(pos, len);
        // TODO: implement Redraw Event
        //drawViewAfter(pos);
+       drawView();
 }
 
 
index 4e8ebb6..4198456 100644 (file)
@@ -570,6 +570,7 @@ void TextView::keyPressEvent(QKeyEvent *ev)
                        removeData(pos, len);
                        cursor_->moveRelativePosition(pos, false, false);
                        // TODO: drawView [pos. pos+len]
+                       drawView();
                        cursor_->HighNibble = true;
                } else if (0 < cursor_->Position) {
                        removeData(cursor_->Position - 1, 1);
@@ -588,6 +589,7 @@ void TextView::keyPressEvent(QKeyEvent *ev)
                        removeData(pos, len);
                        cursor_->moveRelativePosition(0, false, false);
                        // TODO: drawView [pos. pos+len]
+                       drawView();
                        cursor_->HighNibble = true;
                } else if (cursor_->Position < document_->length()) {
                        removeData(cursor_->Position, 1);
@@ -612,15 +614,17 @@ void TextView::changeData(quint64 pos, uchar character, bool highNibble)
        document_->insert(pos, &character, 1);
        cursor_->HighNibble = !highNibble;
        // TODO: implement Redraw Event
-       drawView(DRAW_LINE, pos / TextConfig::Num - cursor_->Top);
+       //drawView(DRAW_LINE, pos / TextConfig::Num - cursor_->Top);
+       drawView();
 }
 
 void TextView::insertData(quint64 pos, uchar character)
 {
        document_->insert(pos, &character, 1);
        // TODO: implement Redraw Event
-       drawViewAfter(pos);
-       drawCaret();
+       //drawViewAfter(pos);
+       //drawCaret();
+       drawView();
 }
 
 void TextView::removeData(quint64 pos, quint64 len)
@@ -628,6 +632,7 @@ void TextView::removeData(quint64 pos, quint64 len)
        document_->remove(pos, len);
        // TODO: implement Redraw Event
        //drawViewAfter(pos);
+       drawView();
 }
 
 
index 9646778..b00d772 100644 (file)
   <value type="bool" >false</value>
  </data>
  <data>
+  <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+  <valuelist type="QVariantList" />
+ </data>
+ <data>
   <variable>RunConfiguration0-UserSetName</variable>
   <value type="bool" >false</value>
  </data>
   <valuemap type="QVariantMap" >
    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
    <valuelist key="abstractProcess.Environment" type="QVariantList" >
-    <value type="QString" >Apple_PubSub_Socket_Render=/tmp/launch-ElLOkL/Render</value>
+    <value type="QString" >Apple_PubSub_Socket_Render=/tmp/launch-YMdbL9/Render</value>
     <value type="QString" >COMMAND_MODE=legacy</value>
-    <value type="QString" >DISPLAY=/tmp/launch-TuHVxq/:0</value>
+    <value type="QString" >DISPLAY=/tmp/launch-6vSqZI/:0</value>
     <value type="QString" >HOME=/Users/suma</value>
     <value type="QString" >LOGNAME=suma</value>
-    <value type="QString" >PATH=/usr/local/Trolltech/Qt-4.5.0/bin:/usr/bin:/bin:/usr/sbin:/sbin</value>
-    <value type="QString" >QTDIR=/usr/local/Trolltech/Qt-4.5.0</value>
-    <value type="QString" >SECURITYSESSIONID=790f10</value>
+    <value type="QString" >PATH=/usr/local/Trolltech/Qt-4.5.2/bin:/usr/bin:/bin:/usr/sbin:/sbin</value>
+    <value type="QString" >QTDIR=/usr/local/Trolltech/Qt-4.5.2</value>
+    <value type="QString" >SECURITYSESSIONID=786390</value>
     <value type="QString" >SHELL=/bin/bash</value>
-    <value type="QString" >SSH_AUTH_SOCK=/tmp/launch-d5Xnoo/Listeners</value>
+    <value type="QString" >SSH_AUTH_SOCK=/tmp/launch-0bosFc/Listeners</value>
     <value type="QString" >TMPDIR=/var/folders/mb/mbgj1cU8E2e7QmnE8aXZDE+++TI/-Tmp-/</value>
     <value type="QString" >USER=suma</value>
     <value type="QString" >__CF_USER_TEXT_ENCODING=0x1F5:1:14</value>
     <value type="QString" >-spec</value>
     <value type="QString" >macx-g++</value>
     <value type="QString" >-r</value>
-    <value type="QString" >CONFIG+=debug_and_release</value>
+    <value type="QString" >CONFIG+=release</value>
    </valuelist>
-   <value key="abstractProcess.command" type="QString" >/usr/local/Trolltech/Qt-4.5.0/bin/qmake</value>
+   <value key="abstractProcess.command" type="QString" >/usr/local/Trolltech/Qt-4.5.2/bin/qmake</value>
    <value key="abstractProcess.enabled" type="bool" >true</value>
    <value key="abstractProcess.workingDirectory" type="QString" >/Users/suma/dev/hex/src/build</value>
+   <value key="buildConfiguration" type="int" >0</value>
   </valuemap>
  </data>
  <data>
   <valuemap type="QVariantMap" >
    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
    <valuelist key="abstractProcess.Environment" type="QVariantList" >
-    <value type="QString" >Apple_PubSub_Socket_Render=/tmp/launch-ElLOkL/Render</value>
+    <value type="QString" >Apple_PubSub_Socket_Render=/tmp/launch-YMdbL9/Render</value>
     <value type="QString" >COMMAND_MODE=legacy</value>
-    <value type="QString" >DISPLAY=/tmp/launch-TuHVxq/:0</value>
+    <value type="QString" >DISPLAY=/tmp/launch-6vSqZI/:0</value>
     <value type="QString" >HOME=/Users/suma</value>
     <value type="QString" >LOGNAME=suma</value>
-    <value type="QString" >PATH=/usr/local/Trolltech/Qt-4.5.0/bin:/usr/bin:/bin:/usr/sbin:/sbin</value>
-    <value type="QString" >QTDIR=/usr/local/Trolltech/Qt-4.5.0</value>
-    <value type="QString" >SECURITYSESSIONID=790f10</value>
+    <value type="QString" >PATH=/usr/local/Trolltech/Qt-4.5.2/bin:/usr/bin:/bin:/usr/sbin:/sbin</value>
+    <value type="QString" >QTDIR=/usr/local/Trolltech/Qt-4.5.2</value>
+    <value type="QString" >SECURITYSESSIONID=786390</value>
     <value type="QString" >SHELL=/bin/bash</value>
-    <value type="QString" >SSH_AUTH_SOCK=/tmp/launch-d5Xnoo/Listeners</value>
+    <value type="QString" >SSH_AUTH_SOCK=/tmp/launch-0bosFc/Listeners</value>
     <value type="QString" >TMPDIR=/var/folders/mb/mbgj1cU8E2e7QmnE8aXZDE+++TI/-Tmp-/</value>
     <value type="QString" >USER=suma</value>
     <value type="QString" >__CF_USER_TEXT_ENCODING=0x1F5:1:14</value>