Class: Ui_Uart_console

Inherits:
Object
  • Object
show all
Defined in:
lib/gui/gui_uart_console.rb

Overview

** Form generated from reading ui file ‘gui_uart_console.ui’ ** ** Created: mer. mai 25 09:55:50 2016 ** by: Qt User Interface Compiler version 4.8.6 ** ** WARNING! All changes made in this file will be lost when recompiling ui file!

Direct Known Subclasses

Ui::Uart_console

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionSendObject (readonly)

Returns the value of attribute actionSend.



11
12
13
# File 'lib/gui/gui_uart_console.rb', line 11

def actionSend
  @actionSend
end

#btn_clearObject (readonly)

Returns the value of attribute btn_clear.



21
22
23
# File 'lib/gui/gui_uart_console.rb', line 21

def btn_clear
  @btn_clear
end

#btn_connectObject (readonly)

Returns the value of attribute btn_connect.



17
18
19
# File 'lib/gui/gui_uart_console.rb', line 17

def btn_connect
  @btn_connect
end

#btn_disconnectObject (readonly)

Returns the value of attribute btn_disconnect.



18
19
20
# File 'lib/gui/gui_uart_console.rb', line 18

def btn_disconnect
  @btn_disconnect
end

#btn_sendObject (readonly)

Returns the value of attribute btn_send.



25
26
27
# File 'lib/gui/gui_uart_console.rb', line 25

def btn_send
  @btn_send
end

#consoleObject (readonly)

Returns the value of attribute console.



22
23
24
# File 'lib/gui/gui_uart_console.rb', line 22

def console
  @console
end

#gridLayoutObject (readonly)

Returns the value of attribute gridLayout.



12
13
14
# File 'lib/gui/gui_uart_console.rb', line 12

def gridLayout
  @gridLayout
end

#horizontalLayoutObject (readonly)

Returns the value of attribute horizontalLayout.



23
24
25
# File 'lib/gui/gui_uart_console.rb', line 23

def horizontalLayout
  @horizontalLayout
end

#horizontalLayout_2Object (readonly)

Returns the value of attribute horizontalLayout_2.



14
15
16
# File 'lib/gui/gui_uart_console.rb', line 14

def horizontalLayout_2
  @horizontalLayout_2
end

#horizontalSpacerObject (readonly)

Returns the value of attribute horizontalSpacer.



20
21
22
# File 'lib/gui/gui_uart_console.rb', line 20

def horizontalSpacer
  @horizontalSpacer
end

#labelObject (readonly)

Returns the value of attribute label.



16
17
18
# File 'lib/gui/gui_uart_console.rb', line 16

def label
  @label
end

#lbl_chipObject (readonly)

Returns the value of attribute lbl_chip.



15
16
17
# File 'lib/gui/gui_uart_console.rb', line 15

def lbl_chip
  @lbl_chip
end

#lie_cmdObject (readonly)

Returns the value of attribute lie_cmd.



24
25
26
# File 'lib/gui/gui_uart_console.rb', line 24

def lie_cmd
  @lie_cmd
end

#pushButtonObject (readonly)

Returns the value of attribute pushButton.



19
20
21
# File 'lib/gui/gui_uart_console.rb', line 19

def pushButton
  @pushButton
end

#verticalLayoutObject (readonly)

Returns the value of attribute verticalLayout.



13
14
15
# File 'lib/gui/gui_uart_console.rb', line 13

def verticalLayout
  @verticalLayout
end

Instance Method Details

#retranslate_ui(uart_console) ⇒ Object

retranslateUi



154
155
156
# File 'lib/gui/gui_uart_console.rb', line 154

def retranslate_ui(uart_console)
    retranslateUi(uart_console)
end

#retranslateUi(uart_console) ⇒ Object



141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/gui/gui_uart_console.rb', line 141

def retranslateUi(uart_console)
uart_console.windowTitle = Qt::Application.translate("Uart_console", "Hardsploit - UART console", nil, Qt::Application::UnicodeUTF8)
@actionSend.text = Qt::Application.translate("Uart_console", "Send", nil, Qt::Application::UnicodeUTF8)
@actionSend.shortcut = Qt::Application.translate("Uart_console", "Return", nil, Qt::Application::UnicodeUTF8)
@lbl_chip.text = Qt::Application.translate("Uart_console", "[CHIP]", nil, Qt::Application::UnicodeUTF8)
@label.text = Qt::Application.translate("Uart_console", "UART console", nil, Qt::Application::UnicodeUTF8)
@btn_connect.text = Qt::Application.translate("Uart_console", "Connect", nil, Qt::Application::UnicodeUTF8)
@btn_disconnect.text = Qt::Application.translate("Uart_console", "Disconnect", nil, Qt::Application::UnicodeUTF8)
@pushButton.text = Qt::Application.translate("Uart_console", "Settings", nil, Qt::Application::UnicodeUTF8)
@btn_clear.text = Qt::Application.translate("Uart_console", "Clear", nil, Qt::Application::UnicodeUTF8)
@btn_send.text = Qt::Application.translate("Uart_console", "Send", nil, Qt::Application::UnicodeUTF8)
end

