Skip to content

Commit

Permalink
changed file hierarchy #22
Browse files Browse the repository at this point in the history
    This change making pince more compatible with creating setup.py
    files. So we can create distribution package much more easily.

    - added pince directory and gather all program files in it.
    - refactor customlabel imported ui files with `from pince.*`
      prefix
    - regenarated all ui files
  • Loading branch information
cagriulas committed Feb 22, 2017
1 parent a140805 commit 297c312
Show file tree
Hide file tree
Showing 75 changed files with 120 additions and 118 deletions.
12 changes: 12 additions & 0 deletions bin/pince-gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python3

import sys
from PyQt5.QtWidgets import QApplication

import pince.PINCE as p

if __name__ == "__main__":
app = QApplication(sys.argv)
window = p.MainForm()
window.show()
sys.exit(app.exec_())
7 changes: 4 additions & 3 deletions GUI/AboutWidget.py → pince/GUI/AboutWidget.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'aboutwidget.ui'
# Form implementation generated from reading ui file 'AboutWidget.ui'
#
# Created: Wed Jun 29 16:34:26 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand All @@ -16,6 +15,7 @@ def setupUi(self, TabWidget):
self.tab_Contributors = QtWidgets.QWidget()
self.tab_Contributors.setObjectName("tab_Contributors")
self.gridLayout_2 = QtWidgets.QGridLayout(self.tab_Contributors)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.textBrowser_Contributors = QtWidgets.QTextBrowser(self.tab_Contributors)
self.textBrowser_Contributors.setObjectName("textBrowser_Contributors")
Expand All @@ -24,6 +24,7 @@ def setupUi(self, TabWidget):
self.tab_License = QtWidgets.QWidget()
self.tab_License.setObjectName("tab_License")
self.gridLayout = QtWidgets.QGridLayout(self.tab_License)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.textBrowser_License = QtWidgets.QTextBrowser(self.tab_License)
self.textBrowser_License.setObjectName("textBrowser_License")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'AddAddressManuallyDialog.ui'
#
# Created: Mon Dec 26 20:22:30 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions GUI/BookmarkWidget.py → pince/GUI/BookmarkWidget.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'bookmarkwidget.ui'
# Form implementation generated from reading ui file 'BookmarkWidget.ui'
#
# Created: Sat Jul 9 16:03:34 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'BreakpointInfoWidget.ui'
#
# Created: Fri Dec 2 21:32:09 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand All @@ -16,6 +15,7 @@ def setupUi(self, TabWidget):
self.tab_BreakpointInfo = QtWidgets.QWidget()
self.tab_BreakpointInfo.setObjectName("tab_BreakpointInfo")
self.gridLayout_2 = QtWidgets.QGridLayout(self.tab_BreakpointInfo)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.tableWidget_BreakpointInfo = QtWidgets.QTableWidget(self.tab_BreakpointInfo)
self.tableWidget_BreakpointInfo.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
Expand Down Expand Up @@ -45,6 +45,7 @@ def setupUi(self, TabWidget):
self.tab_RawBreakpointInfo = QtWidgets.QWidget()
self.tab_RawBreakpointInfo.setObjectName("tab_RawBreakpointInfo")
self.gridLayout = QtWidgets.QGridLayout(self.tab_RawBreakpointInfo)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.textBrowser_BreakpointInfo = QtWidgets.QTextBrowser(self.tab_RawBreakpointInfo)
self.textBrowser_BreakpointInfo.setObjectName("textBrowser_BreakpointInfo")
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions GUI/ConsoleWidget.py → pince/GUI/ConsoleWidget.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'consolewidget.ui'
# Form implementation generated from reading ui file 'ConsoleWidget.ui'
#
# Created: Thu Jul 21 18:11:36 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from PyQt5.QtCore import QVariant, Qt
from PyQt5.QtGui import QColor
from GUI.CustomAbstractTableModels.HexModel import QHexModel
from pince.GUI.CustomAbstractTableModels.HexModel import QHexModel

from libPINCE import SysUtils
from pince.libPINCE import SysUtils


class QAsciiModel(QHexModel):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from PyQt5.QtCore import QAbstractTableModel, QVariant, Qt
from PyQt5.QtGui import QColor

from libPINCE import GDB_Engine
from pince.libPINCE import GDB_Engine


class QHexModel(QAbstractTableModel):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from PyQt5.QtWidgets import QLabel, QMessageBox
from PyQt5.QtGui import QCursor
from PyQt5.QtCore import Qt
from libPINCE import GDB_Engine
from PINCE import DialogWithButtonsForm
from pince.libPINCE import GDB_Engine
#from pince.PINCE import DialogWithButtonsForm


