mirror of
https://github.com/HavocFramework/Havoc
synced 2026-06-08 11:13:29 +00:00
scrollable and added descriptions to the panel
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QSplitter>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QTableWidget>
|
||||
#include <QTableWidgetItem>
|
||||
#include <QLabel>
|
||||
#include <QScrollArea>
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtWidgets/QApplication>
|
||||
@@ -30,6 +33,16 @@ public:
|
||||
QTableWidgetItem *labelAuthor;
|
||||
QTableWidgetItem *labelDescription;
|
||||
|
||||
QWidget* panelStore;
|
||||
QVBoxLayout* panelLayout;
|
||||
|
||||
QWidget* root_panelStore;
|
||||
QVBoxLayout* root_panelLayout;
|
||||
QScrollArea* panelScroll;
|
||||
|
||||
QLabel* headerLabelTitle;
|
||||
QLabel* panelLabelDescription;
|
||||
|
||||
QGridLayout* gridLayout;
|
||||
QTextEdit* StoreLogger;
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ void HavocNamespace::UserInterface::HavocUi::retranslateUi(QMainWindow* Havoc )
|
||||
actionDisconnect->setText( "Disconnect" );
|
||||
actionExit->setText( "Exit" );
|
||||
actionTeamserver->setText( "Teamserver" );
|
||||
actionStore->setText( "Store" );
|
||||
actionStore->setText( "Extentions" );
|
||||
actionGeneratePayload->setText( "Payload" );
|
||||
actionLoad_Script->setText( "Scripts Manager" );
|
||||
actionPythonConsole->setText( "Script Console" );
|
||||
@@ -472,7 +472,7 @@ void HavocNamespace::UserInterface::HavocUi::ConnectEvents()
|
||||
|
||||
NewBottomTab(
|
||||
HavocX::Teamserver.TabSession->Store->StoreWidget,
|
||||
"Store"
|
||||
"Extentions"
|
||||
);
|
||||
} );
|
||||
|
||||
|
||||
@@ -7,17 +7,34 @@ void Store::setupUi( QWidget* Store)
|
||||
StoreWidget = Store;
|
||||
|
||||
if ( Store->objectName().isEmpty() )
|
||||
Store->setObjectName( QString::fromUtf8( "Store" ) );
|
||||
Store->setObjectName( QString::fromUtf8( "Extentions" ) );
|
||||
|
||||
horizontalLayout = new QHBoxLayout( Store );
|
||||
horizontalLayout->setObjectName( QString::fromUtf8( "horizontalLayout" ) );
|
||||
|
||||
StoreSplitter = new QSplitter();
|
||||
|
||||
StoreLogger = new QTextEdit( /* PageLogger */ );
|
||||
StoreLogger->setObjectName( QString::fromUtf8( "StoreLogger" ) );
|
||||
StoreLogger->setReadOnly( true );
|
||||
StoreTable = new QTableWidget();
|
||||
|
||||
panelStore = new QWidget();
|
||||
root_panelStore = new QWidget();
|
||||
panelLayout = new QVBoxLayout(root_panelStore);
|
||||
|
||||
panelScroll = new QScrollArea(panelStore);
|
||||
panelScroll->setWidgetResizable(true);
|
||||
panelScroll->setWidget(root_panelStore);
|
||||
|
||||
root_panelLayout = new QVBoxLayout(panelStore);
|
||||
root_panelLayout->addWidget(panelScroll);
|
||||
|
||||
headerLabelTitle = new QLabel( "<h1>Havoc Extentions!</h1>", panelStore );
|
||||
panelLayout->addWidget(headerLabelTitle);
|
||||
panelLabelDescription = new QLabel( "This tab is to install extentions inside of havoc!", panelStore );
|
||||
panelLayout->addWidget(panelLabelDescription);
|
||||
|
||||
StoreTable = new QTableWidget();
|
||||
StoreTable->setRowCount(3);
|
||||
StoreTable->setColumnCount(3);
|
||||
|
||||
@@ -28,8 +45,6 @@ void Store::setupUi( QWidget* Store)
|
||||
StoreTable->setHorizontalHeaderItem( 1, labelAuthor );
|
||||
StoreTable->setHorizontalHeaderItem( 2, labelDescription );
|
||||
|
||||
|
||||
|
||||
StoreTable->setEnabled( true );
|
||||
StoreTable->setShowGrid( false );
|
||||
StoreTable->setSortingEnabled( false );
|
||||
@@ -40,6 +55,7 @@ void Store::setupUi( QWidget* Store)
|
||||
StoreTable->setContextMenuPolicy( Qt::CustomContextMenu );
|
||||
StoreTable->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeMode::Stretch );
|
||||
StoreTable->horizontalHeader()->setStretchLastSection( true );
|
||||
StoreTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
StoreTable->verticalHeader()->setVisible( false );
|
||||
StoreTable->setFocusPolicy( Qt::NoFocus );
|
||||
|
||||
@@ -54,7 +70,8 @@ void Store::setupUi( QWidget* Store)
|
||||
|
||||
|
||||
StoreSplitter->addWidget( StoreTable );
|
||||
StoreSplitter->addWidget( StoreLogger );
|
||||
StoreSplitter->addWidget( panelStore );
|
||||
|
||||
horizontalLayout->addWidget( StoreSplitter );
|
||||
|
||||
retranslateUi( );
|
||||
@@ -64,5 +81,5 @@ void Store::setupUi( QWidget* Store)
|
||||
|
||||
void Store::retranslateUi()
|
||||
{
|
||||
StoreWidget->setWindowTitle( QCoreApplication::translate( "Store", "Store", nullptr ) );
|
||||
StoreWidget->setWindowTitle( QCoreApplication::translate( "Extentions", "Extentions", nullptr ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user