You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.3 KiB
C
87 lines
2.3 KiB
C
5 years ago
|
/*
|
||
|
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
|
||
|
*
|
||
|
* This file is part of Latte-Dock
|
||
|
*
|
||
|
* Latte-Dock is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU General Public License as
|
||
|
* published by the Free Software Foundation; either version 2 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
|
* Latte-Dock is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef SETTINGSDATALAYOUTSTABLE_H
|
||
|
#define SETTINGSDATALAYOUTSTABLE_H
|
||
|
|
||
5 years ago
|
// local
|
||
5 years ago
|
#include "layoutdata.h"
|
||
5 years ago
|
#include "../layouts/synchronizer.h"
|
||
5 years ago
|
|
||
5 years ago
|
// Qt
|
||
5 years ago
|
#include <QList>
|
||
5 years ago
|
|
||
|
namespace Latte {
|
||
|
namespace Settings {
|
||
|
namespace Data {
|
||
|
|
||
|
class LayoutsTable
|
||
|
{
|
||
|
|
||
|
public:
|
||
|
LayoutsTable();
|
||
5 years ago
|
LayoutsTable(LayoutsTable &&o);
|
||
|
LayoutsTable(const LayoutsTable &o);
|
||
5 years ago
|
|
||
|
//! Operators
|
||
|
LayoutsTable &operator=(const LayoutsTable &rhs);
|
||
5 years ago
|
LayoutsTable &operator=(LayoutsTable &&rhs);
|
||
5 years ago
|
LayoutsTable &operator<<(const Layout &rhs);
|
||
|
bool operator==(const LayoutsTable &rhs) const;
|
||
|
bool operator!=(const LayoutsTable &rhs) const;
|
||
5 years ago
|
Layout &operator[](const QString &id);
|
||
5 years ago
|
const Layout operator[](const QString &id) const;
|
||
5 years ago
|
Layout &operator[](const uint &index);
|
||
|
const Layout operator[](const uint &index) const;
|
||
5 years ago
|
|
||
5 years ago
|
LayoutsTable subtracted(const LayoutsTable &rhs) const;
|
||
|
|
||
5 years ago
|
QStringList allSharesIds() const;
|
||
|
QStringList allSharesNames() const;
|
||
|
Latte::Layouts::SharesMap sharesMap() const;
|
||
|
|
||
5 years ago
|
bool containsId(const QString &id) const;
|
||
5 years ago
|
bool containsName(const QString &name) const;
|
||
5 years ago
|
bool rowExists(const int &row) const;
|
||
|
|
||
|
int indexOf(const QString &id) const;
|
||
5 years ago
|
int rowCount() const;
|
||
5 years ago
|
|
||
5 years ago
|
QString idForName(const QString &name) const;
|
||
5 years ago
|
|
||
5 years ago
|
void clear();
|
||
|
void remove(const int &row);
|
||
|
void removeLayout(const QString &id);
|
||
5 years ago
|
void setLayoutForFreeActivities(const QString &id);
|
||
5 years ago
|
|
||
5 years ago
|
protected:
|
||
|
//! #id, layout_record
|
||
5 years ago
|
QList<Layout> m_layouts;
|
||
5 years ago
|
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
5 years ago
|
Q_DECLARE_METATYPE(Latte::Settings::Data::LayoutsTable)
|
||
|
|
||
5 years ago
|
#endif
|