Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

LegendDialog.h

Go to the documentation of this file.
00001 //LabPlot : LegendDialog.h
00002 
00003 #ifndef LEGENDDIALOG_H
00004 #define LEGENDDIALOG_H
00005 
00006 #include <qfont.h>
00007 #include <qcheckbox.h>
00008 #include "Worksheet.h"
00009 #include "Dialog.h"
00010 
00011 class LegendDialog: public Dialog
00012 {
00013         Q_OBJECT
00014 public:
00015         LegendDialog(MainWin *mw, const char *name);
00016         void updateDialog(Worksheet *ws=0);
00017 public slots:
00018         void selectFont();
00019         void Enable(bool e=true) { enabledcb->setChecked(e); }
00020         void setEnabled(bool e=true) { Enable(e); }
00021         bool Enabled() { return enabledcb->isChecked(); }
00022         void enableBorder(bool e=true) { bordercb->setChecked(e); }
00023         bool borderEnabled() { return bordercb->isChecked(); }
00024         void setPosition(double x, double y) 
00025                 { xle->setText(QString::number(x)); yle->setText(QString::number(y)); }
00026         void setXPosition(double x) { xle->setText(QString::number(x)); }
00027         void setYPosition(double y) { yle->setText(QString::number(y)); }
00028         Point Position() { return Point(xle->text().toDouble(),yle->text().toDouble()); }
00029         double XPosition() { return xle->text().toDouble(); }
00030         double YPosition() { return yle->text().toDouble(); }
00031         void setLegendFont(QFont f) { lf=f; }
00032         QFont Font() { return lf; }
00033         QFont LegendFont() { return Font(); }
00034         void setTransparent(bool e=true) { transcb->setChecked(e); }
00035         bool Transparent() { return transcb->isChecked(); }
00036         void setOrientation(int o=0) { orientcb->setCurrentItem(o); }
00037         int Orientation() { return orientcb->currentItem(); }
00038         void setColor(QColor c) { colorcb->setColor(c); }
00039         void setLegendColor(QColor c) { setColor(c); }
00040         QColor Color() { return colorcb->color(); }     
00041         QColor BackgroundColor() { return Color(); }    
00042         int Apply() { return apply_clicked(); }
00043 private:
00044         QCheckBox *enabledcb, *bordercb, *transcb;
00045         KLineEdit *xle, *yle, *fontle;
00046         QFont lf;
00047         KComboBox *orientcb;
00048         KColorButton *colorcb;
00049         Legend *legend;
00050 private slots:
00051         void ok_clicked() { apply_clicked(); accept(); }
00052         int apply_clicked();
00053 };
00054 
00055 #endif //LEGENDDIALOG_H

Generated on Sat Oct 13 21:55:01 2007 for LabPlot by  doxygen 1.4.4