dev commit

pull/2/head
wh201906 5 years ago
parent 164656a7bc
commit d651d2788d

@ -14,6 +14,36 @@ MainWindow::MainWindow(QWidget *parent)
{
ui->portBox->addItem(port);
}
dataModel=new QStandardItemModel;
dataModel->setColumnCount(3);
dataModel->setRowCount(64);
dataModel->setHorizontalHeaderItem(0,new QStandardItem("Sector"));
dataModel->setHorizontalHeaderItem(1,new QStandardItem("Block"));
dataModel->setHorizontalHeaderItem(2,new QStandardItem("Data"));
for(int i=0;i<64;i++)
dataModel->setItem(i,1,new QStandardItem(QString::number(i)));
for(int i=0;i<16;i++)
dataModel->setItem(i*4,0,new QStandardItem(QString::number(i)));
ui->dataView->setModel(dataModel);
ui->dataView->verticalHeader()->setVisible(false);
ui->dataView->setColumnWidth(0,50);
ui->dataView->setColumnWidth(1,40);
ui->dataView->setColumnWidth(2,400);
keyModel=new QStandardItemModel;
keyModel->setColumnCount(3);
keyModel->setRowCount(16);
keyModel->setHorizontalHeaderItem(0,new QStandardItem("Sector"));
keyModel->setHorizontalHeaderItem(1,new QStandardItem("KeyA"));
keyModel->setHorizontalHeaderItem(2,new QStandardItem("KeyB"));
for(int i=0;i<16;i++)
keyModel->setItem(i,0,new QStandardItem(QString::number(i)));
ui->keyView->setModel(keyModel);
ui->keyView->verticalHeader()->setVisible(false);
ui->keyView->setColumnWidth(0,50);
ui->keyView->setColumnWidth(1,200);
ui->keyView->setColumnWidth(2,200);
}
MainWindow::~MainWindow()

@ -5,6 +5,7 @@
#include <QProcess>
#include <QDebug>
#include <QMessageBox>
#include <QStandardItemModel>
#include "pm3process.h"
QT_BEGIN_NAMESPACE
@ -34,5 +35,7 @@ private slots:
private:
Ui::MainWindow *ui;
PM3Process* pm3;
QStandardItemModel* dataModel;
QStandardItemModel* keyModel;
};
#endif // MAINWINDOW_H

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<height>310</height>
<width>1038</width>
<height>758</height>
</rect>
</property>
<property name="minimumSize">
@ -74,12 +74,50 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="mifareTab">
<attribute name="title">
<string>Tab 1</string>
<string>Mifare</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QTableView" name="dataView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="verticalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>20</number>
</attribute>
</widget>
</item>
<item>
<widget class="QTableView" name="keyView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="verticalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>20</number>
</attribute>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="rawTab">
<attribute name="title">
@ -134,7 +172,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<width>1038</width>
<height>22</height>
</rect>
</property>

Loading…
Cancel
Save