1 /***************************************************************************
2 * Copyright (C) 2007 by Peter Penz <peter.penz19@gmail.com> *
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. *
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. *
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 ***************************************************************************/
20 #include "dolphinviewcontainer.h"
21 #include <KProtocolManager>
23 #include <QApplication>
25 #include <QItemSelection>
31 #include <KDesktopFile>
32 #include <KFileItemDelegate>
33 #include <KFileItemActions>
34 #include <KFilePlacesModel>
36 #include <KIconEffect>
37 #include <KIO/NetAccess>
38 #include <KIO/PreviewJob>
39 #include <KMessageWidget>
40 #include <KNewFileMenu>
41 #include <konqmimedata.h>
42 #include <konq_operations.h>
45 #include <KUrlComboBox>
46 #include <KUrlNavigator>
49 #ifdef KActivities_FOUND
50 #include <KActivities/ResourceInstance>
53 #include "dolphin_generalsettings.h"
54 #include "filterbar/filterbar.h"
55 #include "search/dolphinsearchbox.h"
56 #include "statusbar/dolphinstatusbar.h"
57 #include "views/draganddrophelper.h"
58 #include "views/viewmodecontroller.h"
59 #include "views/viewproperties.h"
61 DolphinViewContainer::DolphinViewContainer(const KUrl
& url
, QWidget
* parent
) :
71 m_statusBarTimestamp(),
72 m_autoGrabFocus(true),
75 #ifdef KActivities_FOUND
76 , m_activityResourceInstance(0)
81 m_topLayout
= new QVBoxLayout(this);
82 m_topLayout
->setSpacing(0);
83 m_topLayout
->setMargin(0);
85 m_urlNavigator
= new KUrlNavigator(new KFilePlacesModel(this), url
, this);
86 connect(m_urlNavigator
, SIGNAL(urlsDropped(KUrl
,QDropEvent
*)),
87 this, SLOT(dropUrls(KUrl
,QDropEvent
*)));
88 connect(m_urlNavigator
, SIGNAL(activated()),
89 this, SLOT(activate()));
90 connect(m_urlNavigator
->editor(), SIGNAL(completionModeChanged(KCompletion::CompletionMode
)),
91 this, SLOT(saveUrlCompletionMode(KCompletion::CompletionMode
)));
93 const GeneralSettings
* settings
= GeneralSettings::self();
94 m_urlNavigator
->setUrlEditable(settings
->editableUrl());
95 m_urlNavigator
->setShowFullPath(settings
->showFullPath());
96 m_urlNavigator
->setHomeUrl(KUrl(settings
->homeUrl()));
97 KUrlComboBox
* editor
= m_urlNavigator
->editor();
98 editor
->setCompletionMode(KCompletion::CompletionMode(settings
->urlCompletionMode()));
100 m_searchBox
= new DolphinSearchBox(this);
102 connect(m_searchBox
, SIGNAL(activated()), this, SLOT(activate()));
103 connect(m_searchBox
, SIGNAL(closeRequest()), this, SLOT(closeSearchBox()));
104 connect(m_searchBox
, SIGNAL(searchRequest()), this, SLOT(startSearching()));
105 connect(m_searchBox
, SIGNAL(returnPressed(QString
)), this, SLOT(requestFocus()));
107 m_messageWidget
= new KMessageWidget(this);
108 m_messageWidget
->setCloseButtonVisible(true);
109 m_messageWidget
->hide();
111 m_view
= new DolphinView(url
, this);
112 connect(m_view
, SIGNAL(urlChanged(KUrl
)), m_urlNavigator
, SLOT(setUrl(KUrl
)));
113 connect(m_view
, SIGNAL(urlChanged(KUrl
)), m_messageWidget
, SLOT(hide()));
114 connect(m_view
, SIGNAL(writeStateChanged(bool)), this, SIGNAL(writeStateChanged(bool)));
115 connect(m_view
, SIGNAL(requestItemInfo(KFileItem
)), this, SLOT(showItemInfo(KFileItem
)));
116 connect(m_view
, SIGNAL(itemActivated(KFileItem
)), this, SLOT(slotItemActivated(KFileItem
)));
117 connect(m_view
, SIGNAL(itemsActivated(KFileItemList
)), this, SLOT(slotItemsActivated(KFileItemList
)));
118 connect(m_view
, SIGNAL(redirection(KUrl
,KUrl
)), this, SLOT(redirect(KUrl
,KUrl
)));
119 connect(m_view
, SIGNAL(directoryLoadingStarted()), this, SLOT(slotDirectoryLoadingStarted()));
120 connect(m_view
, SIGNAL(directoryLoadingCompleted()), this, SLOT(slotDirectoryLoadingCompleted()));
121 connect(m_view
, SIGNAL(directoryLoadingCanceled()), this, SLOT(slotDirectoryLoadingCanceled()));
122 connect(m_view
, SIGNAL(itemCountChanged()), this, SLOT(delayedStatusBarUpdate()));
123 connect(m_view
, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateDirectoryLoadingProgress(int)));
124 connect(m_view
, SIGNAL(directorySortingProgress(int)), this, SLOT(updateDirectorySortingProgress(int)));
125 connect(m_view
, SIGNAL(selectionChanged(KFileItemList
)), this, SLOT(delayedStatusBarUpdate()));
126 connect(m_view
, SIGNAL(urlAboutToBeChanged(KUrl
)), this, SLOT(slotViewUrlAboutToBeChanged(KUrl
)));
127 connect(m_view
, SIGNAL(errorMessage(QString
)), this, SLOT(showErrorMessage(QString
)));
128 connect(m_view
, SIGNAL(urlIsFileError(KUrl
)), this, SLOT(slotUrlIsFileError(KUrl
)));
130 connect(m_urlNavigator
, SIGNAL(urlAboutToBeChanged(KUrl
)),
131 this, SLOT(slotUrlNavigatorLocationAboutToBeChanged(KUrl
)));
132 connect(m_urlNavigator
, SIGNAL(urlChanged(KUrl
)),
133 this, SLOT(slotUrlNavigatorLocationChanged(KUrl
)));
134 connect(m_urlNavigator
, SIGNAL(historyChanged()),
135 this, SLOT(slotHistoryChanged()));
136 connect(m_urlNavigator
, SIGNAL(returnPressed()),
137 this, SLOT(slotReturnPressed()));
139 // Initialize status bar
140 m_statusBar
= new DolphinStatusBar(this);
141 m_statusBar
->setUrl(m_view
->url());
142 m_statusBar
->setZoomLevel(m_view
->zoomLevel());
143 connect(m_view
, SIGNAL(urlChanged(KUrl
)), m_statusBar
, SLOT(setUrl(KUrl
)));
144 connect(m_view
, SIGNAL(zoomLevelChanged(int,int)), m_statusBar
, SLOT(setZoomLevel(int)));
145 connect(m_view
, SIGNAL(infoMessage(QString
)), m_statusBar
, SLOT(setText(QString
)));
146 connect(m_view
, SIGNAL(operationCompletedMessage(QString
)), m_statusBar
, SLOT(setText(QString
)));
147 connect(m_statusBar
, SIGNAL(stopPressed()), this, SLOT(stopDirectoryLoading()));
148 connect(m_statusBar
, SIGNAL(zoomLevelChanged(int)), this, SLOT(slotStatusBarZoomLevelChanged(int)));
150 m_statusBarTimer
= new QTimer(this);
151 m_statusBarTimer
->setSingleShot(true);
152 m_statusBarTimer
->setInterval(300);
153 connect(m_statusBarTimer
, SIGNAL(timeout()), this, SLOT(updateStatusBar()));
155 KIO::FileUndoManager
* undoManager
= KIO::FileUndoManager::self();
156 connect(undoManager
, SIGNAL(jobRecordingFinished(CommandType
)),
157 this, SLOT(delayedStatusBarUpdate()));
159 // Initialize filter bar
160 m_filterBar
= new FilterBar(this);
161 m_filterBar
->setVisible(settings
->filterBar());
162 connect(m_filterBar
, SIGNAL(filterChanged(QString
)),
163 this, SLOT(setNameFilter(QString
)));
164 connect(m_filterBar
, SIGNAL(closeRequest()),
165 this, SLOT(closeFilterBar()));
166 connect(m_filterBar
, SIGNAL(focusViewRequest()),
167 this, SLOT(requestFocus()));
168 connect(m_view
, SIGNAL(urlChanged(KUrl
)),
169 m_filterBar
, SLOT(slotUrlChanged()));
171 m_topLayout
->addWidget(m_urlNavigator
);
172 m_topLayout
->addWidget(m_searchBox
);
173 m_topLayout
->addWidget(m_messageWidget
);
174 m_topLayout
->addWidget(m_view
);
175 m_topLayout
->addWidget(m_filterBar
);
176 m_topLayout
->addWidget(m_statusBar
);
178 setSearchModeEnabled(isSearchUrl(url
));
180 // Initialize kactivities resource instance
182 #ifdef KActivities_FOUND
183 m_activityResourceInstance
= new KActivities::ResourceInstance(
184 window()->winId(), url
);
185 m_activityResourceInstance
->setParent(this);
189 DolphinViewContainer::~DolphinViewContainer()
193 KUrl
DolphinViewContainer::url() const
195 return m_view
->url();
198 void DolphinViewContainer::setActive(bool active
)
200 m_searchBox
->setActive(active
);
201 m_urlNavigator
->setActive(active
);
202 m_view
->setActive(active
);
204 #ifdef KActivities_FOUND
206 m_activityResourceInstance
->notifyFocusedIn();
208 m_activityResourceInstance
->notifyFocusedOut();
213 bool DolphinViewContainer::isActive() const
215 Q_ASSERT(m_view
->isActive() == m_urlNavigator
->isActive());
216 return m_view
->isActive();
219 void DolphinViewContainer::setAutoGrabFocus(bool grab
)
221 m_autoGrabFocus
= grab
;
224 bool DolphinViewContainer::autoGrabFocus() const
226 return m_autoGrabFocus
;
229 const DolphinStatusBar
* DolphinViewContainer::statusBar() const
234 DolphinStatusBar
* DolphinViewContainer::statusBar()
239 const KUrlNavigator
* DolphinViewContainer::urlNavigator() const
241 return m_urlNavigator
;
244 KUrlNavigator
* DolphinViewContainer::urlNavigator()
246 return m_urlNavigator
;
249 const DolphinView
* DolphinViewContainer::view() const
254 DolphinView
* DolphinViewContainer::view()
259 void DolphinViewContainer::showMessage(const QString
& msg
, MessageType type
)
265 m_messageWidget
->setText(msg
);
268 case Information
: m_messageWidget
->setMessageType(KMessageWidget::Information
); break;
269 case Warning
: m_messageWidget
->setMessageType(KMessageWidget::Warning
); break;
270 case Error
: m_messageWidget
->setMessageType(KMessageWidget::Error
); break;
276 m_messageWidget
->setWordWrap(false);
277 const int unwrappedWidth
= m_messageWidget
->sizeHint().width();
278 m_messageWidget
->setWordWrap(unwrappedWidth
> size().width());
280 m_messageWidget
->animatedShow();
283 void DolphinViewContainer::readSettings()
285 if (GeneralSettings::modifiedStartupSettings()) {
286 // The startup settings should only get applied if they have been
287 // modified by the user. Otherwise keep the (possibly) different current
288 // settings of the URL navigator and the filterbar.
289 m_urlNavigator
->setUrlEditable(GeneralSettings::editableUrl());
290 m_urlNavigator
->setShowFullPath(GeneralSettings::showFullPath());
291 m_urlNavigator
->setHomeUrl(KUrl(GeneralSettings::homeUrl()));
292 setFilterBarVisible(GeneralSettings::filterBar());
295 m_view
->readSettings();
296 m_statusBar
->readSettings();
299 bool DolphinViewContainer::isFilterBarVisible() const
301 return m_filterBar
->isVisible();
304 void DolphinViewContainer::setSearchModeEnabled(bool enabled
)
306 if (enabled
== isSearchModeEnabled()) {
307 if (enabled
&& !m_searchBox
->hasFocus()) {
308 m_searchBox
->setFocus();
309 m_searchBox
->selectAll();
314 m_searchBox
->setVisible(enabled
);
315 m_urlNavigator
->setVisible(!enabled
);
318 KUrl url
= m_urlNavigator
->locationUrl();
319 m_searchBox
->setText(QString());
320 m_searchBox
->setReadOnly(isSearchUrl(url
), url
);
322 // Remember the most recent non-search URL as search path
323 // of the search-box, so that it can be restored
324 // when switching back to the URL navigator.
325 int index
= m_urlNavigator
->historyIndex();
326 const int historySize
= m_urlNavigator
->historySize();
327 while (isSearchUrl(url
) && (index
< historySize
)) {
329 url
= m_urlNavigator
->locationUrl(index
);
332 if (!isSearchUrl(url
)) {
333 m_searchBox
->setSearchPath(url
);
336 m_view
->setViewPropertiesContext(QString());
338 // Restore the URL for the URL navigator. If Dolphin has been
339 // started with a search-URL, the home URL is used as fallback.
340 const KUrl url
= m_searchBox
->searchPath();
341 if (url
.isValid() && !url
.isEmpty()) {
342 if (isSearchUrl(url
)) {
343 m_urlNavigator
->goHome();
345 m_urlNavigator
->setLocationUrl(url
);
351 bool DolphinViewContainer::isSearchModeEnabled() const
353 return m_searchBox
->isVisible();
356 QString
DolphinViewContainer::placesText() const
360 if (isSearchModeEnabled()) {
361 text
= m_searchBox
->searchPath().fileName() + QLatin1String(": ") + m_searchBox
->text();
363 text
= url().fileName();
364 if (text
.isEmpty()) {
372 void DolphinViewContainer::setUrl(const KUrl
& newUrl
)
374 if (newUrl
!= m_urlNavigator
->locationUrl()) {
375 m_urlNavigator
->setLocationUrl(newUrl
);
378 #ifdef KActivities_FOUND
379 m_activityResourceInstance
->setUri(newUrl
);
383 void DolphinViewContainer::setFilterBarVisible(bool visible
)
385 Q_ASSERT(m_filterBar
);
388 m_filterBar
->setFocus();
389 m_filterBar
->selectAll();
395 void DolphinViewContainer::delayedStatusBarUpdate()
397 if (m_statusBarTimer
->isActive() && (m_statusBarTimestamp
.elapsed() > 2000)) {
398 // No update of the statusbar has been done during the last 2 seconds,
399 // although an update has been requested. Trigger an immediate update.
400 m_statusBarTimer
->stop();
403 // Invoke updateStatusBar() with a small delay. This assures that
404 // when a lot of delayedStatusBarUpdates() are done in a short time,
405 // no bottleneck is given.
406 m_statusBarTimer
->start();
410 void DolphinViewContainer::updateStatusBar()
412 m_statusBarTimestamp
.start();
414 const QString text
= m_view
->statusBarText();
415 m_statusBar
->setDefaultText(text
);
416 m_statusBar
->resetToDefaultText();
419 void DolphinViewContainer::updateDirectoryLoadingProgress(int percent
)
421 if (m_statusBar
->progressText().isEmpty()) {
422 m_statusBar
->setProgressText(i18nc("@info:progress", "Loading folder..."));
424 m_statusBar
->setProgress(percent
);
427 void DolphinViewContainer::updateDirectorySortingProgress(int percent
)
429 if (m_statusBar
->progressText().isEmpty()) {
430 m_statusBar
->setProgressText(i18nc("@info:progress", "Sorting..."));
432 m_statusBar
->setProgress(percent
);
435 void DolphinViewContainer::slotDirectoryLoadingStarted()
437 if (isSearchUrl(url())) {
438 // Search KIO-slaves usually don't provide any progress information. Give
439 // a hint to the user that a searching is done:
441 m_statusBar
->setProgressText(i18nc("@info", "Searching..."));
442 m_statusBar
->setProgress(-1);
444 // Trigger an undetermined progress indication. The progress
445 // information in percent will be triggered by the percent() signal
446 // of the directory lister later.
447 updateDirectoryLoadingProgress(-1);
451 void DolphinViewContainer::slotDirectoryLoadingCompleted()
453 if (!m_statusBar
->progressText().isEmpty()) {
454 m_statusBar
->setProgressText(QString());
455 m_statusBar
->setProgress(100);
458 if (isSearchUrl(url()) && m_view
->itemsCount() == 0) {
459 // The dir lister has been completed on a Baloo-URI and no items have been found. Instead
460 // of showing the default status bar information ("0 items") a more helpful information is given:
461 m_statusBar
->setText(i18nc("@info:status", "No items found."));
467 void DolphinViewContainer::slotDirectoryLoadingCanceled()
469 if (!m_statusBar
->progressText().isEmpty()) {
470 m_statusBar
->setProgressText(QString());
471 m_statusBar
->setProgress(100);
474 m_statusBar
->setText(QString());
477 void DolphinViewContainer::slotUrlIsFileError(const KUrl
& url
)
479 const KFileItem
item(KFileItem::Unknown
, KFileItem::Unknown
, url
);
480 slotItemActivated(item
);
483 void DolphinViewContainer::slotItemActivated(const KFileItem
& item
)
485 // It is possible to activate items on inactive views by
486 // drag & drop operations. Assure that activating an item always
487 // results in an active view.
488 m_view
->setActive(true);
490 const KUrl
& url
= DolphinView::openItemAsFolderUrl(item
, GeneralSettings::browseThroughArchives());
491 if (!url
.isEmpty()) {
496 new KRun(item
.targetUrl(), this);
499 void DolphinViewContainer::slotItemsActivated(const KFileItemList
& items
)
501 Q_ASSERT(items
.count() >= 2);
503 KFileItemActions
fileItemActions(this);
504 fileItemActions
.runPreferredApplications(items
, QString());
507 void DolphinViewContainer::showItemInfo(const KFileItem
& item
)
510 m_statusBar
->resetToDefaultText();
512 m_statusBar
->setText(item
.getStatusBarInfo());
516 void DolphinViewContainer::closeFilterBar()
518 m_filterBar
->closeFilterBar();
520 emit
showFilterBarChanged(false);
523 void DolphinViewContainer::setNameFilter(const QString
& nameFilter
)
525 m_view
->setNameFilter(nameFilter
);
526 delayedStatusBarUpdate();
529 void DolphinViewContainer::activate()
534 void DolphinViewContainer::slotViewUrlAboutToBeChanged(const KUrl
& url
)
536 // URL changes of the view can happen in two ways:
537 // 1. The URL navigator gets changed and will trigger the view to update its URL
538 // 2. The URL of the view gets changed and will trigger the URL navigator to update
539 // its URL (e.g. by clicking on an item)
540 // In this scope the view-state may only get saved in case 2:
541 if (url
!= m_urlNavigator
->locationUrl()) {
546 void DolphinViewContainer::slotUrlNavigatorLocationAboutToBeChanged(const KUrl
& url
)
548 // URL changes of the view can happen in two ways:
549 // 1. The URL navigator gets changed and will trigger the view to update its URL
550 // 2. The URL of the view gets changed and will trigger the URL navigator to update
551 // its URL (e.g. by clicking on an item)
552 // In this scope the view-state may only get saved in case 1:
553 if (url
!= m_view
->url()) {
558 void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl
& url
)
562 if (KProtocolManager::supportsListing(url
)) {
563 setSearchModeEnabled(isSearchUrl(url
));
566 if (m_autoGrabFocus
&& isActive() && !isSearchUrl(url
)) {
567 // When an URL has been entered, the view should get the focus.
568 // The focus must be requested asynchronously, as changing the URL might create
569 // a new view widget.
570 QTimer::singleShot(0, this, SLOT(requestFocus()));
572 } else if (KProtocolManager::isSourceProtocol(url
)) {
573 QString app
= "konqueror";
574 if (url
.protocol().startsWith(QLatin1String("http"))) {
575 showMessage(i18nc("@info:status", // krazy:exclude=qmethods
576 "Dolphin does not support web pages, the web browser has been launched"),
579 const KConfigGroup
config(KSharedConfig::openConfig("kdeglobals"), "General");
580 const QString browser
= config
.readEntry("BrowserApplication");
581 if (!browser
.isEmpty()) {
583 if (app
.startsWith('!')) {
584 // a literal command has been configured, remove the '!' prefix
589 showMessage(i18nc("@info:status",
590 "Protocol not supported by Dolphin, Konqueror has been launched"),
594 const QString secureUrl
= KShell::quoteArg(url
.pathOrUrl());
595 const QString command
= app
+ ' ' + secureUrl
;
596 KRun::runCommand(command
, app
, app
, this);
598 showMessage(i18nc("@info:status", "Invalid protocol"), Error
);
602 void DolphinViewContainer::dropUrls(const KUrl
& destination
, QDropEvent
* event
)
604 m_dropDestination
= destination
;
606 const QMimeData
* mimeData
= event
->mimeData();
607 QMimeData
* mimeDataCopy
= new QMimeData
;
608 foreach (const QString
& format
, mimeData
->formats()) {
609 mimeDataCopy
->setData(format
, mimeData
->data(format
));
612 m_dropEvent
.reset(new QDropEvent(event
->pos(),
613 event
->possibleActions(),
615 event
->mouseButtons(),
616 event
->keyboardModifiers()));
618 QTimer::singleShot(0, this, SLOT(dropUrlsDelayed()));
621 void DolphinViewContainer::dropUrlsDelayed()
623 if (m_dropEvent
.isNull()) {
628 DragAndDropHelper::dropUrls(KFileItem(), m_dropDestination
, m_dropEvent
.data(), error
);
629 if (!error
.isEmpty()) {
630 showMessage(error
, Error
);
633 delete m_dropEvent
->mimeData();
637 void DolphinViewContainer::redirect(const KUrl
& oldUrl
, const KUrl
& newUrl
)
640 const bool block
= m_urlNavigator
->signalsBlocked();
641 m_urlNavigator
->blockSignals(true);
643 // Assure that the location state is reset for redirection URLs. This
644 // allows to skip redirection URLs when going back or forward in the
646 m_urlNavigator
->saveLocationState(QByteArray());
647 m_urlNavigator
->setLocationUrl(newUrl
);
648 setSearchModeEnabled(isSearchUrl(newUrl
));
650 m_urlNavigator
->blockSignals(block
);
653 void DolphinViewContainer::requestFocus()
658 void DolphinViewContainer::saveUrlCompletionMode(KCompletion::CompletionMode completion
)
660 GeneralSettings::setUrlCompletionMode(completion
);
663 void DolphinViewContainer::slotHistoryChanged()
665 QByteArray locationState
= m_urlNavigator
->locationState();
666 if (!locationState
.isEmpty()) {
667 QDataStream
stream(&locationState
, QIODevice::ReadOnly
);
668 m_view
->restoreState(stream
);
672 void DolphinViewContainer::slotReturnPressed()
674 if (!GeneralSettings::editableUrl()) {
675 m_urlNavigator
->setUrlEditable(false);
679 void DolphinViewContainer::startSearching()
681 const KUrl url
= m_searchBox
->urlForSearching();
682 if (url
.isValid() && !url
.isEmpty()) {
683 m_view
->setViewPropertiesContext("search");
684 m_urlNavigator
->setLocationUrl(url
);
688 void DolphinViewContainer::closeSearchBox()
690 setSearchModeEnabled(false);
693 void DolphinViewContainer::stopDirectoryLoading()
695 m_view
->stopLoading();
696 m_statusBar
->setProgress(100);
699 void DolphinViewContainer::slotStatusBarZoomLevelChanged(int zoomLevel
)
701 m_view
->setZoomLevel(zoomLevel
);
704 void DolphinViewContainer::showErrorMessage(const QString
& msg
)
706 showMessage(msg
, Error
);
709 bool DolphinViewContainer::isSearchUrl(const KUrl
& url
) const
711 const QString protocol
= url
.protocol();
712 return protocol
.contains("search");
715 void DolphinViewContainer::saveViewState()
717 QByteArray locationState
;
718 QDataStream
stream(&locationState
, QIODevice::WriteOnly
);
719 m_view
->saveState(stream
);
720 m_urlNavigator
->saveLocationState(locationState
);
723 #include "dolphinviewcontainer.moc"