Programs::Programs(QWidget *parent) : Page(parent), m_fileManager(parent), m_console(parent) { setupUi(this); QObject::connect(ui_fileManagerButton, SIGNAL(clicked()), &m_fileManager, SLOT(raisePage())); QObject::connect(ui_consoleButton, SIGNAL(clicked()), &m_console, SLOT(raisePage())); }
Utilities::Utilities(QWidget *parent) : Page(parent), m_createStatus(parent), m_serialPage(parent), m_wireless(parent) { setupUi(this); //ui_wifiButton->setEnabled(false); ui_terminalButton->setEnabled(false); ui_createButton->setEnabled(false); QObject::connect(ui_createButton, SIGNAL(clicked()), &m_createStatus, SLOT(raisePage())); QObject::connect(ui_serialButton, SIGNAL(clicked()), &m_serialPage, SLOT(raisePage())); QObject::connect(ui_wifiButton, SIGNAL(clicked()), &m_wireless, SLOT(raisePage())); }
bool UserConfig::raisePage(unsigned id) { Q3ListViewItem *item; for (item = lstBox->firstChild(); item; item = item->nextSibling()){ if (raisePage(id, item)) return true; } return false; }
bool UserConfig::raisePage(unsigned id, Q3ListViewItem *item) { unsigned item_id = static_cast<ConfigItem*>(item)->id(); if (item_id && ((item_id == id) || (id == 0))){ lstBox->setCurrentItem(item); return true; } for (item = item->firstChild(); item; item = item->nextSibling()){ if (raisePage(id, item)) return true; } return false; }
void Compiler::compileFile(QString filename) { //qWarning("compileFile"); raisePage(); if(m_compiler.state() == QProcess::NotRunning) { UserProgram::instance()->stop(); UserProgram::instance()->loading(); ui_output->clear(); if(filename.endsWith(".sh")) m_compiler.start("sh", QStringList() << filename); else m_compiler.start("/mnt/kiss/usercode/compile", QStringList() << filename); } }
bool UserConfig::raiseDefaultPage() { return raisePage(m_defaultPage); }