#setup_ui(uart_console) ⇒ Object

setupUi



137
138
139
# File 'lib/gui/gui_uart_console.rb', line 137

def setup_ui(uart_console)
    setupUi(uart_console)
end

#setupUi(uart_console) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/gui/gui_uart_console.rb', line 27

def setupUi(uart_console)
if uart_console.objectName.nil?
    uart_console.objectName = "uart_console"
end
uart_console.windowModality = Qt::WindowModal
uart_console.resize(710, 587)
@actionSend = Qt::Action.new(uart_console)
@actionSend.objectName = "actionSend"
@gridLayout = Qt::GridLayout.new(uart_console)
@gridLayout.objectName = "gridLayout"
@verticalLayout = Qt::VBoxLayout.new()
@verticalLayout.objectName = "verticalLayout"
@horizontalLayout_2 = Qt::HBoxLayout.new()
@horizontalLayout_2.objectName = "horizontalLayout_2"
@lbl_chip = Qt::Label.new(uart_console)
@lbl_chip.objectName = "lbl_chip"

@horizontalLayout_2.addWidget(@lbl_chip)

@label = Qt::Label.new(uart_console)
@label.objectName = "label"

@horizontalLayout_2.addWidget(@label)

@btn_connect = Qt::PushButton.new(uart_console)
@btn_connect.objectName = "btn_connect"

@horizontalLayout_2.addWidget(@btn_connect)

@btn_disconnect = Qt::PushButton.new(uart_console)
@btn_disconnect.objectName = "btn_disconnect"
@btn_disconnect.enabled = false

@horizontalLayout_2.addWidget(@btn_disconnect)

@pushButton = Qt::PushButton.new(uart_console)
@pushButton.objectName = "pushButton"

@horizontalLayout_2.addWidget(@pushButton)

@horizontalSpacer = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)

@horizontalLayout_2.addItem(@horizontalSpacer)

@btn_clear = Qt::PushButton.new(uart_console)
@btn_clear.objectName = "btn_clear"

@horizontalLayout_2.addWidget(@btn_clear)


@verticalLayout.addLayout(@horizontalLayout_2)

@console = Qt::TextEdit.new(uart_console)
@console.objectName = "console"
@palette = Qt::Palette.new
brush = Qt::Brush.new(Qt::Color.new(170, 255, 0, 255))
brush.style = Qt::SolidPattern
@palette.setBrush(Qt::Palette::Active, Qt::Palette::Text, brush)
brush1 = Qt::Brush.new(Qt::Color.new(0, 0, 0, 255))
brush1.style = Qt::SolidPattern
@palette.setBrush(Qt::Palette::Active, Qt::Palette::Base, brush1)
@palette.setBrush(Qt::Palette::Inactive, Qt::Palette::Text, brush)
@palette.setBrush(Qt::Palette::Inactive, Qt::Palette::Base, brush1)
brush2 = Qt::Brush.new(Qt::Color.new(120, 120, 120, 255))
brush2.style = Qt::SolidPattern
@palette.setBrush(Qt::Palette::Disabled, Qt::Palette::Text, brush2)
brush3 = Qt::Brush.new(Qt::Color.new(240, 240, 240, 255))
brush3.style = Qt::SolidPattern
@palette.setBrush(Qt::Palette::Disabled, Qt::Palette::Base, brush3)
@console.palette = @palette
@font = Qt::Font.new
@font.family = "Small Fonts"
@font.bold = false
@font.weight = 50
@console.font = @font
@console.frameShape = Qt::Frame::StyledPanel
@console.frameShadow = Qt::Frame::Sunken
@console.readOnly = true

@verticalLayout.addWidget(@console)

@horizontalLayout = Qt::HBoxLayout.new()
@horizontalLayout.objectName = "horizontalLayout"
@lie_cmd = Qt::LineEdit.new(uart_console)
@lie_cmd.objectName = "lie_cmd"

@horizontalLayout.addWidget(@lie_cmd)

@btn_send = Qt::PushButton.new(uart_console)
@btn_send.objectName = "btn_send"

@horizontalLayout.addWidget(@btn_send)


@verticalLayout.addLayout(@horizontalLayout)


@gridLayout.addLayout(@verticalLayout, 0, 0, 1, 1)


retranslateUi(uart_console)
Qt::Object.connect(@btn_send, SIGNAL('clicked()'), uart_console, SLOT('send()'))
Qt::Object.connect(@btn_connect, SIGNAL('clicked()'), uart_console, SLOT('connect()'))
Qt::Object.connect(@btn_disconnect, SIGNAL('clicked()'), uart_console, SLOT('disconnect()'))
Qt::Object.connect(@btn_clear, SIGNAL('clicked()'), uart_console, SLOT('clear_console()'))
Qt::Object.connect(@pushButton, SIGNAL('clicked()'), uart_console, SLOT('open_settings()'))

Qt::MetaObject.connectSlotsByName(uart_console)
end