clangformat cleanup
This commit is contained in:
parent
1676b285ae
commit
960c650478
@ -75,18 +75,16 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (vm.count("help") || argc == 1) {
|
||||
std::cout << boost::filesystem::basename(argv[0])
|
||||
<< " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
std::cout << "\n";
|
||||
std::cout << options << "\n";
|
||||
return argc != 1;
|
||||
}
|
||||
|
||||
if (vm.count("version")) {
|
||||
std::cout << boost::filesystem::basename(argv[0])
|
||||
<< " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,8 @@ BaseMainWindow::BaseMainWindow(QWidget *parent) : QMainWindow(parent), ctx(nullp
|
||||
designview->setMinimumWidth(300);
|
||||
designview->setMaximumWidth(300);
|
||||
splitter_h->addWidget(designview);
|
||||
|
||||
connect(this, SIGNAL(contextChanged(Context*)), designview, SLOT(newContext(Context*)));
|
||||
|
||||
connect(this, SIGNAL(contextChanged(Context *)), designview, SLOT(newContext(Context *)));
|
||||
|
||||
connect(designview, SIGNAL(info(std::string)), this, SLOT(writeInfo(std::string)));
|
||||
|
||||
@ -76,7 +76,7 @@ BaseMainWindow::BaseMainWindow(QWidget *parent) : QMainWindow(parent), ctx(nullp
|
||||
#ifndef NO_PYTHON
|
||||
PythonTab *pythontab = new PythonTab();
|
||||
tabWidget->addTab(pythontab, "Python");
|
||||
connect(this, SIGNAL(contextChanged(Context*)), pythontab, SLOT(newContext(Context*)));
|
||||
connect(this, SIGNAL(contextChanged(Context *)), pythontab, SLOT(newContext(Context *)));
|
||||
#endif
|
||||
info = new InfoTab();
|
||||
tabWidget->addTab(info, "Info");
|
||||
@ -85,7 +85,7 @@ BaseMainWindow::BaseMainWindow(QWidget *parent) : QMainWindow(parent), ctx(nullp
|
||||
FPGAViewWidget *fpgaView = new FPGAViewWidget();
|
||||
centralTabWidget->addTab(fpgaView, "Graphics");
|
||||
|
||||
connect(this, SIGNAL(contextChanged(Context*)), fpgaView, SLOT(newContext(Context*)));
|
||||
connect(this, SIGNAL(contextChanged(Context *)), fpgaView, SLOT(newContext(Context *)));
|
||||
|
||||
splitter_v->addWidget(centralTabWidget);
|
||||
splitter_v->addWidget(tabWidget);
|
||||
|
@ -135,8 +135,7 @@ void DesignWidget::newContext(Context *ctx)
|
||||
bel_root->setText(0, QString("Bels"));
|
||||
treeWidget->insertTopLevelItem(0, bel_root);
|
||||
QList<QTreeWidgetItem *> bel_items;
|
||||
if (ctx)
|
||||
{
|
||||
if (ctx) {
|
||||
for (auto bel : ctx->getBels()) {
|
||||
auto name = ctx->getBelName(bel);
|
||||
bel_items.append(new BelTreeItem(name, ElementType::BEL, QString(name.c_str(ctx))));
|
||||
@ -149,8 +148,7 @@ void DesignWidget::newContext(Context *ctx)
|
||||
QList<QTreeWidgetItem *> wire_items;
|
||||
wire_root->setText(0, QString("Wires"));
|
||||
treeWidget->insertTopLevelItem(0, wire_root);
|
||||
if (ctx)
|
||||
{
|
||||
if (ctx) {
|
||||
for (auto wire : ctx->getWires()) {
|
||||
auto name = ctx->getWireName(wire);
|
||||
wire_items.append(new WireTreeItem(name, ElementType::WIRE, QString(name.c_str(ctx))));
|
||||
@ -163,8 +161,7 @@ void DesignWidget::newContext(Context *ctx)
|
||||
QList<QTreeWidgetItem *> pip_items;
|
||||
pip_root->setText(0, QString("Pips"));
|
||||
treeWidget->insertTopLevelItem(0, pip_root);
|
||||
if (ctx)
|
||||
{
|
||||
if (ctx) {
|
||||
for (auto pip : ctx->getPips()) {
|
||||
auto name = ctx->getPipName(pip);
|
||||
pip_items.append(new PipTreeItem(name, ElementType::PIP, QString(name.c_str(ctx))));
|
||||
|
@ -355,8 +355,7 @@ void FPGAViewWidget::paintGL()
|
||||
|
||||
// Draw Bels.
|
||||
auto bels = LineShaderData(0.02f, QColor("#b000ba"));
|
||||
if (ctx_)
|
||||
{
|
||||
if (ctx_) {
|
||||
for (auto bel : ctx_->getBels()) {
|
||||
for (auto &el : ctx_->getBelGraphics(bel))
|
||||
drawElement(bels, el);
|
||||
@ -366,8 +365,7 @@ void FPGAViewWidget::paintGL()
|
||||
|
||||
// Draw Frame Graphics.
|
||||
auto frames = LineShaderData(0.02f, QColor("#0066ba"));
|
||||
if (ctx_)
|
||||
{
|
||||
if (ctx_) {
|
||||
for (auto &el : ctx_->getFrameGraphics()) {
|
||||
drawElement(frames, el);
|
||||
}
|
||||
|
@ -242,6 +242,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
|
||||
void drawElement(LineShaderData &data, const GraphicElement &el);
|
||||
public Q_SLOTS:
|
||||
void newContext(Context *ctx);
|
||||
|
||||
private:
|
||||
QPoint lastPos_;
|
||||
float moveX_;
|
||||
|
@ -58,8 +58,8 @@ MainWindow::MainWindow(QWidget *parent) : BaseMainWindow(parent), timing_driven(
|
||||
connect(task, SIGNAL(taskStarted()), this, SLOT(taskStarted()));
|
||||
connect(task, SIGNAL(taskPaused()), this, SLOT(taskPaused()));
|
||||
|
||||
connect(this, SIGNAL(contextChanged(Context*)), this, SLOT(newContext(Context*)));
|
||||
connect(this, SIGNAL(contextChanged(Context*)), task, SIGNAL(contextChanged(Context*)));
|
||||
connect(this, SIGNAL(contextChanged(Context *)), this, SLOT(newContext(Context *)));
|
||||
connect(this, SIGNAL(contextChanged(Context *)), task, SIGNAL(contextChanged(Context *)));
|
||||
|
||||
createMenu();
|
||||
}
|
||||
@ -184,10 +184,10 @@ void MainWindow::new_proj()
|
||||
ArchArgs chipArgs;
|
||||
chipArgs.type = ArchArgs::HX1K;
|
||||
chipArgs.package = "tq144";
|
||||
if (ctx)
|
||||
if (ctx)
|
||||
delete ctx;
|
||||
ctx = new Context(chipArgs);
|
||||
|
||||
|
||||
Q_EMIT contextChanged(ctx);
|
||||
|
||||
actionLoadJSON->setEnabled(true);
|
||||
@ -352,7 +352,7 @@ void MainWindow::taskStarted()
|
||||
disableActions();
|
||||
actionPause->setEnabled(true);
|
||||
actionStop->setEnabled(true);
|
||||
|
||||
|
||||
actionNew->setEnabled(false);
|
||||
actionOpen->setEnabled(false);
|
||||
}
|
||||
@ -362,7 +362,7 @@ void MainWindow::taskPaused()
|
||||
disableActions();
|
||||
actionPlay->setEnabled(true);
|
||||
actionStop->setEnabled(true);
|
||||
|
||||
|
||||
actionNew->setEnabled(false);
|
||||
actionOpen->setEnabled(false);
|
||||
}
|
||||
|
@ -56,10 +56,7 @@ Worker::Worker(TaskManager *parent) : ctx(nullptr)
|
||||
};
|
||||
}
|
||||
|
||||
void Worker::newContext(Context *ctx_)
|
||||
{
|
||||
ctx = ctx_;
|
||||
}
|
||||
void Worker::newContext(Context *ctx_) { ctx = ctx_; }
|
||||
|
||||
void Worker::loadfile(const std::string &filename)
|
||||
{
|
||||
@ -156,7 +153,6 @@ TaskManager::TaskManager() : toTerminate(false), toPause(false)
|
||||
connect(this, &TaskManager::place, worker, &Worker::place);
|
||||
connect(this, &TaskManager::route, worker, &Worker::route);
|
||||
|
||||
|
||||
connect(this, &TaskManager::contextChanged, worker, &Worker::newContext);
|
||||
|
||||
connect(worker, &Worker::log, this, &TaskManager::info);
|
||||
|
@ -126,18 +126,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (vm.count("help") || argc == 1) {
|
||||
help:
|
||||
std::cout << boost::filesystem::basename(argv[0])
|
||||
<< " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
std::cout << "\n";
|
||||
std::cout << options << "\n";
|
||||
return argc != 1;
|
||||
}
|
||||
|
||||
if (vm.count("version")) {
|
||||
std::cout << boost::filesystem::basename(argv[0])
|
||||
<< " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
std::cout << boost::filesystem::basename(argv[0]) << " -- Next Generation Place and Route (git "
|
||||
"sha1 " GIT_COMMIT_HASH_STR ")\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user