-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhashcount.cpp
executable file
·42 lines (36 loc) · 1.29 KB
/
hashcount.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "hashcount.h"
#include "enumTypes.h"
#include <QStatusBar>
HashCount::HashCount()
{
selectingAction = new SelectingAction(this);
setCentralWidget(selectingAction);
resize(700, 500);
connect(selectingAction, SIGNAL(createHashReady(QFileInfoList, int)), this, SLOT(changeWidget(QFileInfoList, int)));
}
void HashCount::changeWidget(QFileInfoList list, int widgetType)
{
switch(widgetType)
{
case WidgetType::hashView:
hashViewWidget = new HashViewWidget(selectingAction->getAlgorithmType(), list, this);
setCentralWidget(hashViewWidget);
hashViewWidget->addTableItems();
break;
case WidgetType::checkHashFile:
checkFileHashWidget = new CheckFileHashWidget(selectingAction->getAlgorithmType(), list, this);
resize(400, 100);
setCentralWidget(checkFileHashWidget);
break;
case WidgetType::checkHashFiles:
checkFilesHashesWidget = new CheckFilesHashesWidget(selectingAction->getAlgorithmType(), list, this);
setCentralWidget(checkFilesHashesWidget);
break;
default:
break;
}
}
void HashCount::changeStatus(QString message)
{
statusBar()->showMessage(message);
}