static void genModule(int tab, int expand, token_t * e1, char *mname) { FILE *fp = stdout; if(EiC_lexan() == INT) MULTIPLEX = token->Val.ival; else retractlexan(); if(EiC_lexan() == STR) { fp = fopen(token->Val.p.p,"w"); EiC_formatMessage("redirecting to [%s]\n",(char*)token->Val.p.p); if(!fp) { EiC_warningerror("Failed to open file %s\n", token->Val.p.p); fp = stdout; } } else retractlexan(); genHeader(mname,fp); genFunctions(tab, expand, e1, mname, EiC_IsFunc,fp); genInterface(tab, expand, e1, mname,fp); if(fp != stdout) fclose(fp); }
SettingsWindow::SettingsWindow(QWidget *parent) : QFrame(parent) { settings = new QSettings; genCustomise(); genNavigation(); genInterface(); genBookmarks(); genSecurity(); genOptions(); genReset(); mainLayout = new QStackedWidget; mainLayout->addWidget(tabCustomise); mainLayout->addWidget(tabNavigation); mainLayout->addWidget(tabInterface); mainLayout->addWidget(tabBookmarks); mainLayout->addWidget(tabSecurity); mainLayout->addWidget(tabOptions); mainLayout->addWidget(tabReset); // connect(mainLayout,SIGNAL(currentChanged(int)),this,SLOT(indexChanged(int))); tabBar = new TabList; tabBar->setMinimumWidth(150); tabBar->addTab(tabCustomise->title(),0); tabBar->addTab(tabNavigation->title(),1); tabBar->addTab(tabInterface->title(),2); tabBar->addTab(tabBookmarks->title(),3); tabBar->addTab(tabSecurity->title(),4); /* tabBar->addTab(tabOptions->title(),5); tabBar->addTab("Downloads",5); tabBar->addTab("History",5);*/ tabBar->addTab(tabReset->title(),6); connect(tabBar,SIGNAL(showTab(int)),mainLayout,SLOT(setCurrentIndex(int))); QSplitter *layout = new QSplitter; layout->setContentsMargins(0,0,0,0); layout->addWidget(tabBar); layout->addWidget(mainLayout); QHBoxLayout *center = new QHBoxLayout; center->setContentsMargins(0,0,0,0); center->addWidget(layout); setLayout(center); btnClose = new QPushButton(QIcon(":/img/close.png"),"",this); btnClose->setObjectName("TopBtn"); btnClose->setIconSize(QSize(20,20)); btnClose->move(this->geometry().width()-btnClose->geometry().width(),0); connect(btnClose,SIGNAL(clicked()),this,SIGNAL(closeRequested())); loadSettings(); }