kgtk-qt3 – TDE dialogs in GTK 2.x applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kdialogd.h 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. #ifndef __KDIALOGD_H__
  2. #define __KDIALOGD_H__
  3. #include <tdefile.h>
  4. #include <tdefiledialog.h>
  5. #include <tdefiledialog.h>
  6. #include <kdirselectdialog.h>
  7. #include "common.h"
  8. #include "config.h"
  9. #ifdef KDIALOGD_APP
  10. class TQTimer;
  11. #else
  12. #include <kdedmodule.h>
  13. #endif
  14. class KDialogBase;
  15. class TDEConfig;
  16. class KDialogDFileDialog : public KFileDialog
  17. {
  18. Q_OBJECT
  19. public:
  20. KDialogDFileDialog(TQString &an, Operation op, const TQString& startDir, const TQString& filter,
  21. bool confirmOw);
  22. virtual ~KDialogDFileDialog();
  23. public slots:
  24. void accept();
  25. void slotOk();
  26. signals:
  27. void ok(const TQStringList &items);
  28. private:
  29. bool itsConfirmOw;
  30. TQString &itsAppName;
  31. };
  32. class KDialogDDirSelectDialog : public KDirSelectDialog
  33. {
  34. Q_OBJECT
  35. public:
  36. KDialogDDirSelectDialog(TQString &an, const TQString &startDir = TQString(),
  37. bool localOnly = false,
  38. TQWidget *parent = 0L,
  39. const char *name = 0, bool modal = false);
  40. virtual ~KDialogDDirSelectDialog();
  41. public slots:
  42. void slotOk();
  43. signals:
  44. void ok(const TQStringList &items);
  45. private:
  46. TQString &itsAppName;
  47. };
  48. class KDialogDClient : public TQObject
  49. {
  50. Q_OBJECT
  51. public:
  52. KDialogDClient(int sock, const TQString &an, TQObject *parent);
  53. virtual ~KDialogDClient();
  54. public slots:
  55. void read();
  56. void close();
  57. void ok(const TQStringList &items);
  58. void finished();
  59. signals:
  60. void error(KDialogDClient *);
  61. private:
  62. void cancel();
  63. bool readData(TQCString &buffer, int size);
  64. bool readData(char *buffer, int size) { return readBlock(itsFd, buffer, size); }
  65. bool writeData(const char *buffer, int size) { return writeBlock(itsFd, buffer, size); }
  66. bool readString(TQString &str);
  67. bool writeString(const TQString &str);
  68. void initDialog(const TQString &caption, KDialogBase *d, unsigned int xid);
  69. private:
  70. int itsFd;
  71. KDialogBase *itsDlg;
  72. bool itsAccepted;
  73. TQString itsAppName;
  74. };
  75. class KDialogD : public TQObject
  76. {
  77. Q_OBJECT
  78. public:
  79. KDialogD(TQObject *parent=0L);
  80. virtual ~KDialogD();
  81. public slots:
  82. void newConnection();
  83. void deleteConnection(KDialogDClient *client);
  84. void timeout();
  85. static TDEConfig * config() { return theirConfig; }
  86. private:
  87. #ifdef KDIALOGD_APP
  88. TQTimer *itsTimer;
  89. int itsTimeoutVal;
  90. #endif
  91. int itsFd,
  92. itsNumConnections;
  93. static TDEConfig *theirConfig;
  94. };
  95. #ifndef KDIALOGD_APP
  96. class KDialogDKDED : public KDEDModule
  97. {
  98. public:
  99. KDialogDKDED(const TQCString &obj);
  100. };
  101. #endif
  102. #endif