GraphicsSimpleBrowser::GraphicsSimpleBrowser(QGraphicsItem *parent) :
    QGraphicsWidget(parent)
  , mGraphicsWebView(0)
  , mAdressBar(0)
  , mBackButton(0)
  , mForwardButton(0)
  , mLoadButton(0)
  , mProgressBar(0)
{
    QWebSettings *gs = QWebSettings::globalSettings();
    gs->setAttribute(QWebSettings::JavaEnabled, true);
    gs->setAttribute(QWebSettings::PluginsEnabled, true);
    gs->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true);
    gs->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
    gs->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
    gs->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
    gs->setAttribute(QWebSettings::DnsPrefetchEnabled, true);

    setAutoFillBackground(true);

    mGraphicsWebView = new QGraphicsWebView();

    mLabel = new QLabel("QGraphicsWebView");

    mCloseButton = new QToolButton();
    mCloseButton->setAutoRaise(true);
    mCloseButton->setText("X");

    mBackButton = new QToolButton();
    mBackButton->setAutoRaise(true);
    mBackButton->setArrowType(Qt::LeftArrow);

    mForwardButton = new QToolButton();
    mForwardButton->setAutoRaise(true);
    mForwardButton->setArrowType(Qt::RightArrow);

    mLoadButton = new QToolButton();
    mLoadButton->setAutoRaise(true);
    mLoadButton->setText("load");

    mAdressBar = new QLineEdit();

    mProgressBar = new QProgressBar();
    mProgressBar->setMinimum(0);
    mProgressBar->setMaximum(100);
    mProgressBar->setValue(0);

    QGraphicsLinearLayout *mainLayer = new QGraphicsLinearLayout(Qt::Vertical);

    QGraphicsLinearLayout *titleLayout = new QGraphicsLinearLayout(Qt::Horizontal);

    QGraphicsProxyWidget *proxyLabel = new QGraphicsProxyWidget();
    proxyLabel->setWidget(mLabel);

    QGraphicsProxyWidget *proxyCloseButton = new QGraphicsProxyWidget();
    proxyCloseButton->setWidget(mCloseButton);

    titleLayout->addItem(proxyLabel);
    titleLayout->addItem(proxyCloseButton);

    QGraphicsWidget *titleLayoutItem = new QGraphicsWidget();
    titleLayoutItem->setLayout(titleLayout);

    QGraphicsLinearLayout *controlPanelLayout = new QGraphicsLinearLayout(Qt::Horizontal);

    QGraphicsProxyWidget *proxyBackButton = new QGraphicsProxyWidget();
    proxyBackButton->setWidget(mBackButton);

    QGraphicsProxyWidget *proxyForwardButton = new QGraphicsProxyWidget();
    proxyForwardButton->setWidget(mForwardButton);

    QGraphicsProxyWidget *proxyAdressBar = new QGraphicsProxyWidget();
    proxyAdressBar->setWidget(mAdressBar);

    QGraphicsProxyWidget *proxyLoadButton = new QGraphicsProxyWidget();
    proxyLoadButton->setWidget(mLoadButton);

    controlPanelLayout->addItem(proxyBackButton);
    controlPanelLayout->addItem(proxyForwardButton);
    controlPanelLayout->addItem(proxyAdressBar);
    controlPanelLayout->addItem(proxyLoadButton);

    QGraphicsWidget *controlPanelLayoutItem = new QGraphicsWidget;
    controlPanelLayoutItem->setLayout(controlPanelLayout);

    QGraphicsProxyWidget *proxyProgressBar = new QGraphicsProxyWidget();
    proxyProgressBar->setWidget(mProgressBar);

    mainLayer->addItem(titleLayoutItem);
    mainLayer->addItem(controlPanelLayoutItem);
    mainLayer->addItem(mGraphicsWebView);
    mainLayer->addItem(proxyProgressBar);

    setLayout(mainLayer);

    connect(mGraphicsWebView, SIGNAL(loadProgress(int)), mProgressBar, SLOT(setValue(int)));
    connect(mGraphicsWebView, SIGNAL(loadStarted()), mProgressBar, SLOT(show()));
    connect(mGraphicsWebView, SIGNAL(loadFinished(bool)), mProgressBar, SLOT(hide()));
    connect(mBackButton, SIGNAL(clicked()), mGraphicsWebView, SLOT(back()));
    connect(mForwardButton, SIGNAL(clicked()), mGraphicsWebView, SLOT(forward()));

    connect(mAdressBar, SIGNAL(returnPressed()), this, SLOT(on_mAdressBar_returnPressed()));
    connect(mLoadButton, SIGNAL(clicked()), this, SLOT(on_mLoadButton_clicked()));
    connect(mGraphicsWebView, SIGNAL(urlChanged(QUrl)), this, SLOT(on_webView_urlChanged(QUrl)));
    connect(mCloseButton, SIGNAL(clicked()), this, SLOT(on_mCloseButton_clicked()));

    mAdressBar->setText("vimeo.com");
    load();

    setFlags(ItemIsMovable | ItemIsSelectable | ItemIsFocusable);
}
Ejemplo n.º 2
0
KateFileBrowser::KateFileBrowser(Kate::MainWindow *mainWindow,
                                 QWidget * parent, const char * name)
  : KVBox (parent)
  , m_mainWindow(mainWindow)
{
  setObjectName(name);

  m_toolbar = new KToolBar(this);
  m_toolbar->setMovable(false);
  m_toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
  m_toolbar->setContextMenuPolicy(Qt::NoContextMenu);

  // includes some actions, but not hooked into the shortcut dialog atm
  m_actionCollection = new KActionCollection(this);
  m_actionCollection->addAssociatedWidget(this);

  KFilePlacesModel* model = new KFilePlacesModel(this);
  m_urlNavigator = new KUrlNavigator(model, KUrl(QDir::homePath()), this);
  connect(m_urlNavigator, SIGNAL(urlChanged(KUrl)), SLOT(updateDirOperator(KUrl)));

  m_dirOperator = new KDirOperator(KUrl(), this);
  m_dirOperator->setView(KFile::/* Simple */Detail);
  m_dirOperator->view()->setSelectionMode(QAbstractItemView::ExtendedSelection);
  m_dirOperator->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));

  // Mime filter for the KDirOperator
  QStringList filter;
  filter << "text/plain" << "text/html" << "inode/directory";
  m_dirOperator->setNewFileMenuSupportedMimeTypes(filter);

  setFocusProxy(m_dirOperator);
  connect(m_dirOperator, SIGNAL(viewChanged(QAbstractItemView*)),
          this, SLOT(selectorViewChanged(QAbstractItemView*)));
  connect(m_urlNavigator, SIGNAL(returnPressed()),
          m_dirOperator, SLOT(setFocus()));
  // now all actions exist in dir operator and we can use them in the toolbar
  setupActions();
  setupToolbar();

  KHBox* filterBox = new KHBox(this);

  QLabel* filterLabel = new QLabel(i18n("Filter:"), filterBox);
  m_filter = new KHistoryComboBox(true, filterBox);
  filterLabel->setBuddy(m_filter);
  m_filter->setMaxCount(10);
  m_filter->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));

  connect(m_filter, SIGNAL(editTextChanged(QString)),
          SLOT(slotFilterChange(QString)));
  connect(m_filter, SIGNAL(returnPressed(QString)),
          m_filter, SLOT(addToHistory(QString)));
  connect(m_filter, SIGNAL(returnPressed(QString)),
          m_dirOperator, SLOT(setFocus()));

  connect(m_dirOperator, SIGNAL(urlEntered(KUrl)),
          this, SLOT(updateUrlNavigator(KUrl)));

  // Connect the bookmark handler
  connect(m_bookmarkHandler, SIGNAL(openUrl(QString)),
          this, SLOT(setDir(QString)));

  m_filter->setWhatsThis(i18n("Enter a name filter to limit which files are displayed."));

  connect(m_dirOperator, SIGNAL(fileSelected(KFileItem)), this, SLOT(fileSelected(KFileItem)));
  connect(m_mainWindow, SIGNAL(viewChanged()), this, SLOT(autoSyncFolder()));
}
Ejemplo n.º 3
0
int QWebFrame::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: javaScriptWindowObjectCleared(); break;
        case 1: provisionalLoad(); break;
        case 2: titleChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 3: urlChanged((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        case 4: initialLayoutCompleted(); break;
        case 5: iconChanged(); break;
        case 6: contentsSizeChanged((*reinterpret_cast< const QSize(*)>(_a[1]))); break;
        case 7: loadStarted(); break;
        case 8: loadFinished((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 9: { QVariant _r = evaluateJavaScript((*reinterpret_cast< const QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QVariant*>(_a[0]) = _r; }  break;
        case 10: print((*reinterpret_cast< QPrinter*(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 11;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< qreal*>(_v) = textSizeMultiplier(); break;
        case 1: *reinterpret_cast< qreal*>(_v) = zoomFactor(); break;
        case 2: *reinterpret_cast< QString*>(_v) = title(); break;
        case 3: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 4: *reinterpret_cast< QUrl*>(_v) = requestedUrl(); break;
        case 5: *reinterpret_cast< QUrl*>(_v) = baseUrl(); break;
        case 6: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 7: *reinterpret_cast< QSize*>(_v) = contentsSize(); break;
        case 8: *reinterpret_cast< QPoint*>(_v) = scrollPosition(); break;
        case 9: *reinterpret_cast< bool*>(_v) = hasFocus(); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setTextSizeMultiplier(*reinterpret_cast< qreal*>(_v)); break;
        case 1: setZoomFactor(*reinterpret_cast< qreal*>(_v)); break;
        case 3: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 8: setScrollPosition(*reinterpret_cast< QPoint*>(_v)); break;
        }
        _id -= 10;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 10;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 10;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 4
0
void URLNavigator::setURL(const KURL& url)
{
    QString urlStr(url.prettyURL());

    if (url.protocol() == "zip") {
       bool stillInside = false;
       if (KMimeType::findByPath(url.url(-1))
           ->is("application/x-zip")) {
           stillInside = true;
       }
       else {
           KURL url1 = url.upURL();
           while (url1 != url1.upURL()) {
               if (KMimeType::findByPath(url1.url(-1))
                   ->is("application/x-zip")) {
                   stillInside = true;
                   break;
               }
               url1 = url1.upURL();
           }
       }
       if (!stillInside)
       {
           // Drop the zip:/ protocol since we are not in the zip anymore
           urlStr = url.path();
       }
    }
    else if (url.protocol() == "tar")
    {
       bool stillInside = false;
       KMimeType::Ptr kmp = 
           KMimeType::findByPath(url.url(-1));
       if (kmp->is("application/x-tar") ||
           kmp->is("application/x-tarz") ||
           kmp->is("application/x-tbz") || 
           kmp->is("application/x-tgz") || 
           kmp->is("application/x-tzo")
           ) {
           stillInside = true;
       }
       else {
           KURL url1 = url.upURL();
           while (url1 != url1.upURL()) {
               KMimeType::Ptr kmp =
                   KMimeType::findByPath(url1.url(-1));
               if (kmp->is("application/x-tar") ||
                   kmp->is("application/x-tarz") ||
                   kmp->is("application/x-tbz") || 
                   kmp->is("application/x-tgz") || 
                   kmp->is("application/x-tzo")
                   ) {
                   stillInside = true;
                   break;
               }
               url1 = url1.upURL();
           }
       }
       if (!stillInside)
       {
           // Drop the tar:/ protocol since we are not in the tar anymore
           urlStr = url.path();
       }
    }


    if (urlStr.at(0) == '~') {
        // replace '~' by the home directory
        urlStr.remove(0, 1);
        urlStr.insert(0, QDir::home().path());
    }

    const KURL transformedURL(urlStr);

    if (m_historyIndex > 0) {
        // Check whether the previous element of the history has the same URL.
        // If yes, just go forward instead of inserting a duplicate history
        // element.
        const KURL& nextURL = m_history[m_historyIndex - 1].url();
        if (transformedURL == nextURL) {
            goForward();
            return;
        }
    }

    const KURL& currURL = m_history[m_historyIndex].url();
    if (currURL == transformedURL) {
        // don't insert duplicate history elements
        return;
    }

    updateHistoryElem();

    const QValueListIterator<URLNavigator::HistoryElem> it = m_history.at(m_historyIndex);
    m_history.insert(it, HistoryElem(transformedURL));
    updateContent();
    emit urlChanged(transformedURL);
    emit historyChanged();

    // Prevent an endless growing of the history: remembering
    // the last 100 URLs should be enough...
    if (m_historyIndex > 100) {
        m_history.erase(m_history.begin());
        --m_historyIndex;
    }
}
Ejemplo n.º 5
0
Archivo: segment.cpp Proyecto: KDE/kget
void Segment::slotRedirection(KIO::Job* , const KUrl &url)
{
    m_url = url;
    emit urlChanged(url);
}
Ejemplo n.º 6
0
void Viewer::renderHtml(QString html, QString url)
{
    emit urlChanged(url);
    QUrl fullUrl(url);
    webView->setHtml(html, QUrl(fullUrl.toString(QUrl::RemovePath)));
}
Ejemplo n.º 7
0
void CustomWebView::remakeURL (const QUrl& url)
{
    emit urlChanged (URLToProperString (url));
}
Ejemplo n.º 8
0
	void TopicModel::setUtl(const QString& url)
	{
		m_url = url;
		emit urlChanged();
		updateModel ();
	}
DirectoryWidget::DirectoryWidget(QWidget *parent) :
	QWidget(parent),
	ui(new Ui::DirectoryWidget)
{
	ui->setupUi(this);

	m_productView = new ProductView(this);

	connect(ui->refreshButton, SIGNAL(clicked()),
			this, SLOT(refreshButton_clicked()));

	ui->dirWebViewBackButton->setIcon(style()->standardIcon(QStyle::SP_ArrowLeft));
	ui->dirWebViewForwardButton->setIcon(style()->standardIcon(QStyle::SP_ArrowRight));
	ui->dirWebViewReloadButton->setIcon(style()->standardIcon(QStyle::SP_BrowserReload));
	ui->dirWebViewGoButton->setIcon(style()->standardIcon(QStyle::SP_CommandLink));

	connect(ui->dirWebViewBackButton, SIGNAL(clicked()),
			ui->dirWebView, SLOT(back()));
	connect(ui->dirWebViewForwardButton, SIGNAL(clicked()),
			ui->dirWebView, SLOT(forward()));
	connect(ui->dirWebViewReloadButton, SIGNAL(clicked()),
			ui->dirWebView, SLOT(reload()));
	connect(ui->dirWebViewUrlLineEdit, SIGNAL(returnPressed()),
			this, SLOT(dirWebViewUrlLineEdit_returnPressed()));
	connect(ui->dirWebViewGoButton, SIGNAL(clicked()),
			this, SLOT(dirWebViewGoButton_clicked()));
	connect(ui->dirWebViewPinButton, SIGNAL(clicked()),
			this, SLOT(dirWebViewPinButton_clicked()));
	connect(ui->dirWebViewEditButton, SIGNAL(clicked()),
			this, SLOT(dirWebViewEditButton_clicked()));
	connect(ui->dirWebView, SIGNAL(urlChanged(QUrl)),
			this, SLOT(dirWebView_urlChanged(QUrl)));

	ui->partsIndexBackButton->setIcon(style()->standardIcon(QStyle::SP_ArrowLeft));
	ui->partsIndexForwardButton->setIcon(style()->standardIcon(QStyle::SP_ArrowRight));
	ui->partsIndexReloadButton->setIcon(style()->standardIcon(QStyle::SP_BrowserReload));
	ui->partsIndexGoButton->setIcon(style()->standardIcon(QStyle::SP_CommandLink));

	connect(ui->partsIndexBackButton, SIGNAL(clicked()),
	        ui->partsWebView, SLOT(back()));
	connect(ui->partsIndexForwardButton, SIGNAL(clicked()),
	        ui->partsWebView, SLOT(forward()));
	connect(ui->partsIndexReloadButton, SIGNAL(clicked()),
	        ui->partsWebView, SLOT(reload()));
	connect(ui->partsIndexUrlLineEdit, SIGNAL(returnPressed()),
	        this, SLOT(partsIndexUrlLineEdit_returnPressed()));
	connect(ui->partsIndexGoButton, SIGNAL(clicked()),
	        this, SLOT(partsIndexGoButton_clicked()));
	connect(ui->partsIndexPinButton, SIGNAL(clicked()),
	        this, SLOT(partsIndexPinButton_clicked()));
	connect(ui->partsIndexEditButton, SIGNAL(clicked()),
			this, SLOT(partsIndexEditButton_clicked()));
	connect(ui->partsWebView, SIGNAL(urlChanged(QUrl)),
	        this, SLOT(partsWebView_urlChanged(QUrl)));

	connect(ui->copyToWorkingDirButton, SIGNAL(clicked()),
	        ui->partsTreeView, SLOT(copyToWorkingDir()));
	connect(ui->moveButton, SIGNAL(clicked()),
			this, SLOT(moveSelectedParts()));
	connect(ui->btnDelete, SIGNAL(clicked()),
	        this, SLOT(deleteSelectedParts()));
	connect(ui->thumbnailSizeSlider, SIGNAL(valueChanged(int)),
	        this, SLOT(adjustThumbColumnWidth(int)));

	connect(ui->partsTreeView, SIGNAL(previewProductView(QFileInfo)),
	        this, SLOT(previewInProductView(QFileInfo)));
	connect(ui->partsTreeView, SIGNAL(hideProductView()),
	        m_productView, SLOT(hide()));
	connect(ui->partsTreeView, SIGNAL(openPartDirectory(QFileInfo)),
			this, SIGNAL(openPartDirectory(QFileInfo)));

	connect(ui->filterButton, SIGNAL(clicked()),
	        this, SLOT(setFiltersDialog()));

	ui->dirWebView->loadAboutPage();
}
AttachmentEditDialog::AttachmentEditDialog( AttachmentIconItem *item,
                                            QWidget *parent, bool modal )
  : KDialog ( parent ), mItem( item ), mURLRequester( 0 )
{
  // based loosely on KPropertiesDialog code
  QWidget *page = new QWidget(this);
  setMainWidget( page );
  setCaption( i18nc( "@title", "Properties for %1",
                     item->label().isEmpty() ? item->uri() : item->label() ) );
  setButtons( KDialog::Ok | KDialog::Cancel );
  setDefaultButton( KDialog::Ok );
  setModal( modal );
  QVBoxLayout *vbl = new QVBoxLayout( page );
  vbl->setSpacing( KDialog::spacingHint() );
  vbl->setMargin( 0 );
  QGridLayout *grid = new QGridLayout();
  grid->setColumnStretch( 0, 0 );
  grid->setColumnStretch( 1, 0 );
  grid->setColumnStretch( 2, 1 );
  grid->addItem( new QSpacerItem( KDialog::spacingHint(), 0 ), 0, 1 );
  vbl->addLayout( grid );

  mIcon = new QLabel( page );
  int bsize = 66 + 2 * mIcon->style()->pixelMetric( QStyle::PM_ButtonMargin );
  mIcon->setFixedSize( bsize, bsize );
  mIcon->setPixmap( item->icon() );
  grid->addWidget( mIcon, 0, 0, Qt::AlignLeft );

  mLabelEdit = new KLineEdit( page );
  mLabelEdit->setText( item->label().isEmpty() ? item->uri() : item->label() );
  mLabelEdit->setClickMessage( i18nc( "@label", "Attachment name" ) );
  mLabelEdit->setToolTip(
    i18nc( "@info:tooltip", "Give the attachment a name" ) );
  mLabelEdit->setWhatsThis(
    i18nc( "@info:whatsthis", "Type any string you desire here for the name of the attachment" ) );
  grid->addWidget( mLabelEdit, 0, 2 );

  KSeparator *sep = new KSeparator( Qt::Horizontal, page );
  grid->addWidget( sep, 1, 0, 1, 3 );

  QLabel *label = new QLabel( i18nc( "@label", "Type:" ), page );
  grid->addWidget( label, 2, 0 );
  QString typecomment = item->mimeType().isEmpty() ?
                        i18nc( "@label unknown mimetype", "Unknown" ) :
                        KMimeType::mimeType( item->mimeType() )->comment();
  mTypeLabel = new QLabel( typecomment, page );
  grid->addWidget( mTypeLabel, 2, 2 );
  mMimeType = KMimeType::mimeType( item->mimeType() );

  mInline = new QCheckBox( i18nc( "@option:check", "Store attachment inline" ), page );
  grid->addWidget( mInline, 3, 0, 1, 3 );
  mInline->setChecked( item->isBinary() );
  mInline->setToolTip(
    i18nc( "@info:tooltip", "Store the attachment file inside the calendar" ) );
  mInline->setWhatsThis(
    i18nc( "@info:whatsthis",
           "Checking this option will cause the attachment to be stored inside "
           "your calendar, which can take a lot of space depending on the size "
           "of the attachment. If this option is not checked, then only a link "
           "pointing to the attachment will be stored.  Do not use a link for "
           "attachments that change often or may be moved (or removed) from "
           "their current location." ) );

  if ( item->attachment()->isUri() ) {
    label = new QLabel( i18nc( "@label", "Location:" ), page );
    grid->addWidget( label, 4, 0 );
    mURLRequester = new KUrlRequester( item->uri(), page );
    mURLRequester->setToolTip(
      i18nc( "@info:tooltip", "Provide a location for the attachment file" ) );
    mURLRequester->setWhatsThis(
      i18nc( "@info:whatsthis",
             "Enter the path to the attachment file or use the file browser "
             "by pressing the adjacent button" ) );
    grid->addWidget( mURLRequester, 4, 2 );
    connect( mURLRequester, SIGNAL(urlSelected(const KUrl &)),
             SLOT(urlChanged(const KUrl &)) );
    connect( mURLRequester, SIGNAL( textChanged( const QString& ) ),
             SLOT( urlChanged( const QString& ) ) );
    urlChanged( item->uri() );
  } else {
    grid->addWidget( new QLabel( i18nc( "@label", "Size:" ), page ), 4, 0 );
    grid->addWidget( new QLabel( QString::fromLatin1( "%1 (%2)" ).
                                 arg( KIO::convertSize( item->attachment()->size() ) ).
                                 arg( KGlobal::locale()->formatNumber(
                                        item->attachment()->size(), 0 ) ), page ), 4, 2 );
  }
  vbl->addStretch( 10 );
}
Ejemplo n.º 11
0
int QWebView::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: loadStarted(); break;
        case 1: loadProgress((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: loadFinished((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 3: titleChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 4: statusBarMessage((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        case 5: linkClicked((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        case 6: selectionChanged(); break;
        case 7: iconChanged(); break;
        case 8: urlChanged((*reinterpret_cast< const QUrl(*)>(_a[1]))); break;
        case 9: stop(); break;
        case 10: back(); break;
        case 11: forward(); break;
        case 12: reload(); break;
        case 13: print((*reinterpret_cast< QPrinter*(*)>(_a[1]))); break;
        case 14: d->_q_pageDestroyed(); break;
        default: ;
        }
        _id -= 15;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QString*>(_v) = title(); break;
        case 1: *reinterpret_cast< QUrl*>(_v) = url(); break;
        case 2: *reinterpret_cast< QIcon*>(_v) = icon(); break;
        case 3: *reinterpret_cast< QString*>(_v) = selectedText(); break;
        case 4: *reinterpret_cast< bool*>(_v) = isModified(); break;
        case 5: *reinterpret_cast< qreal*>(_v) = textSizeMultiplier(); break;
        case 6: *reinterpret_cast< qreal*>(_v) = zoomFactor(); break;
        case 7: *reinterpret_cast<int*>(_v) = QFlag(renderHints()); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: setUrl(*reinterpret_cast< QUrl*>(_v)); break;
        case 5: setTextSizeMultiplier(*reinterpret_cast< qreal*>(_v)); break;
        case 6: setZoomFactor(*reinterpret_cast< qreal*>(_v)); break;
        case 7: setRenderHints(QFlag(*reinterpret_cast<int*>(_v))); break;
        }
        _id -= 8;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 8;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 8;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
Ejemplo n.º 12
0
void WebView::emitChangedUrl()
{
    emit urlChanged(url());
}
Ejemplo n.º 13
0
PopupWindow::PopupWindow(PopupWebView* view)
    : QWidget()
    , m_view(view)
    , m_page(qobject_cast<PopupWebPage*>(view->page()))
    , m_search(0)
{
    m_layout = new QVBoxLayout(this);
    m_layout->setContentsMargins(0, 0, 0, 0);
    m_layout->setSpacing(0);

    m_locationBar = new PopupLocationBar(this);
    m_locationBar->setView(m_view);

    m_statusBar = new QStatusBar(this);
    m_statusBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);

    m_progressBar = new ProgressBar(m_statusBar);
    m_statusBar->addPermanentWidget(m_progressBar);
    m_progressBar->hide();

    m_view->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    m_statusBarMessage = new PopupStatusBarMessage(this);

    m_menuBar = new QMenuBar(this);

    QMenu* menuFile = new QMenu(tr("File"));
    menuFile->addAction(QIcon::fromTheme("document-save"), tr("&Save Page As..."), m_view, SLOT(savePageAs()))->setShortcut(QKeySequence("Ctrl+S"));
    menuFile->addAction(tr("Save Page Screen"), this, SLOT(savePageScreen()));
    menuFile->addAction(QIcon::fromTheme("mail-message-new"), tr("Send Link..."), m_view, SLOT(sendPageByMail()));
    menuFile->addAction(QIcon::fromTheme("document-print"), tr("&Print..."), m_view, SLOT(printPage()))->setShortcut(QKeySequence("Ctrl+P"));
    menuFile->addSeparator();
    menuFile->addAction(QIcon::fromTheme("window-close"), tr("Close"), this, SLOT(close()))->setShortcut(QKeySequence("Ctrl+W"));
    m_menuBar->addMenu(menuFile);

    m_menuEdit = new QMenu(tr("Edit"));
    m_menuEdit->addAction(QIcon::fromTheme("edit-undo"), tr("&Undo"), this, SLOT(editUndo()))->setShortcut(QKeySequence("Ctrl+Z"));
    m_menuEdit->addAction(QIcon::fromTheme("edit-redo"), tr("&Redo"), this, SLOT(editRedo()))->setShortcut(QKeySequence("Ctrl+Shift+Z"));
    m_menuEdit->addSeparator();
    m_menuEdit->addAction(QIcon::fromTheme("edit-cut"), tr("&Cut"), this, SLOT(editCut()))->setShortcut(QKeySequence("Ctrl+X"));
    m_menuEdit->addAction(QIcon::fromTheme("edit-copy"), tr("C&opy"), this, SLOT(editCopy()))->setShortcut(QKeySequence("Ctrl+C"));
    m_menuEdit->addAction(QIcon::fromTheme("edit-paste"), tr("&Paste"), this, SLOT(editPaste()))->setShortcut(QKeySequence("Ctrl+V"));
    m_menuEdit->addSeparator();
    m_menuEdit->addAction(QIcon::fromTheme("edit-select-all"), tr("Select All"), m_view, SLOT(selectAll()))->setShortcut(QKeySequence("Ctrl+A"));
    m_menuEdit->addAction(QIcon::fromTheme("edit-find"), tr("Find"), this, SLOT(searchOnPage()))->setShortcut(QKeySequence("Ctrl+F"));
    connect(m_menuEdit, SIGNAL(aboutToShow()), this, SLOT(aboutToShowEditMenu()));
    m_menuBar->addMenu(m_menuEdit);

    m_menuView = new QMenu(tr("View"));
    m_actionStop = m_menuView->addAction(qIconProvider->standardIcon(QStyle::SP_BrowserStop), tr("&Stop"), m_view, SLOT(stop()));
    m_actionStop->setShortcut(QKeySequence("Esc"));
    m_actionReload = m_menuView->addAction(qIconProvider->standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), m_view, SLOT(reload()));
    m_actionReload->setShortcut(QKeySequence("F5"));
    m_menuView->addSeparator();
    m_menuView->addAction(QIcon::fromTheme("zoom-in"), tr("Zoom &In"), m_view, SLOT(zoomIn()))->setShortcut(QKeySequence("Ctrl++"));
    m_menuView->addAction(QIcon::fromTheme("zoom-out"), tr("Zoom &Out"), m_view, SLOT(zoomOut()))->setShortcut(QKeySequence("Ctrl+-"));
    m_menuView->addAction(QIcon::fromTheme("zoom-original"), tr("Reset"), m_view, SLOT(zoomReset()))->setShortcut(QKeySequence("Ctrl+0"));
    m_menuView->addSeparator();
    m_menuView->addAction(QIcon::fromTheme("text-html"), tr("&Page Source"), m_view, SLOT(showSource()))->setShortcut(QKeySequence("Ctrl+U"));
    m_menuBar->addMenu(m_menuView);

    // Make shortcuts available even with hidden menubar
    QList<QAction*> actions = m_menuBar->actions();
    foreach(QAction * action, actions) {
        if (action->menu()) {
            actions += action->menu()->actions();
        }
        addAction(action);
    }

    m_layout->insertWidget(0, m_menuBar);
    m_layout->addWidget(m_locationBar);
    m_layout->addWidget(m_view);
    m_layout->addWidget(m_statusBar);
    setLayout(m_layout);

    connect(m_view, SIGNAL(showNotification(QWidget*)), this, SLOT(showNotification(QWidget*)));
    connect(m_view, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged()));
    connect(m_view, SIGNAL(urlChanged(QUrl)), m_locationBar, SLOT(showUrl(QUrl)));
    connect(m_view, SIGNAL(iconChanged()), m_locationBar, SLOT(showIcon()));
    connect(m_view, SIGNAL(statusBarMessage(QString)), this, SLOT(showStatusBarMessage(QString)));
    connect(m_view, SIGNAL(loadStarted()), this, SLOT(loadStarted()));
    connect(m_view, SIGNAL(loadProgress(int)), this, SLOT(loadProgress(int)));
    connect(m_view, SIGNAL(loadFinished(bool)), this, SLOT(loadFinished()));

    connect(m_page, SIGNAL(linkHovered(QString, QString, QString)), this, SLOT(showStatusBarMessage(QString)));
    connect(m_page, SIGNAL(geometryChangeRequested(QRect)), this, SLOT(setWindowGeometry(QRect)));
    connect(m_page, SIGNAL(statusBarVisibilityChangeRequested(bool)), this, SLOT(setStatusBarVisibility(bool)));
    connect(m_page, SIGNAL(menuBarVisibilityChangeRequested(bool)), this, SLOT(setMenuBarVisibility(bool)));
    connect(m_page, SIGNAL(toolBarVisibilityChangeRequested(bool)), this, SLOT(setToolBarVisibility(bool)));

    m_view->setFocus();
    titleChanged();

    QUrl urlToShow = m_view->url();
    if (urlToShow.isEmpty()) {
        urlToShow = m_view->page()->mainFrame()->requestedUrl();
    }

    m_locationBar->showUrl(urlToShow);

    // Ensuring correct sizes for widgets in layout are calculated even
    // before calling QWidget::show()
    m_layout->invalidate();
    m_layout->activate();
}
Ejemplo n.º 14
0
void WebBrowser::setUrl(const QUrl url)
{
    m_url = url;
    emit urlChanged(m_url);
}
Ejemplo n.º 15
0
void Image::parseDetails()
{
	m_loadingDetails = false;

	// Aborted
	if (m_loadDetails->error() == QNetworkReply::OperationCanceledError)
	{
		m_loadDetails->deleteLater();
		m_loadDetails = nullptr;
		return;
	}

	// Check redirection
	QUrl redir = m_loadDetails->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
	if (!redir.isEmpty())
	{
		m_pageUrl = redir;
		loadDetails();
		return;
	}

	int statusCode = m_loadDetails->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
	if (statusCode == 429)
	{
		log(QStringLiteral("Details limit reached (429). New try."));
		loadDetails(true);
		return;
	}

	QString source = QString::fromUtf8(m_loadDetails->readAll());

	// Get an api able to parse details
	Api *api = m_parentSite->detailsApi();
	if (api == Q_NULLPTR)
		return;

	// Parse source
	ParsedDetails ret = api->parseDetails(source, m_parentSite);
	if (!ret.error.isEmpty())
	{
		log(QStringLiteral("[%1][%2] %3").arg(m_parentSite->url(), api->getName(), ret.error), Logger::Warning);
		emit finishedLoadingTags();
		return;
	}

	// Fill data from parsing result
	if (!ret.pools.isEmpty())
	{ m_pools = ret.pools; }
	if (!ret.tags.isEmpty())
	{ m_tags = ret.tags; }
	if (ret.createdAt.isValid())
	{ m_createdAt = ret.createdAt; }

	// Image url
	if (!ret.imageUrl.isEmpty())
	{
		QString before = m_url;

		QUrl newUrl = m_parentSite->fixUrl(ret.imageUrl, before);
		m_url = newUrl.toString();
		m_fileUrl = newUrl;

		if (before != m_url)
		{
			delete m_extensionRotator;
			m_extensionRotator = nullptr;
			setFileSize(0);
			emit urlChanged(before, m_url);
		}
	}

	// Get rating from tags
	if (m_rating.isEmpty())
	{
		int ratingTagIndex = -1;
		for (int it = 0; it < m_tags.count(); ++it)
		{
			if (m_tags[it].type().name() == "rating")
			{
				m_rating = m_tags[it].text();
				ratingTagIndex = it;
				break;
			}
		}
		if (ratingTagIndex != -1)
		{ m_tags.removeAt(ratingTagIndex); }
	}

	m_loadDetails->deleteLater();
	m_loadDetails = nullptr;
	m_loadedDetails = true;

	refreshTokens();

	emit finishedLoadingTags();
}
Ejemplo n.º 16
0
void CDoodFileViewManager::setUrl(QString data)
{
    setField(mUrl,data,"url");
    emit urlChanged();
}
            this, SLOT(currentChanged(int)));
        return 0;
    }

    // webview
    WebView *webView = new WebView;
    urlLineEdit->setWebView(webView);
    connect(webView, SIGNAL(loadStarted()),
            this, SLOT(webViewLoadStarted()));
    connect(webView, SIGNAL(loadFinished(bool)),
            this, SLOT(webViewIconChanged()));
    connect(webView, SIGNAL(iconChanged()),
            this, SLOT(webViewIconChanged()));
    connect(webView, SIGNAL(titleChanged(QString)),
            this, SLOT(webViewTitleChanged(QString)));
    connect(webView, SIGNAL(urlChanged(QUrl)),
            this, SLOT(webViewUrlChanged(QUrl)));
    connect(webView->page(), SIGNAL(windowCloseRequested()),
            this, SLOT(windowCloseRequested()));
    connect(webView->page(), SIGNAL(geometryChangeRequested(QRect)),
            this, SIGNAL(geometryChangeRequested(QRect)));
    connect(webView->page(), SIGNAL(printRequested(QWebFrame*)),
            this, SIGNAL(printRequested(QWebFrame*)));
    connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
            this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
    connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)),
            this, SIGNAL(statusBarVisibilityChangeRequested(bool)));
    connect(webView->page(), SIGNAL(toolBarVisibilityChangeRequested(bool)),
            this, SIGNAL(toolBarVisibilityChangeRequested(bool)));
    addTab(webView, tr("(Untitled)"));
    if (makeCurrent)
Ejemplo n.º 18
0
void PulseAudioModel::selectPlayer()
{
	m_url = "PlayerSelectionPage.qml";

	emit urlChanged();
}
Ejemplo n.º 19
0
void HnModelItem::setUrl(const QUrl &url)
{
    m_url = url;
    emit urlChanged();
}
Ejemplo n.º 20
0
void HttpPostCommand::setUrl(const QString& url)
{
    this->url = url;
    emit urlChanged(this->url);
}
Ejemplo n.º 21
0
void QCefWebView::OnAddressChange(const QString& url) {
    //qDebug() << __FUNCTION__ << url;
    emit urlChanged(QUrl(url));
}
void ShareableImageItem::setUrl(QUrl url)
{
    if (m_url == url) return;
    m_url = url;
    emit urlChanged(url);
}
Ejemplo n.º 23
0
void ProjectViewItem::slotURLChanged(KileDocument::Info*, const QUrl &url)
{
	urlChanged(url);
}
Ejemplo n.º 24
0
void FakeWebView::load(const QUrl &url)
{
    emit ( urlChanged( url ) );
}
Ejemplo n.º 25
0
SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent) {

  okButton = new QPushButton(tr("&OK"));
  connect(okButton, SIGNAL(clicked()), this, SLOT(okButtonClicked()));
  okButton->setEnabled(false);
  cancelButton = new QPushButton(tr("&Cancel"));
  connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelButtonClicked()));

  host = "";
  port = "";
  url  = "";
  autoRefresh = Qt::Unchecked;
  interval = 3;

  hostLineEdit = new QLineEdit();
  hostLineEdit->setText(host);
  connect(hostLineEdit, SIGNAL(textChanged(QString)), this, SLOT(hostChanged(QString)));
  portLineEdit = new QLineEdit();
  portLineEdit->setText(port);
  connect(portLineEdit, SIGNAL(textChanged(QString)), this, SLOT(portChanged(QString)));
  urlLineEdit  = new QLineEdit();
  urlLineEdit->setText(url);
  connect(urlLineEdit, SIGNAL(textChanged(QString)), this, SLOT(urlChanged(QString)));
  intervalSpinBox = new QSpinBox();
  intervalSpinBox->setMaximum(600);
  intervalSpinBox->setMinimum(3);
  intervalSpinBox->setValue(interval);
  intervalSpinBox->setEnabled(false);
  connect(intervalSpinBox, SIGNAL(valueChanged(int)), this, SLOT(intervalChanged(int)));
  autoRefreshCheckBox = new QCheckBox();
  autoRefreshCheckBox->setCheckState(autoRefresh); 
  connect(autoRefreshCheckBox, SIGNAL(stateChanged(int)), this, SLOT(autoRefreshChanged(int)));
  

  hostLabel = new QLabel(tr("Host name: "));
  hostLabel->setBuddy(hostLineEdit);
  portLabel = new QLabel(tr("Port: "));
  portLabel->setBuddy(portLineEdit);
  urlLabel  = new QLabel(tr("URL: "));
  urlLabel->setBuddy(urlLineEdit);
  intervalLabel = new QLabel(tr("Interval: "));
  intervalLabel->setBuddy(intervalSpinBox);
  autoRefreshLabel = new QLabel(tr("Auto Refresh: "));
  autoRefreshLabel->setBuddy(autoRefreshCheckBox);


  //Layouts
  QHBoxLayout *buttonsLayout = new QHBoxLayout();
  buttonsLayout->addWidget(okButton);
  buttonsLayout->addWidget(cancelButton);

  QHBoxLayout *hostLayout = new QHBoxLayout();
  hostLayout->addWidget(hostLabel);
  hostLayout->addWidget(hostLineEdit);

  QHBoxLayout *portLayout = new QHBoxLayout();
  portLayout->addWidget(portLabel);
  portLayout->addWidget(portLineEdit);

  QHBoxLayout *urlLayout = new QHBoxLayout();
  urlLayout->addWidget(urlLabel);
  urlLayout->addWidget(urlLineEdit);

  QHBoxLayout *autoRefreshLayout = new QHBoxLayout();
  autoRefreshLayout->addWidget(autoRefreshLabel);
  autoRefreshLayout->addWidget(autoRefreshCheckBox);

  QHBoxLayout *intervalLayout = new QHBoxLayout();
  intervalLayout->addWidget(intervalLabel);
  intervalLayout->addWidget(intervalSpinBox);

  QVBoxLayout *itemsLayout = new QVBoxLayout();
  itemsLayout->addLayout(hostLayout);
  itemsLayout->addLayout(portLayout);
  itemsLayout->addLayout(urlLayout);
  itemsLayout->addLayout(autoRefreshLayout);
  itemsLayout->addLayout(intervalLayout);
  
  QVBoxLayout *mainLayout = new QVBoxLayout();
  mainLayout->addLayout(itemsLayout);
  mainLayout->addLayout(buttonsLayout);

  setLayout(mainLayout);
};
Ejemplo n.º 26
0
void FakeWebView::setUrl(const QUrl &url)
{
    emit ( urlChanged( url ) );
}
Ejemplo n.º 27
0
void DirModel::openUrl(const QString& url)
{
    d->m_lister->openUrl(url);
    d->m_url = url;
    emit urlChanged();
}
Ejemplo n.º 28
0
void TextInfo::slotFileNameChanged()
{
	emit urlChanged(this, url());
}
Ejemplo n.º 29
0
void SkyboxPropertyGroup::debugDump() const {
    qCDebug(entities) << "   SkyboxPropertyGroup: ---------------------------------------------";
    qCDebug(entities) << "       Color:" << getColor() << " has changed:" << colorChanged();
    qCDebug(entities) << "       URL:" << getURL() << " has changed:" << urlChanged();
}
Ejemplo n.º 30
0
MainWindow::MainWindow(QString file_adress, QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    process = new QProcess(this);

    pfad = QCoreApplication::applicationDirPath();

    QString buffer = QCoreApplication::applicationDirPath();
    buffer.append("\\update.exe");

    if(QFile::exists(buffer) == true)
    {
        QDesktopServices::openUrl(QUrl::fromLocalFile(buffer));

        process->terminate();

    }

    QSplashScreen *splash = new QSplashScreen(QPixmap(":/tbicons/img/logo.png"), Qt::WindowStaysOnTopHint);
    splash->show();
    splash->showMessage("Laden...", Qt::AlignBottom | Qt::AlignCenter);

    ui->setupUi(this);
    this->hide();

    set = new settings(this);
    icon = new favicon(this);
    search_result = new gsuggests(ui->lineEdit);
    versionspruefung = new update_vers(this);
    versionspruefung->run_request_for_for_update();
    cookie = new cookiejar(this, set->en_cookies);
    bok = new bookmarks(this, ui->tree_bookmarks, ui->but_hinzu, ui->but_edit, ui->but_addFolder);
    download = new DownloadManager(this, qnam);

    m_faviconTimer = new QTimer(this);
    m_editorTimer = new QTimer(this);


    qnam = new QNetworkAccessManager(this);
    page = new QWebPage(this);

    ui->webView->setPage(page);
    ui->webView->page()->setNetworkAccessManager(qnam);
    QWebSettings::setIconDatabasePath(pfad);
    QWebSettings::setOfflineStoragePath((pfad + tr("\\offline_cache")));

    QString cache_path = pfad;
    cache_path.append("\\cache");
    cache = new QNetworkDiskCache(qnam);
    cache->setCacheDirectory(cache_path);
    qnam->setCache(cache);

    qnam->setCookieJar(cookie);


    // Bei klick auf Hme Button oder F6 funktion home aufrufen
    connect(ui->home_button, SIGNAL(clicked()), this, SLOT(home()));
    //Bei einem ändern der URl die neu_address auf rufen
    connect(ui->webView, SIGNAL(urlChanged(QUrl)), this, SLOT(neu_adresse(QUrl)));

    connect(ui->lineEdit, SIGNAL(returnPressed()), this, SLOT(neu_adresse_ein()));

    connect(ui->webView, SIGNAL(loadStarted()), this, SLOT(load_in_progress()));

    connect(ui->webView, SIGNAL(loadFinished(bool)), this, SLOT(load_finished(bool)));

    connect(ui->reload_button, SIGNAL(clicked()), this, SLOT(reload_button()));

    connect(ui->webView, SIGNAL(iconChanged()), this, SLOT(icon_changed()));

    connect(ui->webView, SIGNAL(titleChanged(QString)), this, SLOT(titelChanged(QString)));

    connect(ui->but_book, SIGNAL(clicked()), this, SLOT(showBar()));

    connect(ui->webView, SIGNAL(loadProgress(int)), ui->barLoadProgress, SLOT(setValue(int)));

    connect(ui->sliderrSiteZoom, SIGNAL(valueChanged(int)), this, SLOT(sliderSliding(int)));
    connect(ui->butSetZoomToNorm, SIGNAL(clicked()), this, SLOT(sliderSliding()));

    //für bookmarks
    connect(ui->tree_bookmarks, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(openBookmark(QTreeWidgetItem*, int)));

    //connections für favicons
    connect(icon, SIGNAL(neuer_icon()), this, SLOT(neuer_icon()));
    connect(icon, SIGNAL(standart_icon()), this, SLOT(set_standart_icon()));
    connect(m_faviconTimer, SIGNAL(timeout()), this, SLOT(lookForNewFavicon()));

    //connections für settings
    connect(ui->but_settings, SIGNAL(clicked()), set, SLOT(show()));
    connect(set, SIGNAL(requestForValues()), this, SLOT(returnRequestedValues()));
    connect(set, SIGNAL(settingsChagned()), this, SLOT(settingsChanged()));
    connect(set, SIGNAL(requestForCurrentPage()), this, SLOT(requestForCurrentPage()));
    connect(set->ui->but_cl_cache, SIGNAL(clicked()), this, SLOT(requestForCacheClearing()));
    //für qnam
    connect(qnam, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authentification_requied(QNetworkReply*,QAuthenticator*)));

    //für downloads
    connect(page, SIGNAL(downloadRequested(QNetworkRequest)), download, SLOT(Download(QNetworkRequest)));
    connect(ui->butDownloadManager, SIGNAL(clicked()), download, SLOT(show()));

    ui->lineEdit->installEventFilter(this);

    if(file_adress != NULL)
        ui->webView->load(QUrl(file_adress));
    else
    {
        if(!set->en_homePage)
            ui->webView->load(QUrl(set->lastUrl));
        else
            ui->webView->load(QUrl(set->path_cur_home));
    }

    this->resize(set->size);
    this->move(set->point);
    if(set->en_max)
        this->showMaximized();

    if(!set->en_treeBar)
        ui->tabWidget->hide();


    splash->finish(this);
    this->show();

    m_faviconTimer->start(3000);
    shutted = true;


}