author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/CAnnoEdit.h | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/CAnnoEdit.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CAnnoEdit.h | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/noncore/apps/opie-reader/CAnnoEdit.h b/noncore/apps/opie-reader/CAnnoEdit.h index f320061..78d3eeb 100644 --- a/noncore/apps/opie-reader/CAnnoEdit.h +++ b/noncore/apps/opie-reader/CAnnoEdit.h @@ -1,59 +1,48 @@ #ifndef __CANNOEDIT_H #define __CANNOEDIT_H #include <qlabel.h> #include <qlayout.h> #include <qpushbutton.h> #include <qlineedit.h> #include <qmultilineedit.h> +#include <qcombobox.h> class CAnnoEdit : public QWidget { Q_OBJECT QLineEdit* m_name; QMultiLineEdit* m_anno; - size_t m_posn; + size_t m_posn, m_posn2; + QComboBox* colorbox; public: void setPosn(size_t p) { m_posn = p; } + void setPosn2(size_t p) { m_posn2 = p; } size_t getPosn() { return m_posn; } + size_t getPosn2() { return m_posn2; } + QColor getColor(); + void setColor(QColor); void setName(const QString& name) { m_name->setText(name); } void setAnno(const QString& name) { m_anno->setText(name); m_anno->setEdited(false); } bool edited() { return m_anno->edited(); } - CAnnoEdit(QWidget *parent=0, const char *name=0, WFlags f = 0) : - QWidget(parent, name, f) - { - QVBoxLayout* grid = new QVBoxLayout(this); - m_name = new QLineEdit(this, "Name"); - m_anno = new QMultiLineEdit(this, "Annotation"); - m_anno->setWordWrap(QMultiLineEdit::WidgetWidth); - QPushButton* exitButton = new QPushButton("Okay", this); - connect(exitButton, SIGNAL( released() ), this, SLOT( slotOkay() ) ); - QPushButton* cancelButton = new QPushButton("Cancel", this); - connect(cancelButton, SIGNAL( released() ), this, SLOT( slotCancel() ) ); - QLabel *l = new QLabel("Text",this); - grid->addWidget(l); - grid->addWidget(m_name); - l = new QLabel("Annotation",this); - grid->addWidget(l); - grid->addWidget(m_anno,1); - QHBoxLayout* hgrid = new QHBoxLayout(grid); - hgrid->addWidget(cancelButton); - hgrid->addWidget(exitButton); - } + CAnnoEdit(QWidget *parent=0, const char *name=0, WFlags f = 0); private slots: - void slotOkay() { emit finished(m_name->text(), m_anno->text()); } + void slotOkay() + { + emit finished(m_name->text(), m_anno->text()); + } void slotCancel() { emit cancelled(); } public: signals: void finished(const QString&, const QString&); void cancelled(); }; #endif |