class QFlagRegisterLabel(QLabel):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from PyQt5.QtWidgets import QLabel, QMenu
from PyQt5.QtGui import QCursor
from PyQt5.QtCore import Qt
from libPINCE import GDB_Engine
from libPINCE import GuiUtils
from PINCE import DialogWithButtonsForm
from pince.libPINCE import GDB_Engine
from pince.libPINCE import GuiUtils
#from pince.PINCE import DialogWithButtonsForm


class QRegisterLabel(QLabel):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from GUI.CustomTableViews.HexView import QHexView
from pince.GUI.CustomTableViews.HexView import QHexView

class QAsciiView(QHexView):
# data_array is returned from GDB_Engine.hex_dump()
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions GUI/DialogWithButtons.py → pince/GUI/DialogWithButtons.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'DialogWithButtons.ui'
#
# Created: Sat Oct 15 14:22:42 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'floatregisterwidget.ui'
# Form implementation generated from reading ui file 'FloatRegisterWidget.ui'
#
# Created: Tue Jul 19 01:12:53 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand All @@ -16,6 +15,7 @@ def setupUi(self, TabWidget):
self.FPU = QtWidgets.QWidget()
self.FPU.setObjectName("FPU")
self.gridLayout = QtWidgets.QGridLayout(self.FPU)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.tableWidget_FPU = QtWidgets.QTableWidget(self.FPU)
self.tableWidget_FPU.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
Expand All @@ -35,6 +35,7 @@ def setupUi(self, TabWidget):
self.XMM = QtWidgets.QWidget()
self.XMM.setObjectName("XMM")
self.gridLayout_2 = QtWidgets.QGridLayout(self.XMM)
self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
self.gridLayout_2.setObjectName("gridLayout_2")
self.tableWidget_XMM = QtWidgets.QTableWidget(self.XMM)
self.tableWidget_XMM.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'FunctionsInfoWidget.ui'
#
# Created: Fri Dec 9 14:18:45 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions GUI/HexEditDialog.py → pince/GUI/HexEditDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'HexEditDialog.ui'
#
# Created: Fri Dec 9 21:31:02 2016
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'LibPINCEReferenceWidget.ui'
#
# Created: Thu Feb 2 23:39:23 2017
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions GUI/LoadingDialog.py → pince/GUI/LoadingDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'LoadingDialog.ui'
#
# Created: Tue Feb 21 22:38:30 2017
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions GUI/LogFileWidget.py → pince/GUI/LogFileWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'LogFileWidget.ui'
#
# Created: Sat Feb 11 01:51:44 2017
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions GUI/MainWindow.py → pince/GUI/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'MainWindow.ui'
#
# Created: Tue Feb 14 21:25:22 2017
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down Expand Up @@ -141,8 +140,8 @@ def setupUi(self, MainWindow):
self.widget.setSizePolicy(sizePolicy)
self.widget.setObjectName("widget")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget)
self.verticalLayout_2.setSpacing(0)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setSpacing(0)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.radioButton_Bits = QtWidgets.QRadioButton(self.widget)
self.radioButton_Bits.setObjectName("radioButton_Bits")
Expand Down Expand Up @@ -200,8 +199,8 @@ def setupUi(self, MainWindow):
self.widget_2 = QtWidgets.QWidget(self.QWidget_Toolbox)
self.widget_2.setObjectName("widget_2")
self.verticalLayout = QtWidgets.QVBoxLayout(self.widget_2)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setSpacing(0)
self.verticalLayout.setObjectName("verticalLayout")
self.radioButton_RoundedDefault = QtWidgets.QRadioButton(self.widget_2)
self.radioButton_RoundedDefault.setObjectName("radioButton_RoundedDefault")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'MemoryRegionsWidget.ui'
#
# Created: Wed Feb 15 17:56:42 2017
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down
File renamed without changes.
25 changes: 16 additions & 9 deletions GUI/MemoryViewerWindow.py → pince/GUI/MemoryViewerWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

# Form implementation generated from reading ui file 'MemoryViewerWindow.ui'
#
# Created: Wed Feb 15 17:57:59 2017
# by: PyQt5 UI code generator 5.2.1
# Created by: PyQt5 UI code generator 5.8
#
# WARNING! All changes made in this file will be lost!

