Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSSEditor_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSSEditor_p.h
00003  -------------------
00004  begin                : 07/02/2011
00005  copyright            : (C) 2003-2011 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014  Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015  bajo  los  términos  de  la  Licencia  Pública General de GNU   en  su
00016  versión 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSSEDITOR_P_H_
00020 #define AQSSEDITOR_P_H_
00021 
00022 #include "AQSWidget_p.h"
00023 #include <qseditor.h>
00024 
00025 class AQSSEditor : public AQSWidget
00026 {
00027   Q_OBJECT
00028 
00029   AQ_DECLARE_AQS_OBJECT(SEditor, Widget);
00030 
00031 protected:
00032   static void *specializedConstruct(void *co) {
00033     if (co)
00034       static_cast<QSEditor *>(co)->setInterpreter(globalAQSInterpreter);
00035     return co;
00036   }
00037 
00038   //@AQ_BEGIN_DEF_PUB_SLOTS@
00039 public slots:
00040   void setText(const QString &);
00041   QString text() const;
00042   bool isModified() const;
00043   void commit();
00044   void revert();
00045   bool isActive() const;
00046   bool isUndoAvailable() const;
00047   bool isRedoAvailable() const;
00048   void undo();
00049   void redo();
00050   void cut();
00051   void copy();
00052   void paste();
00053   void selectAll();
00054   bool find(const QString &, bool, bool, bool, bool);
00055   bool replace(const QString &, const QString &, bool, bool, bool, bool, bool);
00056   void gotoLine(int);
00057   void indent();
00058   void readSettings();
00059   void setErrorMark(int);
00060   void removeErrorMark();
00061   QTextEdit *textEdit() const;
00062 
00063 protected:
00064   static void *construct(const QSArgumentList &args) {
00065     QMap<int, QStringList> candidates;
00066     candidates[1].append(QString::fromLatin1("QWidget*"));
00067     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00068     QString sgt(castArgsSignature(args, candidates));
00069     if (sgt == QString::fromLatin1("QWidget*"))
00070       return new QSEditor(argValue<QWidget *>(args[0]));
00071     if (sgt == QString::fromLatin1("QWidget*,QString"))
00072       return new QSEditor(argValue<QWidget *>(args[0]),
00073                           *(argValue<QString *>(args[1])));
00074     return 0;
00075   }
00076 
00077 public:
00078   static QMap<int, QStringList> candidateConstructors() {
00079     QMap<int, QStringList> candidates;
00080     candidates[1].append(QString::fromLatin1("QWidget*"));
00081     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00082     return candidates;
00083   }
00084   //@AQ_END_DEF_PUB_SLOTS@
00085 };
00086 
00087 //@AQ_BEGIN_IMP_PUB_SLOTS@
00088 inline void AQSSEditor::setText(const QString &arg0)
00089 {
00090   AQ_CALL_VOID(setText(arg0));
00091 }
00092 inline QString AQSSEditor::text() const
00093 {
00094   AQ_CALL_RET_V(text(), QString);
00095 }
00096 inline bool AQSSEditor::isModified() const
00097 {
00098   AQ_CALL_RET_V(isModified(), bool);
00099 }
00100 inline void AQSSEditor::commit()
00101 {
00102   AQ_CALL_VOID(commit());
00103 }
00104 inline void AQSSEditor::revert()
00105 {
00106   AQ_CALL_VOID(revert());
00107 }
00108 inline bool AQSSEditor::isActive() const
00109 {
00110   AQ_CALL_RET_V(isActive(), bool);
00111 }
00112 inline bool AQSSEditor::isUndoAvailable() const
00113 {
00114   AQ_CALL_RET_V(isUndoAvailable(), bool);
00115 }
00116 inline bool AQSSEditor::isRedoAvailable() const
00117 {
00118   AQ_CALL_RET_V(isRedoAvailable(), bool);
00119 }
00120 inline void AQSSEditor::undo()
00121 {
00122   AQ_CALL_VOID(undo());
00123 }
00124 inline void AQSSEditor::redo()
00125 {
00126   AQ_CALL_VOID(redo());
00127 }
00128 inline void AQSSEditor::cut()
00129 {
00130   AQ_CALL_VOID(cut());
00131 }
00132 inline void AQSSEditor::copy()
00133 {
00134   AQ_CALL_VOID(copy());
00135 }
00136 inline void AQSSEditor::paste()
00137 {
00138   AQ_CALL_VOID(paste());
00139 }
00140 inline void AQSSEditor::selectAll()
00141 {
00142   AQ_CALL_VOID(selectAll());
00143 }
00144 inline bool AQSSEditor::find(const QString &arg0,  bool arg1,  bool arg2,  bool arg3,  bool arg4)
00145 {
00146   AQ_CALL_RET_V(find(arg0, arg1, arg2, arg3, arg4), bool);
00147 }
00148 inline bool AQSSEditor::replace(const QString &arg0,  const QString &arg1,  bool arg2,  bool arg3,  bool arg4,  bool arg5,  bool arg6)
00149 {
00150   AQ_CALL_RET_V(replace(arg0, arg1, arg2, arg3, arg4, arg5, arg6), bool);
00151 }
00152 inline void AQSSEditor::gotoLine(int arg0)
00153 {
00154   AQ_CALL_VOID(gotoLine(arg0));
00155 }
00156 inline void AQSSEditor::indent()
00157 {
00158   AQ_CALL_VOID(indent());
00159 }
00160 inline void AQSSEditor::readSettings()
00161 {
00162   AQ_CALL_VOID(readSettings());
00163 }
00164 inline void AQSSEditor::setErrorMark(int arg0)
00165 {
00166   AQ_CALL_VOID(setErrorMark(arg0));
00167 }
00168 inline void AQSSEditor::removeErrorMark()
00169 {
00170   AQ_CALL_VOID(removeErrorMark());
00171 }
00172 inline QTextEdit *AQSSEditor::textEdit() const
00173 {
00174   AQ_CALL_RET(textEdit());
00175 }
00176 //@AQ_END_IMP_PUB_SLOTS@
00177 
00178 #endif /* AQSSEDITOR_P_H_ */
00179 // @AQSWIDGET@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'