From d95e3f02d6615854547bded419de81395b28c2c5 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 29 May 2010 12:40:45 +0200 Subject: 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. --- archiveitemcoveredit.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 archiveitemcoveredit.h (limited to 'archiveitemcoveredit.h') 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 +#include +#include +#include + +class QLineEdit; +class QPushButton; +class QCheckBox; +class PictureViewer; + +class ArchiveItemCoverEdit : public QWidget { + Q_OBJECT + public: + explicit ArchiveItemCoverEdit(QWidget *parent = 0); + void setCovers(const QList &covers); + QList 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 mLineEditMapping; + QHash mInitialValue; + QHash > mCheckboxTexts; + QHash mBrowseMap; + QString mLastOpenedDir; + PictureViewer *mPicViewer; +}; + +#endif -- cgit v1.2.3-70-g09d2