void DmWidget::onCancelAll() { m_wlTitle->setText(tr("All downloads canceled")); m_wProgress->setValue(0); hideMe(); }
SettingsReaderPageTurning::SettingsReaderPageTurning(QWidget *parent) : FullScreenWidget(parent) , m_buttonGroupTurnMode(NULL) { setupUi(this); m_buttonGroupTurnMode = new QButtonGroup(this); m_buttonGroupTurnMode->addButton(upDownCheck,0); m_buttonGroupTurnMode->addButton(leftRightCheck, 1); m_buttonGroupRefreshCount = new QButtonGroup(this); m_buttonGroupRefreshCount->addButton(refreshSteps0, 1); m_buttonGroupRefreshCount->addButton(refreshSteps1, 2); m_buttonGroupRefreshCount->addButton(refreshSteps2, 3); m_buttonGroupRefreshCount->addButton(refreshSteps3, 4); m_buttonGroupRefreshCount->addButton(refreshSteps4, 5); m_buttonGroupRefreshCount->addButton(refreshSteps5, 6); m_buttonGroupRefreshCount->addButton(refreshSteps6, 10); /* Please, keep the same order than interface */ connect(backBtn,SIGNAL(clicked()), this, SIGNAL(hideMe())); connect(m_buttonGroupTurnMode, SIGNAL(buttonClicked(int)),this, SLOT(changeTurnMode(int))); connect(m_buttonGroupRefreshCount, SIGNAL(buttonClicked(int)),this, SLOT(changeRefreshCount(int))); connect(enableSwipeBtn, SIGNAL(clicked()), this, SLOT(enableSwipeBtnHandler())); /**********************************************/ setCurrentTurnMode(); setEnableSwipeMode(); setRefreshCount(); }
SettingsPageScreenSaver::SettingsPageScreenSaver(QWidget* parent) : FullScreenWidget(parent) { qDebug() << Q_FUNC_INFO; setupUi(this); connect(backBtn, SIGNAL(clicked()), this, SIGNAL(hideMe())); connect(screenSaverDefaultBtn, SIGNAL(clicked()), this, SLOT(handleScreenSaverDefault())); connect(imageRecentBookBtn, SIGNAL(clicked()), this, SLOT(handleImageRecentBook())); connect(storedImagesBtn, SIGNAL(clicked()), this, SLOT(handleStoredImages())); resetButtons(); switch(QBook::settings().value("setting/screensaver", QBookScreenSaver::BOOK_COVER).toInt()){ case QBookScreenSaver::DEFAULT_IMAGE: setBtnChecked(screenSaverDefaultBtn, true); break; case QBookScreenSaver::BOOK_COVER: setBtnChecked(imageRecentBookBtn, true); break; case QBookScreenSaver::STORED_IMAGES: setBtnChecked(storedImagesBtn, true); break; default: qWarning() << Q_FUNC_INFO << "Unexpected setting"; } }
KHTMLViewBarWidget::KHTMLViewBarWidget( bool addCloseButton, QWidget *parent ) : QWidget( parent ) { QHBoxLayout *layout = new QHBoxLayout; // NOTE: Here be cosmetics. layout->setMargin( 2 ); // hide button if ( addCloseButton ) { QToolButton *hideButton = new QToolButton( this ); hideButton->setAutoRaise( true ); hideButton->setIcon( KIcon( "dialog-close" ) ); connect( hideButton, SIGNAL( clicked() ), SIGNAL( hideMe() ) ); layout->addWidget( hideButton ); layout->setAlignment( hideButton, Qt::AlignLeft | Qt::AlignTop ); } // widget to be used as parent for the real content m_centralWidget = new QWidget( this ); layout->addWidget( m_centralWidget ); setLayout( layout ); setFocusProxy( m_centralWidget ); }
void PMainWindow::initDisp() { initT<ImageView>( "Image ScrollView", &m_disp, ImageDisplay ); if (m_disp) { // if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { //m_disp->setMinimumSize(QApplication::desktop()->size()/2); // } m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType,m_hBright); m_disp->setAutoScale(!m_aUnscaled->isOn()); m_disp->setAutoRotate(m_aAutoRotate->isOn()); m_disp->setShowZoomer(m_aZoomer->isOn()); m_disp->setBackgroundColor(white); connect(m_disp,SIGNAL(dispImageInfo(const QString&)),this,SLOT(slotShowInfo(const QString&))); connect(m_disp,SIGNAL(dispNext()),m_view,SLOT(slotShowNext())); connect(m_disp,SIGNAL(dispPrev()),m_view,SLOT(slotShowPrev())); connect(m_disp,SIGNAL(toggleFullScreen()),this,SLOT(slotToggleFullScreen())); connect(m_disp,SIGNAL(hideMe()),this,SLOT(raiseIconView())); connect(m_disp,SIGNAL(toggleZoomer()),this,SLOT(slotToggleZoomer())); connect(m_disp,SIGNAL(toggleAutoscale()),this,SLOT(slotToggleAutoscale())); connect(m_disp,SIGNAL(toggleAutorotate()),this,SLOT(slotToggleAutorotate())); connect(m_view,SIGNAL(sig_startslide(int)),m_disp,SLOT(startSlide(int))); connect(m_IncBrightness,SIGNAL(activated()),m_disp,SLOT(slotIncBrightness())); connect(m_DecBrightness,SIGNAL(activated()),m_disp,SLOT(slotDecBrightness())); slotFullScreenToggled(m_aFullScreen->isOn()); } }
SettingsEnergySaving::SettingsEnergySaving(QWidget *parent) : FullScreenWidget(parent) { setupUi(this); connect(backBtn, SIGNAL(clicked()), this, SIGNAL(hideMe())); connect(sleepTimeBtn, SIGNAL(clicked()), this, SLOT(handleSleepTime())); connect(switchOffBtn, SIGNAL(clicked()), this, SLOT(handleSwitchOffTime())); sleepTime = new SettingsSleepTimeMenu(this); switchOffTime = new SettingsSwitchOffTimeMenu(this); sleepTime->hide(); switchOffTime->hide(); connect(sleepTime, SIGNAL(hideMe()), this, SIGNAL(hideChild())); connect(switchOffTime, SIGNAL(hideMe()), this, SIGNAL(hideChild())); }
SettingsUnLinkStoreDevice::SettingsUnLinkStoreDevice(QWidget *parent) : FullScreenWidget(parent) { setupUi(this); connect(backBtn,SIGNAL(clicked()), this, SIGNAL(hideMe())); connect(overrideDeviceBtn, SIGNAL(clicked()), this, SLOT(handleUnlinkBtn())); statusLbl->hide(); statusValLbl->hide(); warningMsgLbl->hide(); }
SettingsGeneralTermsInfo::SettingsGeneralTermsInfo(QWidget* parent) : FullScreenWidget(parent){ qDebug() << "--->" << Q_FUNC_INFO; setupUi(this); connect(backBtn,SIGNAL(clicked()),this, SIGNAL(hideMe())); connect(verticalPage, SIGNAL(previousPageReq()), this , SLOT(previousPage())); connect(verticalPage, SIGNAL(nextPageReq()), this, SLOT(nextPage())); generalTermsResult->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); vbar = generalTermsResult->verticalScrollBar(); }
SettingsTechnicalInfo::SettingsTechnicalInfo(QWidget *parent) : FullScreenWidget(parent) { setupUi(this); connect(backBtn,SIGNAL(clicked()), this,SIGNAL(hideMe())); Storage *storage = Storage::getInstance(); connect(storage, SIGNAL(partitionMounted(StoragePartition*)), this, SLOT(fillInfo())); connect(storage, SIGNAL(partitionUmounted(StoragePartition*)), this, SLOT(fillInfo())); battery = Battery::getInstance(); connect(battery, SIGNAL(batteryLevelChanged(int)), this, SLOT(refreshBatteryLevel(int))); }
void SettingsTechnicalInfo::keyReleaseEvent(QKeyEvent *event){ qDebug() << "--->" << Q_FUNC_INFO; if( event->key() == QBook::QKEY_BACK ) { qDebug() << ": Closing..."; emit hideMe(); event->accept(); return; } QWidget::keyReleaseEvent(event); }
SettingsDictionariesMenu::SettingsDictionariesMenu(QWidget* parent) : FullScreenWidget(parent) , downloadDialog(NULL) , m_powerLock(NULL) { qDebug() << Q_FUNC_INFO; setupUi(this); items.append(Item1); items.append(Item2); items.append(Item3); items.append(Item4); items.append(Item5); connect(Item1, SIGNAL(selectDictionary(QString)), this, SLOT(changeDictionary(QString))); connect(Item2, SIGNAL(selectDictionary(QString)), this, SLOT(changeDictionary(QString))); connect(Item3, SIGNAL(selectDictionary(QString)), this, SLOT(changeDictionary(QString))); connect(Item4, SIGNAL(selectDictionary(QString)), this, SLOT(changeDictionary(QString))); connect(Item5, SIGNAL(selectDictionary(QString)), this, SLOT(changeDictionary(QString))); /* Please, keep the same order than interface */ connect(backBtn,SIGNAL(clicked()), this, SIGNAL(hideMe())); connect(seeDictionariesInfoBtn, SIGNAL(clicked()), this, SLOT(showDictioInformation())); connect(activateExtraDictionaries, SIGNAL(clicked()), this, SLOT(downloadDictionaries())); activateExtraDictionaries->setEnabled(true); /**********************************************/ // Connect page handler connect(settingsPagerCont,SIGNAL(previousPageReq()),this,SLOT(back())); connect(settingsPagerCont,SIGNAL(nextPageReq()),this,SLOT(forward())); dictionaryList = Dictionary::instance()->parseCurrentDictionaries(QString::fromUtf8(Dictionary::instance()->getJsonDictionaries())).values(); detailInformation = new SettingsDictionariesInfo(this); detailInformation->hide(); connect(detailInformation, SIGNAL(hideMe()), this, SIGNAL(hideChild())); m_powerLock = PowerManager::getNewLock(this); }
/*virtual*/ void FullScreenWidget::keyReleaseEvent(QKeyEvent *event) { qDebug() << Q_FUNC_INFO << event << QApplication::focusWidget(); switch(event->key()) { case QBook::QKEY_BACK: emit hideMe(); event->accept(); break; default: QWidget::keyReleaseEvent(event); } }
void KHTMLViewBar::addBarWidget (KHTMLViewBarWidget *newBarWidget) { if (hasWidget(newBarWidget)) { kDebug(6050) << "this bar widget is already added"; return; } // add new widget, invisible... newBarWidget->hide(); layout()->addWidget( newBarWidget ); connect(newBarWidget, SIGNAL(hideMe()), SLOT(hideCurrentBarWidget())); kDebug(6050) << "add barwidget " << newBarWidget; }
void WizardWelcome::hideLanguageSettings() { qDebug() << Q_FUNC_INFO; Screen::getInstance()->queueUpdates(); m_WizardLanguage->hide(); if(!m_WizardDateTime) m_WizardDateTime = new WizardDateTime(this); connect(m_WizardDateTime, SIGNAL(hideMe()), this, SLOT(hideWizardDateTime())); showElement(m_WizardDateTime); Screen::getInstance()->setMode(Screen::MODE_SAFE, true, FLAG_FULLSCREEN_UPDATE, Q_FUNC_INFO); Screen::getInstance()->setUpdateScheme(Screen::SCHEME_MERGE, true); Screen::getInstance()->flushUpdates(); }
WizardWelcome::WizardWelcome(QWidget* parent) : QBookForm(parent) , current_widget(0) , m_WizardLanguage(0) , m_WizardDateTime(0) , m_elfFinishWizard(0) { qDebug() << Q_FUNC_INFO; setupUi(this); connect(nextStepBtn, SIGNAL(clicked()), this, SLOT(requestConnection())); connect(skipBtn, SIGNAL(clicked()), this, SLOT(skipWizard())); nextStepBtn->setFocus(); if(QBook::settings().value("setting/initial_lang_selection",true).toBool()) { if(!m_WizardLanguage) m_WizardLanguage = new WizardLanguage(this); connect(m_WizardLanguage, SIGNAL(languageSelected()), this, SLOT(hideLanguageSettings())); showElement(m_WizardLanguage); } if(QBookApp::instance()->isActivated()) { intro3Lbl->hide(); welcomeTitleLbl->setText(tr("Enlazar dispositivo")); }else intro3Lbl->show(); // Check if: 1. language selection is needed, 2. initial power on for user is set and 3. Device has not been manually deactivated because of OTA if(!QBook::settings().value("setting/initial_lang_selection", true).toBool()&& QBook::settings().value("setting/initial",true).toBool() && !QBook::settings().value("setting/activated").isValid()) { if(!m_WizardDateTime) m_WizardDateTime = new WizardDateTime(this); connect(m_WizardDateTime, SIGNAL(hideMe()), this, SLOT(hideWizardDateTime())); showElement(m_WizardDateTime); } QFile fileSpecific(":/res/wizard_styles.qss"); QFile fileCommons(":/res/wizard_styles_generic.qss"); fileSpecific.open(QFile::ReadOnly); fileCommons.open(QFile::ReadOnly); QString styles = QLatin1String(fileSpecific.readAll() + fileCommons.readAll()); setStyleSheet(styles); }
void SettingsDictionariesMenu::changeDictionary(QString id) { qDebug() << Q_FUNC_INFO; Screen::getInstance()->queueUpdates(); QBook::settings().setValue("setting/dictionary", id); QBook::settings().sync(); currentDictio = id; setupDictionaries(); Screen::getInstance()->flushUpdates(); emit hideMe(); InfoDialog * dictionaryDialog = new InfoDialog(this, tr("Diccionario cambiado correctamente"), 3000); dictionaryDialog->hideSpinner(); dictionaryDialog->showForSpecifiedTime(); delete dictionaryDialog; }
//BEGIN KateBrokenSwapFileBar KateBrokenSwapFileBar::KateBrokenSwapFileBar(KateView *view, QWidget *parent) : KateViewBarWidget( false, parent ) , m_view ( view ) , m_ui (new Ui::BrokenSwapFileWidget()) { m_ui->setupUi( centralWidget() ); // set warning icon m_ui->lblIcon->setPixmap(KIcon("dialog-warning").pixmap(64, 64)); m_ui->btnOk->setGuiItem(KGuiItem(m_ui->btnOk->text(), KIcon("dialog-ok"))); // clicking on the "Help" link pops up the content as what's this connect(m_ui->lblSwap, SIGNAL(linkActivated(const QString&)), this, SLOT(showWhatsThis(const QString&))); connect(m_ui->btnOk, SIGNAL(clicked()), this, SIGNAL(hideMe())); }
Notification::Notification(QWidget *parent) : QDialog(parent), ui(new Ui::Notification) { ui->setupUi(this); //setWindowFlags(Qt::FramelessWindowHint); setWindowFlags(Qt::Tool | Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint); setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, size(), qApp->desktop()->availableGeometry())); setAttribute(Qt::WA_ShowWithoutActivating); setParent(0); // Create TopLevel-Widget //setAttribute(Qt::WA_NoSystemBackground, true); //setAttribute(Qt::WA_TranslucentBackground, true); timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(hideMe())); currNotification = eCN_NONE; }
void FrmAlbaranProveedor::setUpBusqueda() { m_busqueda = new BarraBusqueda(this); this->setMouseTracking(true); this->setAttribute(Qt::WA_Hover); this->installEventFilter(this); QStringList orden; orden << tr("Albarán") << tr("Fecha") <<tr("Cif/Nif") <<tr("Proveedor"); m_busqueda->setOrderCombo(orden); QStringList modo; modo << tr("A-Z") << tr("Z-A"); m_busqueda->setModeCombo(modo); connect(m_busqueda,SIGNAL(showMe()),this,SLOT(mostrarBusqueda())); connect(m_busqueda,SIGNAL(hideMe()),this,SLOT(ocultarBusqueda())); connect(m_busqueda,SIGNAL(doSearch(QString,QString,QString)),this,SLOT(filter_table(QString,QString,QString))); QPushButton *btnAdd = new QPushButton(QIcon(":/Icons/PNG/add.png"),tr("Añadir"),this); connect(btnAdd,SIGNAL(clicked()),this,SLOT(on_btnAnadir_clicked())); m_busqueda->addWidget(btnAdd); QPushButton *btnEdit = new QPushButton(QIcon(":/Icons/PNG/edit.png"),tr("Editar"),this); connect(btnEdit,SIGNAL(clicked()),this,SLOT(on_btnEditar_clicked())); m_busqueda->addWidget(btnEdit); QPushButton *btnDelete = new QPushButton(QIcon(":/Icons/PNG/borrar.png"),tr("Borrar"),this); connect(btnDelete,SIGNAL(clicked()),this,SLOT(on_btnBorrar_clicked())); m_busqueda->addWidget(btnDelete); QPushButton *btnPrint = new QPushButton(QIcon(":/Icons/PNG/print2.png"),tr("Imprimir"),this); connect(btnDelete,SIGNAL(clicked()),this,SLOT(on_btnImprimir_clicked())); m_busqueda->addWidget(btnPrint); m_busqueda->addSpacer(); connect(m_busqueda,SIGNAL(key_Down_Pressed()),ui->tabla,SLOT(setFocus())); //connect(m_busqueda,SIGNAL(key_F2_Pressed()),this,SLOT(ocultarBusqueda())); m_busqueda->hideMe(); }
SettingsReaderProgressBar::SettingsReaderProgressBar(QWidget *parent) : FullScreenWidget(parent) { setupUi(this); readingProgress->setStyleSheet("background:transparent;"); switch(QBook::getInstance()->getResolution()) { case QBook::RES1072x1448: m_chapterLineWidth = WIDTH_LINE_FHD; break; case QBook::RES758x1024: m_chapterLineWidth = WIDTH_LINE_HD; break; case QBook::RES600x800: default: m_chapterLineWidth = WIDTH_LINE_SD; break; } /* Please, keep the same order than interface */ connect(backBtn,SIGNAL(clicked()), this, SIGNAL(hideMe())); connect(withPageBtn, SIGNAL(clicked()), this, SLOT(withPageBtnHandler())); connect(withProgressBtn, SIGNAL(clicked()),this, SLOT(withProgressBtnHandler())); connect(withProgressBtn_2, SIGNAL(clicked()), this, SLOT(withChapterBtnHandler())); connect(withProgressBarBtn, SIGNAL(clicked()), this, SLOT(withProgressBarHandler())); connect(withBookTitleBtn, SIGNAL(clicked()), this, SLOT(withBookTitleHandler())); connect(withDateTimeBtn, SIGNAL(clicked()), this, SLOT(withDateTimHandler())); connect(chapterProgressBtn, SIGNAL(clicked()), this, SLOT(withChapterLinesHandler())); /**********************************************/ setWithPageBtn(); setWithProgressBtn(); setWithChapterBtn(); setWithProgressBarBtn(); setWithBookTitleBtn(); setWithDateTimeBtn(); }
void KDGanttViewEventItem::showItem(bool show, int coordY) { isVisibleInGanttView = show; invalidateHeight () ; if (!show) { hideMe(); return; } float prio = ((float) ( priority() - 100 )) / 100.0; startShape->setZ( prio + 0.0055 ); startShapeBack->setZ( prio + 0.003 ); startLine->setZ( prio + 0.0015 ); floatStartShape->setZ(prio + 0.004); floatStartShape->hide(); floatEndShape->setZ(prio + 0.004); floatEndShape->hide(); textCanvas->setZ( prio + 0.006 ); startLineBack->setZ( prio ); if ( displaySubitemsAsGroup() && firstChild() ) { myStartTime = myChildStartTime(); myEndTime = myChildEndTime(); } int startX, endX, allY; if ( coordY ) allY = coordY; else allY = getCoordY(); startX = myGanttView->myTimeHeader->getCoordX(myStartTime); if (myLeadTime) { endX = myGanttView->myTimeHeader->getCoordX(*myLeadTime); startLine->setPoints(startX,allY,endX,allY); startLine->show(); startLineBack->setPoints(startX+1,allY,endX-1,allY); startLineBack->show(); } else { startLine->hide(); startLineBack->hide(); } startShape->move(startX,allY); startShape->show(); startShapeBack->move(startX,allY); startShapeBack->show(); if (myFloatStartTime.isValid()) { KDCanvasRectangle* floatStartTemp = (KDCanvasRectangle*) floatStartShape; int floatStartX = myGanttView->myTimeHeader->getCoordX(myFloatStartTime); int hei = startShape->boundingRect().height(); // FIXME: Configurable colors QBrush b(startShape->brush().color(), Dense4Pattern); floatStartTemp->setBrush(b); floatStartTemp->setPen(QPen(gray)); if (floatStartX < startX) { floatStartTemp->setSize(startX - floatStartX, hei/2); floatStartTemp->move(floatStartX, allY-hei/4); } else { floatStartTemp->setSize(floatStartX - startX, hei/2); floatStartTemp->move(startX, allY-hei/4); } floatStartShape->show(); } if (myFloatEndTime.isValid()) { KDCanvasRectangle* floatEndTemp = (KDCanvasRectangle*) floatEndShape; int floatEndX = myGanttView->myTimeHeader->getCoordX(myFloatEndTime); int hei = startShape->boundingRect().height(); // FIXME: Configurable colors QBrush b(startShape->brush().color(), Dense4Pattern); floatEndTemp->setBrush(b); floatEndTemp->setPen(QPen(gray)); if (floatEndX > startX) { floatEndTemp->setSize(floatEndX - startX, hei/2); floatEndTemp->move(startX, allY-hei/4); } else { floatEndTemp->setSize(startX - floatEndX, hei/2); floatEndTemp->move(floatEndX, allY-hei/4); } floatEndShape->show(); } moveTextCanvas(startX,allY); textCanvas->show(); if (textCanvas->text().isEmpty()) textCanvas->hide(); }
void DmWidget::onAllComplete() { m_wlTitle->setText(tr("All downloads completed")); QTimer::singleShot(1500, this, SLOT(hideMe())); }
// shows the item // if coordY >0, this is taken as the middle y-coordinate void KDGanttViewSummaryItem::showItem( bool show, int coordY ) { isVisibleInGanttView = show; invalidateHeight () ; if (!show) { hideMe(); return; } if ( displaySubitemsAsGroup() && !parent() && !isOpen() ) { hideMe(); return; } float prio = ((float) ( priority() - 100 )) / 100.0; startShape->setZ( prio + 0.0055 ); midShape->setZ( prio + 0.004 ); endShape->setZ( prio + 0.005 ); startShapeBack->setZ( prio + 0.003 ); midShapeBack->setZ( prio + 0.003 ); endShapeBack->setZ( prio + 0.003 ); startLine->setZ( prio + 0.0015 ); endLine->setZ( prio + 0.001 ); textCanvas->setZ( prio + 0.006 ); startLineBack->setZ( prio ); endLineBack->setZ( prio ); actualEnd->setZ( prio + 0.007 ); if ( displaySubitemsAsGroup() && firstChild() ) { myStartTime = myChildStartTime(); myEndTime = myChildEndTime(); } int startX, endX, midX = 0,allY; if ( coordY ) allY = coordY; else allY = getCoordY(); startX = myGanttView->myTimeHeader->getCoordX(myStartTime); endX = myGanttView->myTimeHeader->getCoordX(myEndTime); if (myMiddleTime) midX = myGanttView->myTimeHeader->getCoordX(*myMiddleTime); else midX = endX; startLine->setPoints(startX,allY,midX,allY); startLine->show(); startLineBack->setPoints(startX-1,allY,midX+1,allY); startLineBack->show(); startShape->move(startX,allY); startShapeBack->move(startX,allY); endShape->move(endX,allY); endShapeBack->move(endX,allY); moveTextCanvas(endX,allY); startShape->show(); startShapeBack->show(); endShape->show(); endShapeBack->show(); textCanvas->show(); if (myMiddleTime) { endLine->setPoints(midX,allY,endX,allY); endLine->show(); endLineBack->setPoints(midX,allY,endX+1,allY); endLineBack->show(); midShape->move(midX,allY); midShape->show(); midShapeBack->move(midX,allY); midShapeBack->show(); } else { endLine->hide(); endLineBack->hide(); midShape->hide(); midShapeBack->hide(); } if (myActualEndTime) { if ( *myActualEndTime == myEndTime ) { actualEnd->hide(); } else { int actendX = myGanttView->myTimeHeader->getCoordX(*myActualEndTime); actualEnd->setPoints(actendX,allY-5,actendX,allY+5); actualEnd->show(); } } else { actualEnd->hide(); } if(myStartTime == myEndTime) { endShape->moveBy(myItemSize+4,0); endShapeBack->moveBy(myItemSize+4,0); textCanvas->moveBy(myItemSize+4,0); midShape->hide(); midShapeBack->hide(); startLine->hide(); endLine->hide(); startLineBack->hide(); endLineBack->hide(); } if (textCanvas->text().isEmpty()) textCanvas->hide(); }
Home::Home(QWidget *parent) : QBookForm(parent), m_category1(0) , m_category2(0) , m_category3(0) , memoryCategory1List(0) , memoryCategory2List(0) , memoryCategory3List(0) , b_isMostRecentFromSD(false) { setupUi(this); connect(libraryBtn, SIGNAL(clicked()), this, SLOT(goToLibrary())); connect(helpBtn, SIGNAL(clicked()), this, SLOT(goToHelp())); connect(searchBtn, SIGNAL(clicked()), this, SLOT(goToSearch())); connect(settingsBtn, SIGNAL(clicked()), this, SLOT(goToSettings())); connect(showAllBtn, SIGNAL(clicked()), this, SLOT(viewAll())); connect(recommendedBtn, SIGNAL(clicked()), this, SLOT(showOptions())); #ifndef HACKERS_EDITION connect(storeBtn, SIGNAL(clicked()), QBookApp::instance(),SLOT(goToShop())); #endif connect(readBookBtn, SIGNAL(clicked()), this, SLOT(openMostRecentBook())); QFile fileSpecific(":/res/home_styles.qss"); QFile fileCommons(":/res/home_styles_generic.qss"); fileSpecific.open(QFile::ReadOnly); fileCommons.open(QFile::ReadOnly); QString styles = QLatin1String(fileSpecific.readAll() + fileCommons.readAll()); setStyleSheet(styles); if(QBook::getInstance()->getResolution() == QBook::RES600x800){ defaultHelpBook = new BookInfo(QString(USERGUIDEPATH) + "/userGuideTouch_" + QBook::settings().value("setting/language", QVariant("es")).toString()+ ".epub"); }else{ //We do it to preserve back compatibility defaultHelpBook = new BookInfo(QString(USERGUIDEPATH) + "/userGuide_" + QBook::settings().value("setting/language", QVariant("es")).toString()+ ".pdf"); } defaultHelpBook->title = tr("Guia de Ayuda"); defaultHelpBook->thumbnail = ":/res/unknow_book.png"; defaultHelpBook->fontSize = 1; //Optimal to show images homeBooksListOptions = new HomeBooksListOptions(this); connect(homeBooksListOptions, SIGNAL(viewSelected(Home::VIEW)), this, SLOT(viewSelected(Home::VIEW))); connect(homeBooksListOptions, SIGNAL(hideMe()), this, SLOT(showOptions())); connect(homeBooksList, SIGNAL(openBook(const BookInfo*)), this, SLOT(openBook(const BookInfo*))); #ifndef HACKERS_EDITION memoryCategory1List = new bqDeviceServicesCategoryObject(); memoryCategory2List = new bqDeviceServicesCategoryObject(); memoryCategory3List = new bqDeviceServicesCategoryObject(); m_category1 = new bqDeviceServicesCategoryObject(); m_category2 = new bqDeviceServicesCategoryObject(); m_category3 = new bqDeviceServicesCategoryObject(); #endif bookAccessLbl->hide(); numberAccessLbl->hide(); subscriptionTagLbl->hide(); currentView = Home::RECENT; }