⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 command.h

📁 Linux下的基于X11的图形开发环境。
💻 H
📖 第 1 页 / 共 2 页
字号:
    QWizard *wizard;    int index1, index2;};class AddConnectionCommand : public Command{public:    AddConnectionCommand( const QString &name, FormWindow *fw,			  MetaDataBase::Connection c );    void execute();    void unexecute();    Type type() const { return AddConnection; }private:    MetaDataBase::Connection connection;};class RemoveConnectionCommand : public Command{public:    RemoveConnectionCommand( const QString &name, FormWindow *fw,			     MetaDataBase::Connection c );    void execute();    void unexecute();    Type type() const { return RemoveConnection; }private:    MetaDataBase::Connection connection;};class AddFunctionCommand : public Command{public:    AddFunctionCommand( const QString &name, FormWindow *fw, const QCString &f, const QString& spec,		        const QString &a, const QString &t, const QString &l, const QString &rt );    void execute();    void unexecute();    Type type() const { return AddFunction; }private:    QCString function;    QString specifier;    QString access;    QString functionType;    QString language;    QString returnType;};class ChangeFunctionAttribCommand : public Command{public:    ChangeFunctionAttribCommand( const QString &name, FormWindow *fw, MetaDataBase::Function f,				 const QString &on, const QString &os, const QString &oa,				 const QString &ot, const QString &ol, const QString &ort );    void execute();    void unexecute();    Type type() const { return ChangeFunctionAttrib; }private:    QString oldName, newName;    QString oldSpec, newSpec;    QString oldAccess, newAccess;    QString oldType, newType;    QString oldLang, newLang;    QString oldReturnType, newReturnType;};class RemoveFunctionCommand : public Command{public:    RemoveFunctionCommand( const QString &name, FormWindow *fw, const QCString &f, const QString& spec,		           const QString &a, const QString &t, const QString &l, const QString &rt );    void execute();    void unexecute();    Type type() const { return RemoveFunction; }private:    QCString function;    QString specifier;    QString access;    QString functionType;    QString language;    QString returnType;};class AddVariableCommand : public Command{public:    AddVariableCommand( const QString &name, FormWindow *fw, const QString &vn, const QString &a );    void execute();    void unexecute();    Type type() const { return AddVariable; }private:    QString varName;    QString access;};class SetVariablesCommand : public Command{public:    SetVariablesCommand( const QString &name, FormWindow *fw, QValueList<MetaDataBase::Variable> lst );    void execute();    void unexecute();    Type type() const { return SetVariables; }private:    QValueList<MetaDataBase::Variable> oldList, newList;};class RemoveVariableCommand : public Command{public:    RemoveVariableCommand( const QString &name, FormWindow *fw, const QString &vn );    void execute();    void unexecute();    Type type() const { return RemoveVariable; }private:    QString varName;    QString access;};class EditDefinitionsCommand : public Command{public:    EditDefinitionsCommand( const QString &name, FormWindow *fw, LanguageInterface *lf,			    const QString &n, const QStringList &l );    void execute();    void unexecute();    Type type() const { return EditDefinitions; }private:    LanguageInterface *lIface;    QString defName;    QStringList newList, oldList;};class LowerCommand : public Command{public:    LowerCommand( const QString &name, FormWindow *fw, const QWidgetList &w );    void execute();    void unexecute();    Type type() const { return Lower; }private:    QWidgetList widgets;};class RaiseCommand : public Command{public:    RaiseCommand( const QString &name, FormWindow *fw, const QWidgetList &w );    void execute();    void unexecute();    Type type() const { return Raise; }private:    QWidgetList widgets;};class PasteCommand : public Command{public:    PasteCommand( const QString &n, FormWindow *fw, const QWidgetList &w );    void execute();    void unexecute();    Type type() const { return Paste; }private:    QWidgetList widgets;};class TabOrderCommand : public Command{public:    TabOrderCommand( const QString &n, FormWindow *fw, const QWidgetList &ol, const QWidgetList &nl );    void execute();    void unexecute();    Type type() const { return TabOrder; }    void merge( Command *c );    bool canMerge( Command *c );private:    QWidgetList oldOrder, newOrder;};class PopulateListBoxCommand : public Command{public:    struct Item    {	QString text;	QPixmap pix;	Q_DUMMY_COMPARISON_OPERATOR( Item )    };    PopulateListBoxCommand( const QString &n, FormWindow *fw,			    QListBox *lb, const QValueList<Item> &items );    void execute();    void unexecute();    Type type() const { return PopulateListBox; }    bool operator==( const PopulateListBoxCommand & ) const;private:    QValueList<Item> oldItems, newItems;    QListBox *listbox;};class PopulateIconViewCommand : public Command{public:    struct Item    {	QString text;	QPixmap pix;	Q_DUMMY_COMPARISON_OPERATOR( Item )    };    PopulateIconViewCommand( const QString &n, FormWindow *fw,			    QIconView *iv, const QValueList<Item> &items );    void execute();    void unexecute();    Type type() const { return PopulateIconView; }    bool operator==( const PopulateIconViewCommand & ) const;private:    QValueList<Item> oldItems, newItems;    QIconView *iconview;};class PopulateListViewCommand : public Command{public:    PopulateListViewCommand( const QString &n, FormWindow *fw,			     QListView *lv, QListView *from );    void execute();    void unexecute();    Type type() const { return PopulateListView; }    static void transferItems( QListView *from, QListView *to );    bool operator==( const PopulateListViewCommand & ) const;private:    QListView *oldItems, *newItems;    QListView *listview;};class PopulateMultiLineEditCommand : public Command{public:    PopulateMultiLineEditCommand( const QString &n, FormWindow *fw,				  QTextEdit *mle, const QString &txt );    void execute();    void unexecute();    Type type() const { return PopulateMultiLineEdit; }private:    QString newText, oldText;    QTextEdit *mlined;    bool wasChanged;};class PopulateTableCommand : public Command{public:    struct Row    {	QString text;	QPixmap pix;	Q_DUMMY_COMPARISON_OPERATOR( Row )    };    struct Column    {	QString text;	QPixmap pix;	QString field;	Q_DUMMY_COMPARISON_OPERATOR( Column )    };    PopulateTableCommand( const QString &n, FormWindow *fw, QTable *t,			  const QValueList<Row> &rows,			  const QValueList<Column> &columns );    void execute();    void unexecute();    Type type() const { return PopulateTable; }private:    QValueList<Row> oldRows, newRows;    QValueList<Column> oldColumns, newColumns;    QTable *table;};class AddActionToToolBarCommand : public Command{public:    AddActionToToolBarCommand( const QString &n, FormWindow *fw,			       QAction *a, QDesignerToolBar *tb, int idx );    void execute();    void unexecute();    Type type() const { return AddActionToToolBar; }private:    QAction *action;    QDesignerToolBar *toolBar;    int index;};class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand{public:    RemoveActionFromToolBarCommand( const QString &n, FormWindow *fw,				    QAction *a, QDesignerToolBar *tb, int idx )	: AddActionToToolBarCommand( n, fw, a, tb, idx ) {}    void execute() { AddActionToToolBarCommand::unexecute(); }    void unexecute() { AddActionToToolBarCommand::execute(); }    Type type() const { return RemoveActionFromToolBar; }};class AddActionToPopupCommand : public Command{public:    AddActionToPopupCommand( const QString &n, FormWindow *fw,			       QAction *a, QDesignerPopupMenu *p, int idx );    void execute();    void unexecute();    Type type() const { return AddActionToPopup; }private:    QAction *action;    QDesignerPopupMenu *popup;    int index;};class RemoveActionFromPopupCommand : public AddActionToPopupCommand{public:    RemoveActionFromPopupCommand( const QString &n, FormWindow *fw,				    QAction *a, QDesignerPopupMenu *p, int idx )	: AddActionToPopupCommand( n, fw, a, p, idx ) {}    void execute() { AddActionToPopupCommand::unexecute(); }    void unexecute() { AddActionToPopupCommand::execute(); }    Type type() const { return RemoveActionFromPopup; }};class AddMenuCommand : public Command{public:    AddMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw );    void execute();    void unexecute();    Type type() const { return AddMenu; }protected:    QDesignerMenuBar *menuBar;    QDesignerPopupMenu *popup;    QMainWindow *mainWindow;    int id;    int index;    QString name;};class RemoveMenuCommand : public AddMenuCommand{public:    RemoveMenuCommand( const QString &n, FormWindow *fw, QMainWindow *mw,		       QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const QString &mn )	: AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; }    void execute() { AddMenuCommand::unexecute(); }    void unexecute() { AddMenuCommand::execute(); }    Type type() const { return RemoveMenu; }};class RenameMenuCommand : public Command{public:    RenameMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,		       int i, const QString &on, const QString &nn );    void execute();    void unexecute();    Type type() const { return RenameMenu; }private:    QDesignerMenuBar *menuBar;    int id;    QString oldName, newName;};class MoveMenuCommand : public Command{public:    MoveMenuCommand( const QString &n, FormWindow *fw, QDesignerMenuBar *mb,		     QDesignerPopupMenu *p, int fidx, int tidx, const QString &txt );    void execute();    void unexecute();    Type type() const { return MoveMenu; }private:    QDesignerMenuBar *menuBar;    QDesignerPopupMenu *popup;    int fromIdx, toIdx;    QString text;};class AddToolBarCommand : public Command{public:    AddToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw );    void execute();    void unexecute();    Type type() const { return AddToolBar; }protected:    QDesignerToolBar *toolBar;    QMainWindow *mainWindow;};class RemoveToolBarCommand : public AddToolBarCommand{public:    RemoveToolBarCommand( const QString &n, FormWindow *fw, QMainWindow *mw, QDesignerToolBar *tb )	: AddToolBarCommand( n, fw, mw ) { toolBar = tb; }    void execute() { AddToolBarCommand::unexecute(); }    void unexecute() { AddToolBarCommand::execute(); }    Type type() const { return RemoveToolBar; }};#ifdef QT_CONTAINER_CUSTOM_WIDGETSclass QWidgetContainerInterfacePrivate;class AddContainerPageCommand : public Command{public:    AddContainerPageCommand( const QString &n, FormWindow *fw,			     QWidget *c, const QString &label );    ~AddContainerPageCommand();    void execute();    void unexecute();    Type type() const { return AddContainerPage; }private:    QString wClassName;    QWidget *container;    int index;    QString pageLabel;    QWidget *page;    QWidgetContainerInterfacePrivate *wiface;};class DeleteContainerPageCommand : public Command{public:    DeleteContainerPageCommand( const QString &n, FormWindow *fw,				QWidget *container, int index );    ~DeleteContainerPageCommand();    void execute();    void unexecute();    Type type() const { return DeleteContainerPage; }private:    QString wClassName;    QWidget *container;    int index;    QString pageLabel;    QWidget *page;    QWidgetContainerInterfacePrivate *wiface;};class RenameContainerPageCommand : public Command{public:    RenameContainerPageCommand( const QString &n, FormWindow *fw,				QWidget *container, int index,				const QString &label );    ~RenameContainerPageCommand();    void execute();    void unexecute();    Type type() const { return RenameContainerPage; }private:    QString wClassName;    QWidget *container;    int index;    QString oldLabel, newLabel;    QWidgetContainerInterfacePrivate *wiface;};#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -