diff options
author | Arno <am@disconnect.de> | 2010-05-29 12:40:45 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-05-29 12:40:45 +0200 |
commit | d95e3f02d6615854547bded419de81395b28c2c5 (patch) | |
tree | 8f550fda5daa1fe6b27469a8b1ead04b9a364d73 /archiveitemcoveredit.h | |
parent | 98903de8351e1f78a057febe0bb996223a238d56 (diff) | |
download | SheMov-d95e3f02d6615854547bded419de81395b28c2c5.tar.gz SheMov-d95e3f02d6615854547bded419de81395b28c2c5.tar.bz2 SheMov-d95e3f02d6615854547bded419de81395b28c2c5.zip |
Implemented ArchiveItemCoverEdit
Implemented Widget in preparation for the new ArchiveItemEditDialog.
It's still quite convoluted, but I can't think of a better way to do
this.
Diffstat (limited to 'archiveitemcoveredit.h')
-rw-r--r-- | archiveitemcoveredit.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/archiveitemcoveredit.h b/archiveitemcoveredit.h new file mode 100644 index 0000000..7f91a49 --- /dev/null +++ b/archiveitemcoveredit.h @@ -0,0 +1,54 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#ifndef ARCHIVEITEMCOVEREDIT_H +#define ARCHIVEITEMCOVEREDIT_H + +#include <QWidget> +#include <QHash> +#include <QPair> +#include <QList> + +class QLineEdit; +class QPushButton; +class QCheckBox; +class PictureViewer; + +class ArchiveItemCoverEdit : public QWidget { + Q_OBJECT + public: + explicit ArchiveItemCoverEdit(QWidget *parent = 0); + void setCovers(const QList<QVariant> &covers); + QList<QVariant> covers() const; + + private slots: + void unlock(QWidget *lineEdit); + void browse(QWidget *lineEdit); + void view(QWidget *lineEdit); + + private: + QLineEdit *mFrontCover; + QLineEdit *mBackCover; + QLineEdit *mGeneralCover; + QPushButton *mBrowseFront; + QPushButton *mBrowseBack; + QPushButton *mBrowseGeneral; + QPushButton *mViewFront; + QPushButton *mViewBack; + QPushButton *mViewGeneral; + QCheckBox *mUnlockFront; + QCheckBox *mUnlockBack; + QCheckBox *mUnlockGeneral; + QHash<QLineEdit*, QCheckBox*> mLineEditMapping; + QHash<QLineEdit*, QString> mInitialValue; + QHash<QCheckBox*, QPair<QString, QString> > mCheckboxTexts; + QHash<QCheckBox*, QPushButton*> mBrowseMap; + QString mLastOpenedDir; + PictureViewer *mPicViewer; +}; + +#endif |