Expand Down Expand Up @@ -73,9 +72,10 @@ def setupUi(self, MainWindow_MemoryView):
self.scrollArea_Registers.setWidgetResizable(True)
self.scrollArea_Registers.setObjectName("scrollArea_Registers")
self.scrollAreaWidgetContents_Registers = QtWidgets.QWidget()
self.scrollAreaWidgetContents_Registers.setGeometry(QtCore.QRect(0, 0, 358, 455))
self.scrollAreaWidgetContents_Registers.setGeometry(QtCore.QRect(0, 0, 340, 440))
self.scrollAreaWidgetContents_Registers.setObjectName("scrollAreaWidgetContents_Registers")
self.gridLayout_8 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_Registers)
self.gridLayout_8.setContentsMargins(0, 0, 0, 0)
self.gridLayout_8.setObjectName("gridLayout_8")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
Expand All @@ -98,6 +98,7 @@ def setupUi(self, MainWindow_MemoryView):
self.registers_64 = QtWidgets.QWidget()
self.registers_64.setObjectName("registers_64")
self.gridLayout_7 = QtWidgets.QGridLayout(self.registers_64)
self.gridLayout_7.setContentsMargins(0, 0, 0, 0)
self.gridLayout_7.setObjectName("gridLayout_7")
self.verticalLayout_17 = QtWidgets.QVBoxLayout()
self.verticalLayout_17.setObjectName("verticalLayout_17")
Expand Down Expand Up @@ -226,6 +227,7 @@ def setupUi(self, MainWindow_MemoryView):
self.registers_32 = QtWidgets.QWidget()
self.registers_32.setObjectName("registers_32")
self.gridLayout_6 = QtWidgets.QGridLayout(self.registers_32)
self.gridLayout_6.setContentsMargins(0, 0, 0, 0)
self.gridLayout_6.setObjectName("gridLayout_6")
self.verticalLayout_14 = QtWidgets.QVBoxLayout()
self.verticalLayout_14.setObjectName("verticalLayout_14")
Expand Down Expand Up @@ -535,9 +537,10 @@ def setupUi(self, MainWindow_MemoryView):
self.scrollArea_Hex.setWidgetResizable(True)
self.scrollArea_Hex.setObjectName("scrollArea_Hex")
self.scrollAreaWidgetContents_2 = QtWidgets.QWidget()
self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 493, 181))
self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 516, 169))
self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2")
self.gridLayout_11 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_2)
self.gridLayout_11.setContentsMargins(0, 0, 0, 0)
self.gridLayout_11.setObjectName("gridLayout_11")
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
Expand Down Expand Up @@ -582,6 +585,8 @@ def setupUi(self, MainWindow_MemoryView):
self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken)
self.line_6.setObjectName("line_6")
self.gridLayout_11.addWidget(self.line_6, 1, 0, 1, 1)
self.label_HexView_Information.raise_()
self.line_6.raise_()
self.scrollArea_Hex.setWidget(self.scrollAreaWidgetContents_2)
self.gridLayout.addWidget(self.scrollArea_Hex, 0, 0, 1, 1)
self.verticalScrollBar_HexView = QtWidgets.QScrollBar(self.widget_HexView)
Expand All @@ -598,6 +603,7 @@ def setupUi(self, MainWindow_MemoryView):
self.StackTrace = QtWidgets.QWidget()
self.StackTrace.setObjectName("StackTrace")
self.gridLayout_9 = QtWidgets.QGridLayout(self.StackTrace)
self.gridLayout_9.setContentsMargins(0, 0, 0, 0)
self.gridLayout_9.setObjectName("gridLayout_9")
self.tableWidget_StackTrace = QtWidgets.QTableWidget(self.StackTrace)
font = QtGui.QFont()
Expand All @@ -622,6 +628,7 @@ def setupUi(self, MainWindow_MemoryView):
self.Stack = QtWidgets.QWidget()
self.Stack.setObjectName("Stack")
self.gridLayout_10 = QtWidgets.QGridLayout(self.Stack)
self.gridLayout_10.setContentsMargins(0, 0, 0, 0)
self.gridLayout_10.setObjectName("gridLayout_10")
self.tableWidget_Stack = QtWidgets.QTableWidget(self.Stack)
font = QtGui.QFont()
Expand Down Expand Up @@ -650,7 +657,7 @@ def setupUi(self, MainWindow_MemoryView):
self.gridLayout_5.addWidget(self.splitter_MainMiddle, 0, 0, 1, 1)
MainWindow_MemoryView.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow_MemoryView)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 22))
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 24))
self.menubar.setObjectName("menubar")
self.menuView = QtWidgets.QMenu(self.menubar)
self.menuView.setObjectName("menuView")
Expand Down Expand Up @@ -835,7 +842,7 @@ def retranslateUi(self, MainWindow_MemoryView):
self.actionSearch_Opcode.setText(_translate("MainWindow_MemoryView", "Search Opcode"))
self.actionMemory_Regions.setText(_translate("MainWindow_MemoryView", "Memory Regions"))

from GUI.CustomTableViews.AsciiView import QAsciiView
from GUI.CustomTableViews.HexView import QHexView
from GUI.CustomLabels.RegisterLabel import QRegisterLabel
from GUI.CustomLabels.FlagRegisterLabel import QFlagRegisterLabel
from pince.GUI.CustomLabels.FlagRegisterLabel import QFlagRegisterLabel
from pince.GUI.CustomLabels.RegisterLabel import QRegisterLabel
from pince.GUI.CustomTableViews.AsciiView import QAsciiView
from pince.GUI.CustomTableViews.HexView import QHexView
Loading

0 comments on commit 297c312

Please sign in to comment.