| [90] | 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| [175] | 2 | Copyright (C) 2006-2016 Ricardo Villalba <[email protected]>
|
|---|
| [90] | 3 |
|
|---|
| 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.
|
|---|
| 8 |
|
|---|
| 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.
|
|---|
| 13 |
|
|---|
| 14 | You should have received a copy of the GNU General Public License
|
|---|
| 15 | along with this program; if not, write to the Free Software
|
|---|
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | #include "assstyles.h"
|
|---|
| 20 | #include <QSettings>
|
|---|
| 21 | #include <QFile>
|
|---|
| 22 | #include <QTextStream>
|
|---|
| 23 | #include "colorutils.h"
|
|---|
| 24 |
|
|---|
| 25 | AssStyles::AssStyles() {
|
|---|
| 26 | fontname = "Arial";
|
|---|
| 27 | fontsize = 20;
|
|---|
| 28 | primarycolor = 0xFFFFFF;
|
|---|
| 29 | backcolor = 0;
|
|---|
| 30 | outlinecolor = 0;
|
|---|
| 31 | bold = false;
|
|---|
| 32 | italic = false;
|
|---|
| [175] | 33 | halignment = HCenter;
|
|---|
| 34 | valignment = Bottom;
|
|---|
| 35 | borderstyle = Outline;
|
|---|
| [179] | 36 | outline = 0.3;
|
|---|
| 37 | shadow = 1;
|
|---|
| [90] | 38 | marginl = 20;
|
|---|
| 39 | marginr = 20;
|
|---|
| 40 | marginv = 8;
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | void AssStyles::save(QSettings * set) {
|
|---|
| 44 | qDebug("AssStyles::save");
|
|---|
| 45 |
|
|---|
| 46 | set->setValue("styles/fontname", fontname);
|
|---|
| 47 | set->setValue("styles/fontsize", fontsize);
|
|---|
| 48 | set->setValue("styles/primarycolor", primarycolor);
|
|---|
| 49 | set->setValue("styles/backcolor", backcolor);
|
|---|
| 50 | set->setValue("styles/outlinecolor", outlinecolor);
|
|---|
| 51 | set->setValue("styles/bold", bold);
|
|---|
| 52 | set->setValue("styles/italic", italic);
|
|---|
| |
|---|