From 089abd62383516eb33cbc1c93b06826a0cba3d7b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 3 Jul 2017 14:47:24 +0200 Subject: Added homepage and newtab to profile widget --- src/forms/profileview.cpp | 18 ++++--- src/forms/profileview.ui | 116 ++++++++++++++++++++++++++++------------------ 2 files changed, 82 insertions(+), 52 deletions(-) (limited to 'src/forms') diff --git a/src/forms/profileview.cpp b/src/forms/profileview.cpp index 9d2e9ed..cece4e4 100644 --- a/src/forms/profileview.cpp +++ b/src/forms/profileview.cpp @@ -30,6 +30,8 @@ #include +#include + ProfileView::ProfileView(WebEngineProfile *profile, QWidget *parent) : QWidget(parent), ui(new Ui::ProfileView) @@ -58,16 +60,17 @@ void ProfileView::setProfile(WebEngineProfile *profile) if(!profile) { return; } + //Q_ASSERT(profile); _profile = profile; - if(!_profile->storageName().isEmpty()) { - setWindowTitle(_profile->storageName()); - } else { - setWindowTitle(tr("Off-the-record")); - } + setWindowTitle(_profile->name()); m_cookiesForm = new CookiesForm(_profile->cookieStore(), this); - ui->tabWidget->addTab(m_cookiesForm, m_cookiesForm->windowTitle()); + //ui->tabWidget->addTab(m_cookiesForm, m_cookiesForm->windowTitle()); + + // general + ui->homepage_lineEdit->setText(_profile->homepage().toString()); + ui->newtab_lineEdit->setText(_profile->newtab().toString()); // http ui->userAgent->setPlainText(_profile->httpUserAgent()); @@ -81,6 +84,9 @@ void ProfileView::setProfile(WebEngineProfile *profile) // policy ui->cookiePolicy->setCurrentIndex(_profile->persistentCookiesPolicy()); + + //ui->formLayout_3->addWidget(m_cookiesForm); + ui->verticalLayout_3->addWidget(m_cookiesForm); } void ProfileView::showProfile() diff --git a/src/forms/profileview.ui b/src/forms/profileview.ui index e7bcbae..bed045a 100644 --- a/src/forms/profileview.ui +++ b/src/forms/profileview.ui @@ -25,6 +25,33 @@ 0 + + + General + + + + + + Homepage + + + + + + + + + + Newtab + + + + + + + + HTTP @@ -86,79 +113,83 @@ - - - - - Paths - - - - + + Storage Path - + false - - + + Cache Path - + false + + + + Clear Cache + + + - Policies + Cookies - - - - - Cookies - - - - - - - - No Persistent Cookies - - - - - Allow Persistent Cookies - + + + + + + + Cookies + + - - - Force Persistent Cookies - + + + + + No Persistent Cookies + + + + + Allow Persistent Cookies + + + + + Force Persistent Cookies + + + - + - Actions + History @@ -168,13 +199,6 @@ - - - - Clear Cache - - - -- cgit v1.2.1