diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /src/k9main.h | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k9main.h')
-rw-r--r-- | src/k9main.h | 118 |
1 files changed, 60 insertions, 58 deletions
diff --git a/src/k9main.h b/src/k9main.h index 6e9c348..547cbdf 100644 --- a/src/k9main.h +++ b/src/k9main.h @@ -18,35 +18,35 @@ #include "k9mainw.h" #include "kconfigdlg.h" #include "k9playbackoptions.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> -#include <qlistview.h> +#include <tqlistview.h> #include <kmainwindow.h> #include <kaboutdata.h> -#include <qevent.h> +#include <tqevent.h> #include <kfiledialog.h> -#include <qlistbox.h> +#include <tqlistbox.h> #include "k9copy.h" -#include <qmutex.h> +#include <tqmutex.h> enum eStreamType {SUB,AUD,VID,NONE,CHAP} ; enum eObjectType {TITLE,CHAPTER,TITLESET,STREAM,ROOT}; -class LvItem : public QListViewItem { +class LvItem : public TQListViewItem { public: - LvItem( QListViewItem *parent,eObjectType _objectType) - : QListViewItem( parent), obj( NULL ) { + LvItem( TQListViewItem *tqparent,eObjectType _objectType) + : TQListViewItem( tqparent), obj( NULL ) { objectType=_objectType; } - LvItem( QListView *parent,eObjectType _objectType) - : QListViewItem( parent), obj( NULL ) { + LvItem( TQListView *tqparent,eObjectType _objectType) + : TQListViewItem( tqparent), obj( NULL ) { objectType=_objectType; } eObjectType objectType; - QObject *obj; + TQObject *obj; virtual int rtti () const; - int compare ( QListViewItem * i, int col, bool ascending ) const; - void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ); + int compare ( TQListViewItem * i, int col, bool ascending ) const; + void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); }; class k9Main; @@ -59,10 +59,10 @@ class k9PlaybackOptions; class k9LangSelect; class k9UpdateFactor; -class ckLvItem : public QCheckListItem { +class ckLvItem : public TQCheckListItem { public: - ckLvItem( QListViewItem *parent,k9Main *dlg,eObjectType _objectType) - : QCheckListItem( parent,"",QCheckListItem::CheckBox) { + ckLvItem( TQListViewItem *tqparent,k9Main *dlg,eObjectType _objectType) + : TQCheckListItem( tqparent,"",TQCheckListItem::CheckBox) { mainDlg=dlg; obj=NULL; stream=NULL; @@ -70,8 +70,8 @@ public: language=""; objectType=_objectType; } - ckLvItem( QListView *parent,k9Main *dlg,eObjectType _objectType) - : QCheckListItem( parent,"",QCheckListItem::CheckBox) { + ckLvItem( TQListView *tqparent,k9Main *dlg,eObjectType _objectType) + : TQCheckListItem( tqparent,"",TQCheckListItem::CheckBox) { mainDlg=dlg; obj=NULL; stream=NULL; @@ -84,12 +84,12 @@ public: k9Main *mainDlg; k9DVDTitle *mainTitle; - QObject *obj; - QObject *stream; - QString language; + TQObject *obj; + TQObject *stream; + TQString language; virtual int rtti () const; - void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ); - int compare ( QListViewItem * i, int col, bool ascending ) const; + void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); + int compare ( TQListViewItem * i, int col, bool ascending ) const; double getstreamSize(); protected: @@ -98,8 +98,9 @@ protected: }; -class k9DVDListItem : public QObject { +class k9DVDListItem : public TQObject { Q_OBJECT + TQ_OBJECT public: k9DVDAudioStream *audioStream; k9DVDSubtitle *subtitle; @@ -107,25 +108,26 @@ public: ckLvItem *listItem; eStreamType streamType; public: - k9DVDListItem(QObject *DVD,ckLvItem *List,eStreamType type); + k9DVDListItem(TQObject *DVD,ckLvItem *List,eStreamType type); }; class k9Main : public MainDlg { Q_OBJECT + TQ_OBJECT public: - k9Main(QWidget* parent = 0, const char* name = 0, k9CdDrives *_drives=0 ); + k9Main(TQWidget* tqparent = 0, const char* name = 0, k9CdDrives *_drives=0 ); ~k9Main(); /*$PUBLIC_FUNCTIONS$*/ void addTitle(k9DVDTitle *track); - void addChapters(QListViewItem *_parent,k9DVDTitle *_title); + void addChapters(TQListViewItem *_parent,k9DVDTitle *_title); void updateSelection(); void checkAll(bool state); void checkTS( bool _state,ckLvItem *_item ); void checkTitle(bool state, ckLvItem *_item); - void checkLang(QString lang, eStreamType streamType,bool state); + void checkLang(TQString lang, eStreamType streamType,bool state); bool getupdating(); void saveSettings(); void setDVDSize(); @@ -140,7 +142,7 @@ public: void setLangSelect(k9LangSelect *_value) { m_langSelect=_value; }; - QObjectList *getItems() { + TQObjectList *getItems() { return &items; }; void updateFactor(); @@ -148,18 +150,18 @@ public: k9DVD *dvd; void eject(); private slots: - virtual void listView1CurrentChanged( QListViewItem * ); + virtual void listView1CurrentChanged( TQListViewItem * ); virtual void bSaveClick(); virtual void cbOutputDevActivated(int); virtual void bInputOpenClick(); virtual void bInputOpenDirClick(); - virtual void foundMountPoint (const QString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); + virtual void foundMountPoint (const TQString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); virtual void fspDone(); virtual void updateFactor_internal(); virtual void deviceAdded(k9CdDrive *_drive); virtual void deviceRemoved(k9CdDrive *_drive); - virtual void expanded(QListViewItem*); - virtual void collapsed (QListViewItem*); + virtual void expanded(TQListViewItem*); + virtual void collapsed (TQListViewItem*); public slots: /*$PUBLIC_SLOTS$*/ virtual void PreviewTitle(); @@ -167,42 +169,42 @@ public slots: virtual void extractMPEG2(); virtual void Copy(); virtual void Open(); - virtual void Clone(QString _input,QString _output); - virtual void setInput(QString _input); - virtual void setOutput(QString _output); - virtual void volumeChanged(const QString &device,const QString &volumeName); + virtual void Clone(TQString _input,TQString _output); + virtual void setInput(TQString _input); + virtual void setOutput(TQString _output); + virtual void volumeChanged(const TQString &device,const TQString &volumeName); void setDrives(k9CdDrives* _value); protected: /*$PROTECTED_FUNCTIONS$*/ - QObjectList items; - k9DVDListItem *addListItem(QObject *DVD,ckLvItem *List,eStreamType type); + TQObjectList items; + k9DVDListItem *addListItem(TQObject *DVD,ckLvItem *List,eStreamType type); void readDrives(); void addDrive (k9CdDrive *_drive); k9Copy *m_parent; - QPtrList<ckLvItem> tsItems; - QPtrList<ckLvItem> chItems; + TQPtrList<ckLvItem> tsItems; + TQPtrList<ckLvItem> chItems; ckLvItem * root; - QPtrList <k9CdDrive> driveList; - QPtrList <k9CdDrive> recorderList; + TQPtrList <k9CdDrive> driveList; + TQPtrList <k9CdDrive> recorderList; k9CdDrives *drives; - QPixmap pxVideo; - QPixmap pxSound; - QPixmap pxText; - QPixmap pxChapter; - QMutex m_mutex; + TQPixmap pxVideo; + TQPixmap pxSound; + TQPixmap pxText; + TQPixmap pxChapter; + TQMutex m_mutex; bool updating; bool fspFinish; long fspAvail; - void closeEvent( QCloseEvent* ce ); + void closeEvent( TQCloseEvent* ce ); void closeDVD(); KLibFactory *m_factory; - QString getDevice(QComboBox *_combo); + TQString getDevice(TQComboBox *_combo); k9UpdateFactor *m_update; //PREFERENCES - QString m_prefOutput; + TQString m_prefOutput; bool m_useDvdAuthor; bool m_quickScan; int m_prefSize; @@ -216,21 +218,21 @@ protected: KDockWidget *m_dockWidget; protected slots: /*$PROTECTED_SLOTS$*/ - void itemRenamed ( QListViewItem *item, int col ); + void itemRenamed ( TQListViewItem *item, int col ); signals: // Signals /** No descriptions */ - void sig_progress(QString str); - void changeStatusbar(const QString& str,int id); - void changeCaption(const QString& str); + void sig_progress(TQString str); + void changeStatusbar(const TQString& str,int id); + void changeCaption(const TQString& str); void showPreview(k9DVD *_dvd,k9DVDTitle * title,int chapter); void stopPreview(); void SelectionChanged(k9DVD *_dvd,bool _withMenus); void changedTitle(k9DVDTitle *_title); private: void fillLvLanguages(); - void updateLvLang(const eStreamType streamType,const QString & lang) ; - long getFreeSpace(const QString & _path); - void setProgressWindow(QWidget *_widget); + void updateLvLang(const eStreamType streamType,const TQString & lang) ; + long getFreeSpace(const TQString & _path); + void setProgressWindow(TQWidget *_widget); void removeProgressWindow(); |