Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
0057bb4e
Commit
0057bb4e
authored
Feb 19, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP QT Clipboard
parent
03b8c684
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
4 deletions
+75
-4
main.qml
cmd/mist/assets/qml/main.qml
+1
-0
gui.go
cmd/mist/gui.go
+1
-0
util.go
rpc/util.go
+3
-3
capi.hpp
ui/qt/clipboard/capi.hpp
+11
-0
clipboard.cpp
ui/qt/clipboard/clipboard.cpp
+20
-0
clipboard.go
ui/qt/clipboard/clipboard.go
+15
-0
clipboard.hpp
ui/qt/clipboard/clipboard.hpp
+23
-0
types.go
xeth/types.go
+1
-1
No files found.
cmd/mist/assets/qml/main.qml
View file @
0057bb4e
...
...
@@ -246,6 +246,7 @@ ApplicationWindow {
}
}
}
}
property
var
blockModel
:
ListModel
{
...
...
cmd/mist/gui.go
View file @
0057bb4e
...
...
@@ -131,6 +131,7 @@ func (gui *Gui) Start(assetPath string) {
context
.
SetVar
(
"gui"
,
gui
)
context
.
SetVar
(
"eth"
,
gui
.
uiLib
)
context
.
SetVar
(
"shh"
,
gui
.
whisper
)
//clipboard.SetQMLClipboard(context)
win
,
err
:=
gui
.
showWallet
(
context
)
if
err
!=
nil
{
...
...
rpc/util.go
View file @
0057bb4e
...
...
@@ -80,7 +80,7 @@ type RpcServer interface {
type
Log
struct
{
Address
string
`json:"address"`
Topic
s
[]
string
`json:"topics"`
Topic
[]
string
`json:"topics"`
Data
string
`json:"data"`
}
...
...
@@ -89,11 +89,11 @@ func toLogs(logs state.Logs) (ls []Log) {
for
i
,
log
:=
range
logs
{
var
l
Log
l
.
Topic
s
=
make
([]
string
,
len
(
log
.
Topics
()))
l
.
Topic
=
make
([]
string
,
len
(
log
.
Topics
()))
l
.
Address
=
toHex
(
log
.
Address
())
l
.
Data
=
toHex
(
log
.
Data
())
for
j
,
topic
:=
range
log
.
Topics
()
{
l
.
Topic
s
[
j
]
=
toHex
(
topic
)
l
.
Topic
[
j
]
=
toHex
(
topic
)
}
ls
[
i
]
=
l
}
...
...
ui/qt/clipboard/capi.hpp
0 → 100644
View file @
0057bb4e
#pragma once
#include "clipboard.hpp"
typedef
void
Clipboard_
;
Clipboard_
*
initClipboard
()
{
Clipboard
*
clipboard
=
new
(
Clipboard
);
return
static_cast
<
Clipboard_
*>
(
clipboard
);
}
ui/qt/clipboard/clipboard.cpp
0 → 100644
View file @
0057bb4e
#include "clipboard.h"
#include <QClipboard>
Clipboard
::
Clipboard
()
{
connect
(
QApplication
::
clipboard
(),
&
QClipboard
::
dataChanged
,
[
this
]
{
emit
clipboardChanged
();});
}
QString
Clipboard
::
get
()
const
{
QClipboard
*
clipboard
=
QApplication
::
clipboard
();
return
clipboard
->
text
();
}
void
Clipboard
::
toClipboard
(
QString
_text
)
{
QClipboard
*
clipboard
=
QApplicationion
::
clipboard
();
clipboard
->
setText
(
_text
);
}
ui/qt/clipboard/clipboard.go
0 → 100644
View file @
0057bb4e
package
clipboard
// #cgo CPPFLAGS: -I./
// #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing
// #cgo LDFLAGS: -lstdc++
// #cgo pkg-config: Qt5Quick
//
// #include "capi.hpp"
import
"C"
import
"github.com/obscuren/qml"
func
SetQMLClipboard
(
context
*
qml
.
Context
)
{
context
.
SetVar
(
"clipboard"
,
(
unsafe
.
Pointer
)(
C
.
initClipboard
()))
}
ui/qt/clipboard/clipboard.hpp
0 → 100644
View file @
0057bb4e
#pragma once
#ifdef __cplusplus
extern
"C"
{
#endif
class
Clipboard
:
public
QObject
{
Q_OBJECT
Q_PROPERTY
(
QString
get
READ
get
WRITE
toClipboard
NOTIFY
clipboardChanged
)
public
:
Clipboard
();
virtual
~
Clipboard
(){}
Q_INVOKABLE
void
toClipboard
(
QString
_text
);
signals
:
void
clipboardChanged
();
};
#ifdef __cplusplus
}
// extern "C"
#endif
xeth/types.go
View file @
0057bb4e
...
...
@@ -150,7 +150,7 @@ type Transaction struct {
func
NewTx
(
tx
*
types
.
Transaction
)
*
Transaction
{
hash
:=
toHex
(
tx
.
Hash
())
receiver
:=
toHex
(
tx
.
To
())
if
receiver
==
"0000000000000000000000000000000000000000"
{
if
len
(
receiver
)
==
0
{
receiver
=
toHex
(
core
.
AddressFromMessage
(
tx
))
}
sender
:=
toHex
(
tx
.
From
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment