Finish of the OtherLogs page, and (re)format page related files
This commit is contained in:

committed by
Petr Mrázek

parent
5c43842359
commit
4c0dc51110
@ -14,12 +14,11 @@
|
||||
*/
|
||||
|
||||
#include "PageContainer.h"
|
||||
#include "gui/Platform.h"
|
||||
|
||||
#include <QStackedLayout>
|
||||
#include <QPushButton>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QUrl>
|
||||
#include "MultiMC.h"
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QListView>
|
||||
#include <QLineEdit>
|
||||
@ -27,10 +26,12 @@
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGridLayout>
|
||||
#include <QDesktopServices>
|
||||
#include "logic/settings/SettingsObject.h"
|
||||
|
||||
#include "MultiMC.h"
|
||||
#include "logic/settings/SettingsObject.h"
|
||||
#include "gui/widgets/IconLabel.h"
|
||||
#include "gui/Platform.h"
|
||||
#include "PageContainer_p.h"
|
||||
#include <gui/widgets/IconLabel.h>
|
||||
|
||||
class PageEntryFilterModel : public QSortFilterProxyModel
|
||||
{
|
||||
@ -197,5 +198,9 @@ bool PageContainer::requestClose(QCloseEvent *event)
|
||||
if (!page->apply())
|
||||
return false;
|
||||
}
|
||||
if (m_currentPage)
|
||||
{
|
||||
m_currentPage->closed();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -14,9 +14,11 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <QModelIndex>
|
||||
#include <gui/pages/BasePageProvider.h>
|
||||
|
||||
#include "gui/pages/BasePageProvider.h"
|
||||
|
||||
class QLayout;
|
||||
class IconLabel;
|
||||
@ -34,7 +36,7 @@ class PageContainer : public QWidget
|
||||
public:
|
||||
explicit PageContainer(BasePageProviderPtr pageProvider, QString defaultId = QString(),
|
||||
QWidget *parent = 0);
|
||||
virtual ~PageContainer() {};
|
||||
virtual ~PageContainer() {}
|
||||
|
||||
void addButtons(QWidget * buttons);
|
||||
void addButtons(QLayout * buttons);
|
||||
@ -49,7 +51,7 @@ slots:
|
||||
void help();
|
||||
|
||||
private:
|
||||
BasePage * m_currentPage;
|
||||
BasePage * m_currentPage = 0;
|
||||
QSortFilterProxyModel *m_proxyModel;
|
||||
PageModel *m_model;
|
||||
QStackedLayout *m_pageStack;
|
||||
|
@ -1,4 +1,20 @@
|
||||
/* Copyright 2014 MultiMC Contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QListView>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QEvent>
|
||||
@ -30,7 +46,7 @@ public:
|
||||
empty.fill(Qt::transparent);
|
||||
m_emptyIcon = QIcon(empty);
|
||||
}
|
||||
virtual ~PageModel() {};
|
||||
virtual ~PageModel() {}
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user