Esempio n. 1
0
void
MainWindow::chatContentsSizeChanged(const QSize &size) {
    // webkit is dumb ok
    QWebFrame* frame = this->ui->baseChatWindow->page()->mainFrame();
    if (this->autoScroll) {
        frame->setScrollBarValue(Qt::Vertical, size.height());
    } else {
        frame->setScrollBarValue(Qt::Vertical, this->scrollValue);
    }
}
Esempio n. 2
0
void QMyWebView::mouseMoveEvent ( QMouseEvent * event ){
    if((event->buttons()==Qt::LeftButton)&&(page()->mainFrame())){
        int  disx = event->globalX()-oldX1;
        int  disy = event->globalY()-oldY1;
        if((qAbs(disx)>10)/*&&(horizontalScrollBar()->isVisible())*/){
            QWebFrame  *frame = page()->mainFrame();
            frame->setScrollBarValue(Qt::Horizontal,oldhscrollval-disx);
            frame->setScrollBarValue(Qt::Vertical,oldvscrollval-disy);
            event->accept();
            return;
        }
    }
    QWebView::mouseMoveEvent(event);
}
Esempio n. 3
0
void QWebFrameProto::setScrollBarValue(Qt::Orientation orientation, int value)
{
  scriptDeprecated("QWebFrame will not be available in future versions");
  QWebFrame *item = qscriptvalue_cast<QWebFrame*>(thisObject());
  if (item)
    item->setScrollBarValue(orientation, value);
}
void CellmlAnnotationViewMetadataNormalViewDetailsWidget::showLastRdfTriple()
{
    // Show our last RDF triple by scrolling to the end of the page

    QWebFrame *outputFrame = mOutputOntologicalTerms->page()->mainFrame();

    outputFrame->setScrollBarValue(Qt::Vertical, outputFrame->scrollBarMaximum(Qt::Vertical));
}
Esempio n. 5
0
			void ChatTab::scrollToEnd ()
			{
				QWebFrame *frame = Ui_.View_->page ()->mainFrame ();
				int scrollMax = frame->scrollBarMaximum (Qt::Vertical);
				frame->setScrollBarValue (Qt::Vertical, scrollMax);
			}