summaryrefslogtreecommitdiff
path: root/src/tabwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-07-23 17:56:30 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:04 +0100
commit36b5ff88b15d8793c64ad1a361ea0c28f9cbe169 (patch)
tree55dad28e2578e9ef6a3bbde5d85f7b2ecc84ba57 /src/tabwindow
parentTabWindow, first import :) (diff)
downloadrekonq-36b5ff88b15d8793c64ad1a361ea0c28f9cbe169.tar.xz
Coding style
Diffstat (limited to 'src/tabwindow')
-rw-r--r--src/tabwindow/tabbar.cpp10
-rw-r--r--src/tabwindow/tabbar.h4
-rw-r--r--src/tabwindow/tabwindow.cpp20
-rw-r--r--src/tabwindow/tabwindow.h6
4 files changed, 20 insertions, 20 deletions
diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp
index 06b90897..bcb39b10 100644
--- a/src/tabwindow/tabbar.cpp
+++ b/src/tabwindow/tabbar.cpp
@@ -38,7 +38,7 @@ TabBar::TabBar(QWidget *parent)
setTabsClosable(true);
setMovable(true);
setAcceptDrops(true);
-
+
// avoid ambiguos shortcuts. See BUG:275858
KAcceleratorManager::setNoAccel(this);
@@ -144,9 +144,9 @@ void TabBar::reopenLastClosedTab()
void TabBar::contextMenu(int tab, const QPoint &pos)
{
TabWindow *w = qobject_cast<TabWindow *>(parent());
-
+
KAction *a;
-
+
KMenu menu;
a = new KAction(KIcon("tab-new"), i18n("New &Tab"), this);
@@ -187,7 +187,7 @@ void TabBar::contextMenu(int tab, const QPoint &pos)
a->setData(tab);
menu.addAction(a);
}
-
+
menu.addSeparator();
@@ -206,7 +206,7 @@ void TabBar::contextMenu(int tab, const QPoint &pos)
a = new KAction(KIcon("bookmark-new"), i18n("Bookmark"), this);
menu.addAction(a);
}
-
+
menu.exec(pos);
}
diff --git a/src/tabwindow/tabbar.h b/src/tabwindow/tabbar.h
index e3bf6d9a..9de5fe0a 100644
--- a/src/tabwindow/tabbar.h
+++ b/src/tabwindow/tabbar.h
@@ -34,7 +34,7 @@ public:
TabBar(QWidget *parent);
static const int genericTabNumber = 6;
-
+
protected:
virtual QSize tabSizeHint(int index) const;
@@ -45,7 +45,7 @@ Q_SIGNALS:
void reloadTab(int);
void detachTab(int);
void restoreClosedTab(int);
-
+
private Q_SLOTS:
void cloneTab();
void closeTab();
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp
index 4a9a8abf..772fe3e2 100644
--- a/src/tabwindow/tabwindow.cpp
+++ b/src/tabwindow/tabwindow.cpp
@@ -84,13 +84,13 @@ TabWindow::TabWindow(QWidget *parent)
connect(_addTabButton, SIGNAL(triggered(QAction *)), this, SLOT(newCleanTab()));
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
-
+
// FIXME: Manage sizes...
kDebug() << "SIZE: " << size();
kDebug() << "SIZE HINT: " << sizeHint();
resize(sizeHint());
-
+
}
@@ -135,7 +135,7 @@ WebWindow *TabWindow::prepareNewTab(WebPage *page)
tab = new WebWindow(page, this);
else
tab = new WebWindow(this);
-
+
connect(tab, SIGNAL(titleChanged(QString)), this, SLOT(tabTitleChanged(QString)));
connect(tab, SIGNAL(loadStarted()), this, SLOT(tabLoadStarted()));
@@ -157,12 +157,12 @@ void TabWindow::loadUrlInNewTab(const QUrl &url, TabHistory *history)
tab->load(url);
setCurrentWidget(tab);
-
+
if (history)
{
history->applyHistory(tab->page()->history());
}
-
+
updateTabBar();
}
@@ -227,7 +227,7 @@ void TabWindow::updateTabBar()
_addTabButton->move(tabBarWidth, 0);
_addTabButton->show();
- }
+ }
}
@@ -295,13 +295,13 @@ void TabWindow::tabLoadProgress(int p)
void TabWindow::tabLoadFinished(bool ok)
{
Q_UNUSED(ok);
-
+
WebWindow *tab = qobject_cast<WebWindow *>(sender());
if (!tab)
return;
int index = indexOf(tab);
-
+
if (-1 != index)
{
QLabel *label = qobject_cast<QLabel* >(tabBar()->tabButton(index, QTabBar::LeftSide));
@@ -326,7 +326,7 @@ void TabWindow::cloneTab(int index)
QUrl u = webWindow(index)->url();
QWebHistory* history = webWindow(index)->page()->history();
TabHistory tHistory(history);
-
+
loadUrlInNewTab(u, &tHistory);
}
@@ -366,7 +366,7 @@ void TabWindow::closeTab(int index, bool del)
m_recentlyClosedTabs.removeLast();
m_recentlyClosedTabs.prepend(history);
}
-
+
removeTab(index);
updateTabBar(); // UI operation: do it ASAP!!
diff --git a/src/tabwindow/tabwindow.h b/src/tabwindow/tabwindow.h
index 147fac40..65746fe7 100644
--- a/src/tabwindow/tabwindow.h
+++ b/src/tabwindow/tabwindow.h
@@ -50,7 +50,7 @@ public:
WebWindow* webWindow(int index) const;
TabBar* tabBar() const;
-
+
public Q_SLOTS:
void loadUrlInNewTab(const QUrl &, TabHistory *history = 0);
void newCleanTab();
@@ -65,7 +65,7 @@ private:
* Prepares the new WebWindow to be open
*/
WebWindow *prepareNewTab(WebPage *page = 0);
-
+
private Q_SLOTS:
void tabTitleChanged(const QString &);
@@ -84,7 +84,7 @@ private Q_SLOTS:
void reloadTab(int index = -1);
void reloadAllTabs();
void restoreClosedTab(int i);
-
+
protected:
virtual void resizeEvent(QResizeEvent *);