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