Warning, file /multimedia/juk/playlistsharedsettings.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /**
0002  * Copyright (C) 2002-2004 Scott Wheeler <wheeler@kde.org>
0003  * Copyright (C) 2007 Michael Pyne <mpyne@kde.org>
0004  *
0005  * This program is free software; you can redistribute it and/or modify it under
0006  * the terms of the GNU General Public License as published by the Free Software
0007  * Foundation; either version 2 of the License, or (at your option) any later
0008  * version.
0009  *
0010  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0012  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU General Public License along with
0015  * this program.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 #ifndef JUK_PLAYLISTSHAREDSETTINGS_H
0019 #define JUK_PLAYLISTSHAREDSETTINGS_H
0020 
0021 #include <QVector>
0022 
0023 #include "playlist.h"
0024 
0025 /**
0026  * Shared settings between the playlists.
0027  */
0028 
0029 class Playlist::SharedSettings
0030 {
0031 public:
0032     static SharedSettings *instance();
0033 
0034     /**
0035      * Sets the default column order to that of Playlist @param p.
0036      */
0037     void setColumnOrder(const Playlist *l);
0038     void toggleColumnVisible(int column);
0039     bool isColumnVisible(int column) const;
0040 
0041     /**
0042      * Apply the settings.
0043      */
0044     void apply(Playlist *l) const;
0045     void sync() { writeConfig(); }
0046 
0047 protected:
0048     SharedSettings();
0049     ~SharedSettings() {}
0050 
0051 private:
0052     void writeConfig();
0053 
0054     QVector<int> m_columnOrder;
0055     QVector<bool> m_columnsVisible;
0056 };
0057 
0058 
0059 #endif
0060 
0061 // vim: set et sw=4 tw=0 sta: