00001 #ifndef EDITMETADATA_H_ 00002 #define EDITMETADATA_H_ 00003 00004 #include <iostream> 00005 using namespace std; 00006 00007 #include <mythtv/mythdialogs.h> 00008 00009 class Metadata; 00010 class ImageGridItem; 00011 class AlbumArtImages; 00012 00013 class EditMetadataDialog : public MythThemedDialog 00014 { 00015 00016 Q_OBJECT 00017 00018 public: 00019 00020 EditMetadataDialog(Metadata *source_metadata, 00021 MythMainWindow *parent, 00022 QString window_name, 00023 QString theme_filename, 00024 const char* name = 0); 00025 ~EditMetadataDialog(); 00026 00027 void keyPressEvent(QKeyEvent *e); 00028 void wireUpTheme(); 00029 void fillWidgets(); 00030 void setSaveMetadataOnly(); 00031 00032 public slots: 00033 00034 void closeDialog(); 00035 void searchArtist(); 00036 void searchCompilationArtist(); 00037 void searchAlbum(); 00038 void searchGenre(); 00039 void incRating(bool up_or_down); 00040 void showSaveMenu(); 00041 void saveToDatabase(); 00042 void saveToFile(); 00043 void saveToMetadata(); 00044 void saveAll(); 00045 void cancelPopup(); 00046 void editLostFocus(); 00047 void checkClicked(bool state); 00048 void switchToMetadata(void); 00049 void switchToAlbumArt(void); 00050 void switchToDBStats(void); 00051 void gridItemChanged(ImageGridItem *item); 00052 00053 private: 00054 00055 bool showList(QString caption, QString &value); 00056 void showMenu(void); 00057 void updateImageGrid(void); 00058 QPixmap *createScaledPixmap(QString filename, int width, int height, 00059 QImage::ScaleMode mode); 00060 00061 bool metadataOnly; 00062 Metadata *m_metadata, *m_sourceMetadata ; 00063 MythPopupBox *popup; 00064 00065 // 00066 // GUI stuff 00067 // 00068 UIRemoteEditType *artist_edit; 00069 UIRemoteEditType *compilation_artist_edit; 00070 UIRemoteEditType *album_edit; 00071 UIRemoteEditType *title_edit; 00072 UIRemoteEditType *genre_edit; 00073 UIRemoteEditType *year_edit; 00074 UIRemoteEditType *track_edit; 00075 00076 UITextType *lastplay_text; 00077 UITextType *playcount_text; 00078 UITextType *filename_text; 00079 00080 UIRepeatedImageType *rating_image; 00081 00082 UIPushButtonType *searchartist_button; 00083 UIPushButtonType *searchcompilation_artist_button; 00084 UIPushButtonType *searchalbum_button; 00085 UIPushButtonType *searchgenre_button; 00086 UIPushButtonType *rating_button; 00087 00088 UICheckBoxType *compilation_check; 00089 00090 UITextButtonType *metadata_button; 00091 UITextButtonType *albumart_button; 00092 UITextButtonType *dbstatistics_button; 00093 UITextButtonType *done_button; 00094 00095 UIImageType *coverart_image; 00096 UIImageGridType *coverart_grid; 00097 UITextType *imagetype_text; 00098 UITextType *imagefilename_text; 00099 00100 QStringList searchList; 00101 AlbumArtImages *albumArt; 00102 }; 00103 00104 #endif
1.5.5