change: auto load when start or connect.
This commit is contained in:
@@ -167,6 +167,7 @@ void Connecter::InitControl()
|
||||
ui->elbClient->setText(name);
|
||||
ui->elbClient->setStyleSheet("color: green;");
|
||||
remoteCall_(name);
|
||||
emit sigConfirmUse();
|
||||
});
|
||||
|
||||
setMaximumWidth(300);
|
||||
|
||||
@@ -34,6 +34,7 @@ signals:
|
||||
void sendConnect(ConnectState cs);
|
||||
void sigDoConnect(const QString& ip, quint16 port);
|
||||
void sigDisConnect();
|
||||
void sigConfirmUse();
|
||||
|
||||
private:
|
||||
void InitControl();
|
||||
|
||||
@@ -42,6 +42,11 @@ void FileManager::SetModeStr(const QString& modeStr, int type, ClientCore* clien
|
||||
|
||||
connect(fileHelper_.get(), &DirFileHelper::sigHome, this, &FileManager::ShowPath);
|
||||
connect(fileHelper_.get(), &DirFileHelper::sigDirFile, this, &FileManager::ShowFile);
|
||||
|
||||
if (type == 0) {
|
||||
evtHome();
|
||||
evtFile();
|
||||
}
|
||||
}
|
||||
|
||||
void FileManager::InitControl()
|
||||
|
||||
@@ -37,7 +37,7 @@ private:
|
||||
void doubleClick(int row, int column);
|
||||
void SetRoot(const QString& path);
|
||||
|
||||
private:
|
||||
public slots:
|
||||
void evtHome();
|
||||
void evtFile();
|
||||
void evtUp();
|
||||
|
||||
@@ -54,6 +54,7 @@ void frelayGUI::InitControl()
|
||||
connect(localFile_, &FileManager::sigSendTasks, this, &frelayGUI::HandleTask);
|
||||
connect(remoteFile_, &FileManager::sigSendTasks, this, &frelayGUI::HandleTask);
|
||||
connect(compare_, &Compare::sigTasks, this, &frelayGUI::HandleTask);
|
||||
connect(connecter_, &Connecter::sigConfirmUse, remoteFile_, &FileManager::evtHome);
|
||||
}
|
||||
|
||||
void frelayGUI::ControlSignal()
|
||||
@@ -110,6 +111,10 @@ void frelayGUI::ControlMsgHander(QtMsgType type, const QMessageLogContext& conte
|
||||
|
||||
void frelayGUI::HandleTask(const QVector<TransTask>& tasks)
|
||||
{
|
||||
if (!clientCore_->IsConnect()) {
|
||||
qCritical() << QString(tr("Not connect to server."));
|
||||
return;
|
||||
}
|
||||
transform_->SetTasks(tasks);
|
||||
transform_->exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user