00001 #ifndef FILEASSOC_H_ 00002 #define FILEASSOC_H_ 00003 00004 /* 00005 fileassoc.h 00006 00007 (c) 2003 Thor Sigvaldason, Isaac Richards, and ?? ?? 00008 Part of the mythTV project 00009 00010 Classes to manipulate the file associations stored 00011 in the videotypes table (in the mythconverg database) 00012 00013 */ 00014 00015 #include <qptrlist.h> 00016 00017 #include <mythtv/mythdialogs.h> 00018 00019 class FileAssociation; 00020 00021 class FileAssocDialog : public MythThemedDialog 00022 { 00023 00024 Q_OBJECT 00025 00026 // 00027 // Dialog to manipulate the data 00028 // 00029 00030 public: 00031 00032 FileAssocDialog(MythMainWindow *parent_, 00033 QString window_name, 00034 QString theme_filename, 00035 const char *name_ = 0); 00036 ~FileAssocDialog(); 00037 00038 void keyPressEvent(QKeyEvent *e); 00039 void loadFileAssociations(); 00040 void saveFileAssociations(); 00041 void showCurrentFA(); 00042 void wireUpTheme(); 00043 00044 public slots: 00045 00046 void switchToFA(int which_one); 00047 void saveAndExit(); 00048 void toggleDefault(bool on_or_off); 00049 void toggleIgnore(bool on_or_off); 00050 void setPlayerCommand(QString); 00051 void deleteCurrent(); 00052 void makeNewExtension(); 00053 void createExtension(); 00054 void removeExtensionPopup(); 00055 00056 private: 00057 00058 QPtrList<FileAssociation> file_associations; 00059 FileAssociation *current_fa; 00060 00061 // 00062 // GUI stuff 00063 // 00064 00065 UIRemoteEditType *command_editor; 00066 UISelectorType *extension_select; 00067 UICheckBoxType *default_check; 00068 UICheckBoxType *ignore_check; 00069 UITextButtonType *done_button; 00070 UITextButtonType *new_button; 00071 UITextButtonType *delete_button; 00072 00073 // 00074 // Stuff for new extension 00075 // 00076 00077 MythPopupBox *new_extension_popup; 00078 MythRemoteLineEdit *new_extension_editor; 00079 }; 00080 00081 #endif
1.5.5