]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphincontroller.cpp
As requested by Peter: upgrade version to 1.0
[dolphin.git] / src / dolphincontroller.cpp
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz (peter.penz@gmx.at) *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20 #include "dolphincontroller.h"
21
22 DolphinController::DolphinController(DolphinView* dolphinView) :
23 QObject(dolphinView),
24 m_zoomInPossible(false),
25 m_zoomOutPossible(false),
26 m_url(),
27 m_dolphinView(dolphinView)
28 {
29 }
30
31 DolphinController::~DolphinController()
32 {
33 }
34
35 void DolphinController::setUrl(const KUrl& url)
36 {
37 if (m_url != url) {
38 m_url = url;
39 emit urlChanged(url);
40 }
41 }
42
43 void DolphinController::triggerUrlChangeRequest(const KUrl& url)
44 {
45 if (m_url != url) {
46 emit requestUrlChange(url);
47 }
48 }
49
50 void DolphinController::triggerContextMenuRequest(const QPoint& pos)
51 {
52 emit activated();
53 emit requestContextMenu(pos);
54 }
55
56 void DolphinController::requestActivation()
57 {
58 emit activated();
59 }
60
61 void DolphinController::indicateDroppedUrls(const KUrl::List& urls,
62 const KUrl& destPath,
63 const KFileItem& destItem)
64 {
65 emit urlsDropped(urls, destPath, destItem);
66 }
67
68
69 void DolphinController::indicateSortingChange(DolphinView::Sorting sorting)
70 {
71 emit sortingChanged(sorting);
72 }
73
74 void DolphinController::indicateSortOrderChange(Qt::SortOrder order)
75 {
76 emit sortOrderChanged(order);
77 }
78
79 void DolphinController::indicateAdditionalInfoChange(const KFileItemDelegate::InformationList& info)
80 {
81 emit additionalInfoChanged(info);
82 }
83
84 void DolphinController::indicateActivationChange(bool active)
85 {
86 emit activationChanged(active);
87 }
88
89 void DolphinController::triggerZoomIn()
90 {
91 emit zoomIn();
92 }
93
94 void DolphinController::triggerZoomOut()
95 {
96 emit zoomOut();
97 }
98
99 void DolphinController::triggerItem(const KFileItem& item)
100 {
101 emit itemTriggered(item);
102 }
103
104 void DolphinController::emitItemEntered(const KFileItem& item)
105 {
106 emit itemEntered(item);
107 }
108
109 void DolphinController::emitViewportEntered()
110 {
111 emit viewportEntered();
112 }
113
114 #include "dolphincontroller.moc"