导航栏按钮
parent
ede78c640b
commit
7493ac4d2e
|
@ -10,12 +10,14 @@
|
|||
#include <ctime>
|
||||
|
||||
#include "globalvariables.h"
|
||||
#include "mainwindowlayout.h"
|
||||
#include "MyButton.h"
|
||||
ApplicationManager::ApplicationManager(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
application_manager = this;
|
||||
ui.setupUi(this);
|
||||
connect(this, &ApplicationManager::clickButton, mainWindowLayout, &MainWindowLayout::clickButton);
|
||||
resize(parent->width(), parent->height());
|
||||
this->parent = parent;
|
||||
layout = new QVBoxLayout(this);
|
||||
|
@ -202,16 +204,17 @@ void ApplicationManager::onclick1(QString op, QString func, QString path, QStrin
|
|||
}
|
||||
}else if(op=="soft")
|
||||
{
|
||||
emit changeUrl(url);
|
||||
ShellExecute(GetDesktopWindow(), L"open", path.toStdWString().c_str(), L"", L"", SW_SHOW);
|
||||
emit clickButton("",op,func,url,path,"");
|
||||
//ShellExecute(GetDesktopWindow(), L"open", path.toStdWString().c_str(), L"", L"", SW_SHOW);
|
||||
}else if(op=="app")
|
||||
{
|
||||
emit changeUrl(url);
|
||||
QString str = QApplication::applicationDirPath() + path;
|
||||
ShellExecute(GetDesktopWindow(), L"open",str.toStdWString().c_str(), L"", L"", SW_SHOW);
|
||||
emit clickButton("", op, func, url, path, "");
|
||||
//QString str = QApplication::applicationDirPath() + path;
|
||||
//ShellExecute(GetDesktopWindow(), L"open",str.toStdWString().c_str(), L"", L"", SW_SHOW);
|
||||
}else if(op=="url")
|
||||
{
|
||||
emit changeUrl(url);
|
||||
//emit clickButton("", op, func, url, path, "");
|
||||
emit clickButton("", op, func, url, path, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,8 +227,9 @@ void ApplicationManager::onclick2(QString orig_name, QString op)
|
|||
emit application_manager_page_all->onclick3(orig_name,application_manager_page_all->rows[orig_name].op, application_manager_page_all->rows[orig_name].func, application_manager_page_all->rows[orig_name].exe_file, application_manager_page_all->rows[orig_name].url);
|
||||
}
|
||||
else {
|
||||
emit changeUrl(application_manager_page_all->rows[orig_name].url);
|
||||
WinExec((QApplication::applicationDirPath()+application_manager_page_all->rows[orig_name].exe_file).toStdString().c_str(), SW_SHOW);
|
||||
//emit changeUrl(application_manager_page_all->rows[orig_name].url);
|
||||
//WinExec((QApplication::applicationDirPath()+application_manager_page_all->rows[orig_name].exe_file).toStdString().c_str(), SW_SHOW);
|
||||
emit clickButton("", op, application_manager_page_all->rows[orig_name].func, application_manager_page_all->rows[orig_name].url, application_manager_page_all->rows[orig_name].exe_file, "");
|
||||
}
|
||||
}
|
||||
else if (op == "settings")
|
||||
|
|
|
@ -53,7 +53,7 @@ class ApplicationManager : public QWidget
|
|||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void changeUrl(QString url);
|
||||
void clickButton(QString orig_name, QString op, QString func, QString url, QString path, QString initial_position);
|
||||
void refresh();
|
||||
void refresh_tab();
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue