SVN_SILENT made messages (after extraction)
[kdepim.git] / storageservicemanager / storageservicemanagermainwidget.cpp
blob549e46da8f0fe5b5ba5fb030d03545556a0c0d6f
1 /*
2 Copyright (c) 2014-2015 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #include "storageservicemanagermainwidget.h"
19 #include "storageserviceconfigurestoragewidget.h"
20 #include "storageservicetabwidget.h"
22 StorageServiceManagerMainWidget::StorageServiceManagerMainWidget(QWidget *parent)
23 : QStackedWidget(parent)
25 mConfigureWidget = new StorageServiceConfigureStorageWidget;
26 connect(mConfigureWidget, &StorageServiceConfigureStorageWidget::configureClicked, this, &StorageServiceManagerMainWidget::configureClicked);
27 addWidget(mConfigureWidget);
28 mStorageServiceTabWidget = new StorageServiceTabWidget;
29 connect(mStorageServiceTabWidget, &StorageServiceTabWidget::tabCountChanged, this, &StorageServiceManagerMainWidget::slotTabCountchanged);
30 addWidget(mStorageServiceTabWidget);
31 setCurrentWidget(mConfigureWidget);
34 StorageServiceManagerMainWidget::~StorageServiceManagerMainWidget()
39 StorageServiceTabWidget *StorageServiceManagerMainWidget::storageServiceTabWidget() const
41 return mStorageServiceTabWidget;
44 void StorageServiceManagerMainWidget::slotTabCountchanged(bool hasTab)
46 if (hasTab) {
47 setCurrentWidget(mStorageServiceTabWidget);
48 } else {
49 setCurrentWidget(mConfigureWidget);