예제 #1
0
DocumentPage::DocumentPage(const QString& filePath, QGraphicsItem *parent)
    : MApplicationPage(parent)
    , currentPage(1)
    , m_pinchInProgress(false)
    , m_endScale(1.0)
    , m_blockRecenter(false)
    , pageLoaded(false)
    , m_defaultZoomLevelAction(ActionPool::ZoomFitToWidth)
    , pageIndicator(0)
    , m_infoBanner(0)
    , shareIf(0)
    , searchstring("")
    , searchingTimeout(false)
    , zoomAction(0)
    , indicatorAction(0)
    , zoomCombobox(0)
    , indicatorCombobox(0)
    , searchStarted(false)
    , noMatches(false)
    , totalPage(1)
    , liveDocument(0)
    , bounceAnimation(0)
    , jumpToPageOverlay(0)
    , findtoolbar(0)
    , quickViewToolbar(0)
    , quickViewer(false)
    , m_pageView(new ZoomBackground(this))
    , m_lastZoomFactor(1.0)
{
    setView(m_pageView);
    documentName = filePath;
    setObjectName("documentpage");

    // double click interval setting to 325ms
    QApplication::setDoubleClickInterval(DOUBLETAP_INTERVAL);

    setAutoMarginsForComponentsEnabled(false);
    setComponentsDisplayMode(MApplicationPage::AllComponents, MApplicationPageModel::Hide);
    setEscapeMode(MApplicationPageModel::EscapeCloseWindow);
    qRegisterMetaType<ZoomLevel>("ZoomLevel");
    m_autoHideTimer.setSingleShot(true);
    m_autoHideTimer.setInterval(NAVI_BAR_TIMEOUT);

    m_shortTapTimer.setSingleShot(true);
    m_shortTapTimer.setInterval(QApplication::doubleClickInterval());

    searchTimer.setSingleShot(true);
    searchTimer.setInterval(searchDelay);

    connect(&searchTimer, SIGNAL(timeout()), this, SLOT(searchTimeout()));
    connect(&m_shortTapTimer, SIGNAL(timeout()), this, SLOT(shortTapEvent()));
    connect(&m_autoHideTimer, SIGNAL(timeout()), this, SLOT(autoHideToolbar()));
    connect(this, SIGNAL(backButtonClicked()), this, SLOT(onClose()));
    connect(ActionPool::instance(), SIGNAL(destroyed(QObject *)), this, SLOT(removeActions()));
    connect(this, SIGNAL(loadSuccess(QString)), SLOT(updateViewerType()));
    connect(MInputMethodState::instance(), SIGNAL(inputMethodAreaChanged(const QRect &)), this, SLOT(sendVisibleAreayChanged()));
}
예제 #2
0
FoursquareAuthPage::FoursquareAuthPage(QGraphicsItem *parent)
	: MApplicationPage(parent),
	  m_header(0),
	  m_view(0),
	  m_nam(0)
{
	setComponentsDisplayMode(MApplicationPage::EscapeButton,
				 MApplicationPageModel::Hide);

	connect(this, SIGNAL(created()), 
		this, SLOT(activate()),
		Qt::QueuedConnection);
}
예제 #3
0
CreateEditPage::CreateEditPage(int tag, QGraphicsItem *parent)
	: MApplicationPage(parent),
	  m_tag(tag),
	  m_cancelAction(0),
	  m_storeAction(0),
	  m_layout(0),
#ifdef LABEL_SIZE
	  m_size(0),
#endif
	  m_name(0),
	  m_contentValidity(false),
	  m_nameValidity(false),
	  m_nameEdited(false)
{
	setComponentsDisplayMode(MApplicationPage::EscapeButton,
				 MApplicationPageModel::Hide);
}
void ToolBarPage::setBackButtonVisible(bool visible)
{
    setComponentsDisplayMode(EscapeButton, visible ? MApplicationPageModel::Show : MApplicationPageModel::Hide);
}