File indexing completed on 2024-12-22 04:17:35
0001 /*************************************************************************** 0002 * * 0003 * copyright : (C) 2008 The University of Toronto * 0004 * netterfield@astro.utoronto.ca * 0005 * * 0006 * This program is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published by * 0008 * the Free Software Foundation; either version 2 of the License, or * 0009 * (at your option) any later version. * 0010 * * 0011 ***************************************************************************/ 0012 0013 #ifndef LEGENDTAB_H 0014 #define LEGENDTAB_H 0015 0016 #include "dialogtab.h" 0017 #include "ui_legendtab.h" 0018 0019 #include "kst_export.h" 0020 0021 namespace Kst { 0022 0023 class ObjectStore; 0024 0025 class LegendTab : public DialogTab, Ui::LegendTab { 0026 Q_OBJECT 0027 public: 0028 explicit LegendTab(QWidget *parent = 0); 0029 virtual ~LegendTab(); 0030 0031 void setDisplayedRelations(const QStringList& displayedRelations, const QStringList& displayedRelationTips); 0032 void setAvailableRelations(const QStringList& availableRelations, const QStringList& availableRelationTips); 0033 0034 QStringList displayedRelations(); 0035 0036 QString title() const; 0037 void setTitle(const QString& title); 0038 bool titleDirty() const; 0039 0040 bool autoContents() const; 0041 void setAutoContents(const bool value); 0042 bool autoContentsDirty() const; 0043 0044 QFont font(const QFont font) const; 0045 void setFont(const QFont &font); 0046 bool fontDirty() const; 0047 0048 QColor legendColor() const {return _labelColor->color();} 0049 void setColor(const QColor c) {_labelColor->setColor(c);} 0050 0051 qreal fontScale() const; 0052 void setFontScale(const qreal scale); 0053 bool fontScaleDirty() const; 0054 0055 bool verticalDisplay() const; 0056 void setVerticalDisplay(const bool vertical); 0057 bool verticalDisplayDirty() const; 0058 0059 void clearTabValues(); 0060 void setSingle(bool single); 0061 private: 0062 ObjectStore* _store; 0063 bool _single; 0064 0065 private Q_SLOTS: 0066 void updateActive(); 0067 void updateButtons(); 0068 void addButtonClicked(); 0069 void removeButtonClicked(); 0070 void upButtonClicked(); 0071 void downButtonClicked(); 0072 }; 0073 0074 } 0075 0076 #endif 0077 0078 // vim: ts=2 sw=2 et