增加删除和新建槽

This commit is contained in:
work-zym\zhangyiming 2024-12-03 17:00:01 +08:00
parent e8406eb972
commit 8d3c88df70
3 changed files with 27 additions and 3 deletions

Binary file not shown.

View File

@ -220,6 +220,20 @@ bool LeadScheme::initconnect()
qDebug()<<"connect failed"<<endl; qDebug()<<"connect failed"<<endl;
return bCon; return bCon;
}
bCon = connect(&m_btnNew,SIGNAL(clicked(bool)),this,SLOT(slotNew()));
if(!bCon)
{
qDebug()<<"connect failed"<<endl;
return bCon;
}
bCon = connect(&m_btndelete,SIGNAL(clicked(bool)),this,SLOT(slotDelete()));
if(!bCon)
{
qDebug()<<"connect failed"<<endl;
return bCon;
} }
return bCon; return bCon;
} }
@ -499,8 +513,7 @@ void LeadScheme::initLay()
//vlayAll->addLayout(hbtn); //vlayAll->addLayout(hbtn);
setLayout(vlayAll); setLayout(vlayAll);
} }
#include "operatorjson.h"
#include <QApplication>
void LeadScheme::slotSave() void LeadScheme::slotSave()
{ {
QJsonObject jsonSave; QJsonObject jsonSave;
@ -521,3 +534,11 @@ void LeadScheme::initLay()
json.savaJson(jsonSave,QApplication::applicationDirPath()+"/0.json"); json.savaJson(jsonSave,QApplication::applicationDirPath()+"/0.json");
} }
void LeadScheme::slotNew()
{
}
void LeadScheme::slotDelete()
{
}

View File

@ -4,11 +4,12 @@
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QPushButton>
#include "navlistwidget.h" #include "navlistwidget.h"
#include "MoveButton.h" #include "MoveButton.h"
#include <QList> #include <QList>
#include <QLineEdit> #include <QLineEdit>
#include "operatorjson.h"
#include <QApplication>
class LeadScheme:public QWidget class LeadScheme:public QWidget
{ {
Q_OBJECT Q_OBJECT
@ -22,6 +23,8 @@ public:
private slots: private slots:
void slotSave(); void slotSave();
void slotNew();
void slotDelete();
private: private:
NavListWidget m_LeadSchemes; NavListWidget m_LeadSchemes;
NavListWidget m_listNum; NavListWidget m_listNum;