|
|
|
@ -91,23 +91,23 @@ MainWindow::MainWindow()
|
|
|
|
|
Main::_toplevel = this;
|
|
|
|
|
|
|
|
|
|
// status bar
|
|
|
|
|
_actiontqStatus = new TQLabel(statusBar());
|
|
|
|
|
statusBar()->addWidget(_actiontqStatus);
|
|
|
|
|
_actionStatus = new TQLabel(statusBar());
|
|
|
|
|
statusBar()->addWidget(_actionStatus);
|
|
|
|
|
_actionProgress = new TQProgressBar(statusBar());
|
|
|
|
|
statusBar()->addWidget(_actionProgress);
|
|
|
|
|
_debugtqStatus = new TQLabel(statusBar());
|
|
|
|
|
statusBar()->addWidget(_debugtqStatus, 0, true);
|
|
|
|
|
_editortqStatus = new TQLabel(statusBar());
|
|
|
|
|
statusBar()->addWidget(_editortqStatus, 0, true);
|
|
|
|
|
_programmertqStatus = new ProgrammerStatusWidget(statusBar());
|
|
|
|
|
connect(_programmertqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer()));
|
|
|
|
|
connect(_programmertqStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &)));
|
|
|
|
|
statusBar()->addWidget(_programmertqStatus->widget(), 0, true);
|
|
|
|
|
_tooltqStatus = new ToolStatusWidget(statusBar());
|
|
|
|
|
connect(_tooltqStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains()));
|
|
|
|
|
connect(_tooltqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject()));
|
|
|
|
|
connect(_tooltqStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &)));
|
|
|
|
|
statusBar()->addWidget(_tooltqStatus->widget(), 0, true);
|
|
|
|
|
_debugStatus = new TQLabel(statusBar());
|
|
|
|
|
statusBar()->addWidget(_debugStatus, 0, true);
|
|
|
|
|
_editorStatus = new TQLabel(statusBar());
|
|
|
|
|
statusBar()->addWidget(_editorStatus, 0, true);
|
|
|
|
|
_programmerStatus = new ProgrammerStatusWidget(statusBar());
|
|
|
|
|
connect(_programmerStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer()));
|
|
|
|
|
connect(_programmerStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &)));
|
|
|
|
|
statusBar()->addWidget(_programmerStatus->widget(), 0, true);
|
|
|
|
|
_toolStatus = new ToolStatusWidget(statusBar());
|
|
|
|
|
connect(_toolStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains()));
|
|
|
|
|
connect(_toolStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject()));
|
|
|
|
|
connect(_toolStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &)));
|
|
|
|
|
statusBar()->addWidget(_toolStatus->widget(), 0, true);
|
|
|
|
|
|
|
|
|
|
// interface
|
|
|
|
|
_mainDock = createDockWidget("main_dock_widget", TQPixmap());
|
|
|
|
@ -132,7 +132,7 @@ MainWindow::MainWindow()
|
|
|
|
|
_mainDock->setWidget(Main::_editorManager);
|
|
|
|
|
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI()));
|
|
|
|
|
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(modified(const PURL::Url &)), TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(modified(const PURL::Url &)));
|
|
|
|
|
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editortqStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editorStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
|
|
|
|
|
dock = createDock("compile_log_dock_widget", loader.loadIcon("piklab_compile", KIcon::Small),
|
|
|
|
|
i18n("Compile Log"), DockPosition(KDockWidget::DockBottom, 80));
|
|
|
|
@ -160,15 +160,15 @@ MainWindow::MainWindow()
|
|
|
|
|
// managers
|
|
|
|
|
Programmer::manager = new Programmer::GuiManager(TQT_TQOBJECT(this));
|
|
|
|
|
Programmer::manager->setView(_programLog);
|
|
|
|
|
connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actionStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
connect(Programmer::manager, TQT_SIGNAL(showProgress(bool)), TQT_SLOT(showProgress(bool)));
|
|
|
|
|
connect(Programmer::manager, TQT_SIGNAL(setTotalProgress(uint)), TQT_SLOT(setTotalProgress(uint)));
|
|
|
|
|
connect(Programmer::manager, TQT_SIGNAL(setProgress(uint)), TQT_SLOT(setProgress(uint)));
|
|
|
|
|
|
|
|
|
|
Debugger::manager = new Debugger::GuiManager;
|
|
|
|
|
connect(Debugger::manager, TQT_SIGNAL(targetStateChanged()), TQT_SLOT(updateGUI()));
|
|
|
|
|
connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugtqStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actionStatus, TQT_SLOT(setText(const TQString &)));
|
|
|
|
|
|
|
|
|
|
Main::_compileManager = new Compile::Manager(TQT_TQOBJECT(this));
|
|
|
|
|
Main::_compileManager->setView(Main::_compileLog);
|
|
|
|
@ -570,7 +570,7 @@ void MainWindow::updateGUI()
|
|
|
|
|
showProgress(false);
|
|
|
|
|
break;
|
|
|
|
|
case Main::Compiling:
|
|
|
|
|
_actiontqStatus->setText(Main::_compileManager->label());
|
|
|
|
|
_actionStatus->setText(Main::_compileManager->label());
|
|
|
|
|
showProgress(true);
|
|
|
|
|
makeWidgetDockVisible(Main::_compileLog);
|
|
|
|
|
break;
|
|
|
|
@ -618,7 +618,7 @@ void MainWindow::updateGUI()
|
|
|
|
|
Main::action("project_add_current_file")->setEnabled(Main::project() && !inProject && idle && isSource);
|
|
|
|
|
|
|
|
|
|
// update build actions
|
|
|
|
|
static_cast<PopupButton *>(_tooltqStatus->widget())->setText(" " + Main::toolGroup().label() + " ");
|
|
|
|
|
static_cast<PopupButton *>(_toolStatus->widget())->setText(" " + Main::toolGroup().label() + " ");
|
|
|
|
|
bool hexProject = ( Main::_projectManager->projectUrl().fileType()==PURL::Hex );
|
|
|
|
|
bool customTool = Main::toolGroup().isCustom();
|
|
|
|
|
Main::action("build_build_project")->setEnabled((Main::project() || (inProject && !hexProject) ) && idle);
|
|
|
|
@ -630,11 +630,11 @@ void MainWindow::updateGUI()
|
|
|
|
|
|
|
|
|
|
// update programmer status
|
|
|
|
|
PortType ptype = Programmer::GroupConfig::portType(Main::programmerGroup());
|
|
|
|
|
static_cast<PopupButton *>(_programmertqStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " ");
|
|
|
|
|
static_cast<PopupButton *>(_programmerStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " ");
|
|
|
|
|
TQFont f = font();
|
|
|
|
|
bool supported = (Main::deviceData() ? Main::programmerGroup().isSupported(Main::deviceData()->name()) : false);
|
|
|
|
|
f.setItalic(!supported);
|
|
|
|
|
_programmertqStatus->widget()->setFont(f);
|
|
|
|
|
_programmerStatus->widget()->setFont(f);
|
|
|
|
|
bool isProgrammer = ( Main::programmerGroup().properties() & ::Programmer::Programmer );
|
|
|
|
|
PURL::Url purl = Main::_projectManager->projectUrl();
|
|
|
|
|
bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->contains(purl.toFileType(PURL::Hex)) );
|
|
|
|
@ -965,11 +965,11 @@ void MainWindow::showProgress(bool show)
|
|
|
|
|
{
|
|
|
|
|
if (show) {
|
|
|
|
|
PBusyCursor::start();
|
|
|
|
|
_actiontqStatus->show();
|
|
|
|
|
_actionStatus->show();
|
|
|
|
|
_actionProgress->show();
|
|
|
|
|
} else {
|
|
|
|
|
PBusyCursor::stop();
|
|
|
|
|
_actiontqStatus->hide();
|
|
|
|
|
_actionStatus->hide();
|
|
|
|
|
_actionProgress->hide();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|