static inline bool goToItemAtIndex(int index) { WKBackForwardListRef backForwardList = WKPageGetBackForwardList(mainPage()); ASSERT(backForwardList); WKBackForwardListItemRef listItem = WKBackForwardListGetItemAtIndex(backForwardList, index); if (!listItem) return false; WKPageGoToBackForwardListItem(mainPage(), listItem); return true; }
void MagRead::toggleRead() { QString backStr; if( captureAudio ) { captureStop(); if( onMainPage ) backStr = "Start"; else backStr = "Back"; captureAudio = false; } else if( onMainPage ) { captureStart(); backStr = "Stop"; captureAudio = true; } else { card.clear(); backStr = "Start"; mainPage(); } #ifdef Q_OS_SYMBIAN backSoftKey->setText( backStr ); #else mainBackBtn->setText( backStr ); #endif }
void cartMain(struct cart *theCart) /* We got the persistent/CGI variable cart. Now * set up the globals and make a web page. */ { cart = theCart; /* Break out new block after have set cart */ { int id = cartUsualInt(cart, hgbiId, 1); struct sqlConnection *conn = sqlConnect("bioImage"); char *geneName = bioImageGeneName(conn, id); if (cartVarExists(cart, hgbiDoFullSize)) { htmStart(stdout, "BioImage Full Sized Image"); printf("<IMG SRC=\"/%s\"><BR>\n", bioImageFullSizePath(conn, id)); printCaption(conn, id, geneName); htmlEnd(); } else /* Default case - start fancy web page. */ { mainPage(conn, id, geneName); } cartRemovePrefix(cart, hgbiDoPrefix); sqlDisconnect(&conn); } }
WorkQueueItem::Type invoke() const { if (!m_target.isEmpty()) { // FIXME: Use target. Some layout tests cannot pass as they rely on this functionality. fprintf(stderr, "queueLoad for a specific target is not implemented.\n"); return WorkQueueItem::NonLoading; } WKPageLoadURL(mainPage(), m_url.get()); return WorkQueueItem::Loading; }
void dispatchPage() /* Look at command variables in cart and figure out which * page to draw. */ { struct sqlConnection *conn = hAllocConn(database); if (checkAndClear(hggConfigure)) { configurePage(); } else if (checkAndClear(hggConfigureOne)) { configureOnePage(); } else if (checkAndClear(hggUpload)) { uploadPage(); } else if (checkAndClear(hggSubmitUpload)) { submitUpload(conn); } else if (checkAndClear(hggImport)) { importPage(conn); } else if (checkAndClear(hggSubmitImport)) { submitImport(); } else if (checkAndClear(hggCorrelate)) { correlatePage(conn); } else if (checkAndClear(hggBrowse)) { browseRegions(conn); } else if (checkAndClear(hggSort)) { sortGenes(conn); } else { /* Default case - start fancy web page. */ if (cgiVarExists(hggPsOutput)) handlePostscript(conn); else mainPage(conn); } cartRemovePrefix(cart, hggDo); }
int main() { int i; Member* list; Member* listBackUp; char input; list = (Member*)malloc(sizeof(Member)*MAX); listBackUp = (Member*)malloc(sizeof(Member)*MAX); for (i = 0; i < MAX; i++) listBackUp[i] = list[i]; initID(list); dataInput(list); for (i = 0; i < MAX; i++) listBackUp[i] = list[i]; // 저장 취소시 출력할 리스트 백업 mainPage(list); _Exit(list, listBackUp); return 0; }
WorkQueueItem::Type invoke() const { WKPageRunJavaScriptInMainFrame(mainPage(), m_script.get(), 0, runJavaScriptFunction); return type; }
WorkQueueItem::Type invoke() const { WKPageReload(mainPage()); return WorkQueueItem::Loading; }
MagRead::MagRead(QWidget *parent) : QMainWindow(parent) { captureAudio = false; partialRead = false; audioFormat.setSampleRate( 48000 ); audioFormat.setChannelCount( 2 ); audioFormat.setSampleSize( 16 ); audioFormat.setCodec( "audio/pcm" ); audioFormat.setByteOrder( QAudioFormat::LittleEndian ); audioFormat.setSampleType( QAudioFormat::SignedInt ); magDec = NULL; qRegisterMetaType<MagCard>( "MagCard" ); settings = new QSettings; //Set the auto-rotation for Maemo5 #ifdef Q_WS_MAEMO_5 if( settings->value( "autoReorient" ) == true ) { setAttribute( Qt::WA_Maemo5AutoOrientation, true ); } #endif #ifdef Q_WS_MAEMO_5 font.setPointSize( 32 ); #else font.setPointSize( 16 ); #endif // Start/stop/back selections #ifdef Q_OS_SYMBIAN backSoftKey = new QAction( "Start", this ); backSoftKey->setSoftKeyRole( QAction::PositiveSoftKey ); connect( backSoftKey, SIGNAL( triggered() ), this, SLOT( toggleRead() ) ); addAction( backSoftKey ); #else mainWidget = new QWidget; mainLayout = new QVBoxLayout( mainWidget ); mainWidget->setLayout( mainLayout ); mainBackBtn = new QPushButton( "Start" ); mainLayout->addWidget( mainBackBtn, 0 ); connect( mainBackBtn, SIGNAL( clicked() ), this, SLOT( toggleRead() ) ); setCentralWidget( mainWidget ); #endif //Option and Exit selections #ifndef Q_OS_SYMBIAN settingsAction = new QAction( "&Settings", this ); connect( settingsAction, SIGNAL( triggered() ), this, SLOT( settingsPage() ) ); aboutAction = new QAction( "&About", this ); connect( aboutAction, SIGNAL( triggered() ), this, SLOT( aboutDialogue() ) ); exitAction = new QAction( "E&xit", this ); connect( exitAction, SIGNAL( triggered() ), this, SLOT( close() ) ); showDataAction = new QAction( "Show &Data", this ); connect( showDataAction, SIGNAL( triggered() ), this, SLOT( showData() ) ); #endif #ifdef Q_WS_MAEMO_5 menuBar()->addAction( settingsAction ); menuBar()->addAction( aboutAction ); menuBar()->addAction( exitAction ); #elif !defined( Q_OS_SYMBIAN ) fileMenu = menuBar()->addMenu( "&File" ); fileMenu->addAction( settingsAction ); fileMenu->addAction( aboutAction ); fileMenu->addAction( exitAction ); #endif mainPage(); }
int main(){ mainPage(); return 0; }