void cDockNavigation::ConnectSignals() const { // ------------ camera manipulation ----------- connect(ui->bu_move_up, SIGNAL(clicked()), this, SLOT(slotCameraMove())); connect(ui->bu_move_down, SIGNAL(clicked()), this, SLOT(slotCameraMove())); connect(ui->bu_move_left, SIGNAL(clicked()), this, SLOT(slotCameraMove())); connect(ui->bu_move_right, SIGNAL(clicked()), this, SLOT(slotCameraMove())); connect(ui->bu_move_forward, SIGNAL(clicked()), this, SLOT(slotCameraMove())); connect(ui->bu_move_backward, SIGNAL(clicked()), this, SLOT(slotCameraMove())); connect(ui->bu_rotate_up, SIGNAL(clicked()), this, SLOT(slotCameraRotation())); connect(ui->bu_rotate_down, SIGNAL(clicked()), this, SLOT(slotCameraRotation())); connect(ui->bu_rotate_left, SIGNAL(clicked()), this, SLOT(slotCameraRotation())); connect(ui->bu_rotate_right, SIGNAL(clicked()), this, SLOT(slotCameraRotation())); connect(ui->bu_rotate_roll_left, SIGNAL(clicked()), this, SLOT(slotCameraRotation())); connect(ui->bu_rotate_roll_right, SIGNAL(clicked()), this, SLOT(slotCameraRotation())); connect(ui->vect3_camera_x, SIGNAL(editingFinished()), this, SLOT(slotCameraOrTargetEdited())); connect(ui->vect3_camera_y, SIGNAL(editingFinished()), this, SLOT(slotCameraOrTargetEdited())); connect(ui->vect3_camera_z, SIGNAL(editingFinished()), this, SLOT(slotCameraOrTargetEdited())); connect(ui->vect3_target_x, SIGNAL(editingFinished()), this, SLOT(slotCameraOrTargetEdited())); connect(ui->vect3_target_y, SIGNAL(editingFinished()), this, SLOT(slotCameraOrTargetEdited())); connect(ui->vect3_target_z, SIGNAL(editingFinished()), this, SLOT(slotCameraOrTargetEdited())); connect(ui->vect3_camera_rotation_x, SIGNAL(editingFinished()), this, SLOT(slotRotationEdited())); connect(ui->vect3_camera_rotation_y, SIGNAL(editingFinished()), this, SLOT(slotRotationEdited())); connect(ui->vect3_camera_rotation_z, SIGNAL(editingFinished()), this, SLOT(slotRotationEdited())); connect(ui->logedit_camera_distance_to_target, SIGNAL(editingFinished()), this, SLOT(slotCameraDistanceEdited())); connect(ui->comboBox_camera_absolute_distance_mode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotMovementStepModeChanged(int))); connect(ui->comboBox_camera_movement_mode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotCameraMovementModeChanged(int))); connect(ui->pushButton_undo, SIGNAL(clicked()), this, SLOT(slotUndo())); connect(ui->pushButton_redo, SIGNAL(clicked()), this, SLOT(slotRedo())); connect(ui->pushButton_render, SIGNAL(clicked()), this, SLOT(slotStartRender())); connect(ui->pushButton_stop, SIGNAL(clicked()), this, SLOT(slotStopRender())); connect(ui->pushButton_reset_view, SIGNAL(clicked()), this, SLOT(slotPressedButtonResetView())); }
void MainWindow::initMenu() { //file _fileMenu = menuBar()->addMenu(QWidget::tr("文件(&F)")); QAction* actionNewFile = new QAction(QIcon(":/images/new.png"), QWidget::tr("新建(&New)"), this); actionNewFile->setShortcut(QWidget::tr("Ctrl+N")); actionNewFile->setToolTip(QWidget::tr("新建场景文件")); connect(actionNewFile, SIGNAL(triggered()), this, SLOT(slotNewFile())); _fileMenu->addAction(actionNewFile); QAction* actionOpenFile = new QAction(QIcon(":/images/open.png"), QWidget::tr("打开(&Open)"), this); actionOpenFile->setShortcut(QWidget::tr("Ctrl+O")); actionOpenFile->setToolTip(QWidget::tr("打开一个场景文件")); connect(actionOpenFile, SIGNAL(triggered()), this, SLOT(slotOpenFile())); _fileMenu->addAction(actionOpenFile); QAction* actionSaveFile = new QAction(QIcon(":/images/save.png"), QWidget::tr("保存(&Save)"), this); actionSaveFile->setShortcut(QWidget::tr("Ctrl+S")); actionSaveFile->setToolTip(QWidget::tr("保存场景文件")); actionSaveFile->setEnabled(false); connect(actionSaveFile, SIGNAL(triggered()), this, SLOT(slotSaveFile())); _fileMenu->addAction(actionSaveFile); QAction* actionSaveAsFile = new QAction(QIcon(":/images/save.png"), QWidget::tr("另存(SaveAs)"), this); actionSaveAsFile->setToolTip(QWidget::tr("另存场景文件")); actionSaveAsFile->setEnabled(false); connect(actionSaveAsFile, SIGNAL(triggered()), this, SLOT(slotSaveAsFile())); _fileMenu->addAction(actionSaveAsFile); QAction* actionExit = new QAction(QIcon(":/images/close.png"), QWidget::tr("退出(&X)"), this); actionExit->setToolTip(QWidget::tr("退出场景编辑器")); connect(actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); _fileMenu->addAction(actionExit); //edit _editMenu = menuBar()->addMenu(QWidget::tr("编辑(&E)")); QAction* actionUndo = new QAction(QIcon(":/images/undo.png"), QWidget::tr("撤销"), this); actionUndo->setShortcut(QWidget::tr("Ctrl+Z")); actionUndo->setToolTip(QWidget::tr("撤销Ctrl+Z")); actionUndo->setEnabled(false); connect(actionUndo, SIGNAL(triggered()), this, SLOT(slotUndo())); _editMenu->addAction(actionUndo); QAction* actionRedo = new QAction(QIcon(":/images/redo.png"), QWidget::tr("重做"), this); actionRedo->setShortcut(QWidget::tr("Ctrl+Y")); actionRedo->setToolTip(QWidget::tr("重做Ctrl+Y")); actionRedo->setEnabled(false); connect(actionRedo, SIGNAL(triggered()), this, SLOT(slotRedo())); _editMenu->addAction(actionRedo); QAction* actionCopy = new QAction(QIcon(":/images/copy.png"), QWidget::tr("复制"), this); actionCopy->setShortcut(QWidget::tr("Ctrl+C")); actionCopy->setToolTip(QWidget::tr("复制Ctrl+C")); actionCopy->setEnabled(false); connect(actionCopy, SIGNAL(triggered()), this, SLOT(slotCopy())); _editMenu->addAction(actionCopy); QAction* actionRotateFast = new QAction(QIcon(":/images/rotate.png"), QWidget::tr("快速旋转"), this); actionRotateFast->setShortcut(QKeySequence(Qt::Key_F3)); actionRotateFast->setToolTip(QWidget::tr("快速旋转F3")); actionRotateFast->setEnabled(false); connect(actionRotateFast, SIGNAL(triggered()), this, SLOT(slotRotateFast())); _editMenu->addAction(actionRotateFast); QAction* actionAlign = new QAction(QIcon(":/images/align.png"), QWidget::tr("对齐"), this); actionAlign->setShortcut(QWidget::tr("Ctrl+L")); actionAlign->setToolTip(QWidget::tr("对齐Ctrl+L")); actionAlign->setEnabled(false); connect(actionAlign, SIGNAL(triggered()), this, SLOT(slotAlign())); _editMenu->addAction(actionAlign); QAction* actionDelete = new QAction(QIcon(":/images/delete.png"), QWidget::tr("删除"), this); actionDelete->setShortcut(QKeySequence(QKeySequence::Delete)); actionDelete->setToolTip(QWidget::tr("删除Delete")); actionDelete->setEnabled(false); connect(actionDelete, SIGNAL(triggered()), this, SLOT(slotDelete())); _editMenu->addAction(actionDelete); //windowsMenu _windowsMenu = menuBar()->addMenu(QWidget::tr("窗口(&W)")); QAction* actionObjectsTreeDockWidget = new QAction(QIcon(":/images/default.png"), QWidget::tr("场景树(&ObjTree)"), this); actionObjectsTreeDockWidget->setShortcut(QKeySequence("h")); actionObjectsTreeDockWidget->setToolTip(QWidget::tr("打开或隐藏对象树窗口")); actionObjectsTreeDockWidget->setEnabled(false); connect(actionObjectsTreeDockWidget, SIGNAL(triggered()), this, SLOT(slotObjectTreeWidgetActive())); _windowsMenu->addAction(actionObjectsTreeDockWidget); QAction* actionPropertyDockWidget = new QAction(QIcon(":/images/default.png"), QWidget::tr("属性窗"), this); actionPropertyDockWidget->setToolTip(QWidget::tr("打开或隐藏属性窗口")); actionPropertyDockWidget->setEnabled(false); connect(actionPropertyDockWidget, SIGNAL(triggered()), this, SLOT(slotPropertyDockWidgetActive())); _windowsMenu->addAction(actionPropertyDockWidget); QAction* actionBuiltinResourcesDockWidget = new QAction(QIcon(":/images/default.png"), QWidget::tr("内置资源列表"), this); actionBuiltinResourcesDockWidget->setToolTip(QWidget::tr("打开或隐藏内置资源列表窗口")); actionBuiltinResourcesDockWidget->setEnabled(false); connect(actionBuiltinResourcesDockWidget, SIGNAL(triggered()), this, SLOT(slotBuiltinResourcesDockWidgetActive())); _windowsMenu->addAction(actionBuiltinResourcesDockWidget); QAction* actionvdsResourcesDockWidget = new QAction(QIcon(":/images/default.png"), QWidget::tr("资源列表"), this); actionvdsResourcesDockWidget->setToolTip(QWidget::tr("打开或隐藏资源列表窗口")); actionvdsResourcesDockWidget->setEnabled(false); connect(actionvdsResourcesDockWidget, SIGNAL(triggered()), this, SLOT(slotvdsResourcesDockWidgetActive())); _windowsMenu->addAction(actionvdsResourcesDockWidget); QAction* actionCSharpAssemblyDockWidget = new QAction(QIcon(":/images/default.png"), QWidget::tr("脚本列表"), this); actionCSharpAssemblyDockWidget->setToolTip(QWidget::tr("打开或隐藏脚本列表窗口")); actionCSharpAssemblyDockWidget->setEnabled(false); connect(actionCSharpAssemblyDockWidget, SIGNAL(triggered()), this, SLOT(slotCSharpAssemblyDockWidgetActive())); _windowsMenu->addAction(actionCSharpAssemblyDockWidget); //tool _toolMenu = menuBar()->addMenu(QWidget::tr("工具(&T)")); QAction* actionAnimationMerge = new QAction(QIcon(":/images/default.png"), QWidget::tr("动画合并(&AnimationMerge)"), this); actionAnimationMerge->setToolTip(QWidget::tr("完成骨骼动画合并")); actionAnimationMerge->setEnabled(false); connect(actionAnimationMerge, SIGNAL(triggered()), this, SLOT(slotAnimationMerge())); _toolMenu->addAction(actionAnimationMerge); QAction* particleEdit = new QAction(QIcon(":/images/default.png"), QWidget::tr("粒子编辑(&Particle)"), this); particleEdit->setToolTip(QWidget::tr("编辑粒子效果")); particleEdit->setEnabled(false); connect(particleEdit, SIGNAL(triggered()), this, SLOT(slotParticleEdit())); _toolMenu->addAction(particleEdit); QAction* actionPlantBrushDockWidget = new QAction(QIcon(":/images/default.png"), QWidget::tr("植被编辑"), this); actionPlantBrushDockWidget->setToolTip(QWidget::tr("打开或隐藏植被编辑窗口")); actionPlantBrushDockWidget->setEnabled(false); connect(actionPlantBrushDockWidget, SIGNAL(triggered()), this, SLOT(slotPlantBrushDockWidgetActive())); _toolMenu->addAction(actionPlantBrushDockWidget); QAction* actionViewPointEdit = new QAction(QIcon(":/images/default.png"), QWidget::tr("视点编辑(&ViewPoint)"), this); actionViewPointEdit->setToolTip(QWidget::tr("定义视点")); actionViewPointEdit->setEnabled(false); connect(actionViewPointEdit, SIGNAL(triggered()), this, SLOT(slotViewPointEdit())); _toolMenu->addAction(actionViewPointEdit); QAction* actionPhysicalEdit = new QAction(QIcon(":/images/default.png"), QWidget::tr("物理编辑"), this); actionPhysicalEdit->setToolTip(QWidget::tr("定义碰撞体或碰撞面")); actionPhysicalEdit->setEnabled(false); connect(actionPhysicalEdit, SIGNAL(triggered()), this, SLOT(slotPhysicalEditDockWidgetActive())); _toolMenu->addAction(actionPhysicalEdit); QAction* actionRiverEdit = new QAction(QIcon(":/images/default.png"), QWidget::tr("河流编辑"), this); actionRiverEdit->setToolTip(QWidget::tr("定义河流效果")); actionRiverEdit->setEnabled(false); connect(actionRiverEdit, SIGNAL(triggered()), this, SLOT(slotRiverEditDockWidgetActive())); _toolMenu->addAction(actionRiverEdit); QAction* modelConvert = new QAction(QIcon(":/images/default.png"), QWidget::tr("模型转换(&ConvertModel)"), this); modelConvert->setToolTip(QWidget::tr("转换模型到其他平台")); modelConvert->setEnabled(true); connect(modelConvert, SIGNAL(triggered()), this, SLOT(slotConvertModel())); _toolMenu->addAction(modelConvert); QAction* compressDir = new QAction(QIcon(":/images/default.png"), QWidget::tr("压缩文件夹"), this); compressDir->setToolTip(QWidget::tr("压缩文件夹,可以设定文件名编码")); compressDir->setEnabled(true); connect(compressDir, SIGNAL(triggered()), this, SLOT(slotCompressDir())); _toolMenu->addAction(compressDir); //animation _animationMenu = menuBar()->addMenu(QWidget::tr("动画(&A)")); ///////////////////////////////////////////////////////////////////should move to PlotAnimation later QAction* actionViewPointAnimationEdit = new QAction(QIcon(":/images/default.png"), QWidget::tr("视点动画编辑"), this); actionViewPointAnimationEdit->setToolTip(QWidget::tr("编辑视点动画")); actionViewPointAnimationEdit->setEnabled(false); connect(actionViewPointAnimationEdit, SIGNAL(triggered()), this, SLOT(slotViewPointAnimationEdit())); _animationMenu->addAction(actionViewPointAnimationEdit); QAction* actionPlotAnimationEdit = new QAction(QIcon(":/images/default.png"), QWidget::tr("剧情编辑"), this); actionPlotAnimationEdit->setToolTip(QWidget::tr("编辑一段剧情")); actionPlotAnimationEdit->setEnabled(false); connect(actionPlotAnimationEdit, SIGNAL(triggered()), this, SLOT(slotPlotAnimationEdit())); _animationMenu->addAction(actionPlotAnimationEdit); }
KRegExpEditorPrivate::KRegExpEditorPrivate(TQWidget *parent, const char *name) : TQWidget(parent, name), _updating( false ), _autoVerify( true ) { setMinimumSize(730,300); TQDockArea* area = new TQDockArea(Qt::Horizontal, TQDockArea::Normal, this ); area->setMinimumSize(2,2); TQDockArea* verArea1 = new TQDockArea(Qt::Vertical, TQDockArea::Normal, this ); verArea1->setMinimumSize(2,2); TQDockArea* verArea2 = new TQDockArea(Qt::Vertical, TQDockArea::Reverse, this ); verArea2->setMinimumSize(2,2); // The DockWindows. _regExpButtons = new RegExpButtons( area, "KRegExpEditorPrivate::regExpButton" ); _verifyButtons = new VerifyButtons( area, "KRegExpEditorPrivate::VerifyButtons" ); _auxButtons = new AuxButtons( area, "KRegExpEditorPrivate::AuxButtons" ); _userRegExps = new UserDefinedRegExps( verArea1, "KRegExpEditorPrivate::userRegExps" ); _userRegExps->setResizeEnabled( true ); TQWhatsThis::add( _userRegExps, i18n( "In this window you will find predefined regular expressions. Both regular expressions " "you have developed and saved, and regular expressions shipped with the system." )); // Editor window _editor = new TQSplitter(Qt::Vertical, this, "KRegExpEditorPrivate::_editor" ); _scrolledEditorWindow = new RegExpScrolledEditorWindow( _editor, "KRegExpEditorPrivate::_scrolledEditorWindow" ); TQWhatsThis::add( _scrolledEditorWindow, i18n( "In this window you will develop your regular expressions. " "Select one of the actions from the action buttons above, and click the mouse in this " "window to insert the given action.")); _info = new InfoPage( this, "_info" ); _verifier = new Verifier( _editor, "KRegExpEditorPrivate::_verifier" ); connect( _verifier, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( maybeVerify() ) ); TQWhatsThis::add( _verifier, i18n("Type in some text in this window, and see what the regular expression you have developed matches.<p>" "Each second match will be colored in red and each other match will be colored blue, simply so you " "can distinguish them from each other.<p>" "If you select part of the regular expression in the editor window, then this part will be " "highlighted - This allows you to <i>debug</i> your regular expressions") ); _editor->hide(); _editor->setSizes( TQValueList<int>() << _editor->height()/2 << _editor->height()/2 ); TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, 6, "KRegExpEditorPrivate::topLayout" ); topLayout->addWidget( area ); TQHBoxLayout* rows = new TQHBoxLayout; // I need to cal addLayout explicit to get stretching right. topLayout->addLayout( rows, 1 ); rows->addWidget( verArea1 ); rows->addWidget( _editor, 1 ); rows->addWidget( _info, 1 ); rows->addWidget( verArea2 ); // Connect the buttons connect( _regExpButtons, TQT_SIGNAL( clicked( int ) ), _scrolledEditorWindow, TQT_SLOT( slotInsertRegExp( int ) ) ); connect( _regExpButtons, TQT_SIGNAL( doSelect() ), _scrolledEditorWindow, TQT_SLOT( slotDoSelect() ) ); connect( _userRegExps, TQT_SIGNAL( load( RegExp* ) ), _scrolledEditorWindow, TQT_SLOT( slotInsertRegExp( RegExp* ) ) ); connect( _regExpButtons, TQT_SIGNAL( clicked( int ) ), _userRegExps, TQT_SLOT( slotUnSelect() ) ); connect( _regExpButtons, TQT_SIGNAL( doSelect() ), _userRegExps, TQT_SLOT( slotUnSelect() ) ); connect( _userRegExps, TQT_SIGNAL( load( RegExp* ) ), _regExpButtons, TQT_SLOT( slotUnSelect() ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( doneEditing() ), _regExpButtons, TQT_SLOT( slotSelectNewAction() ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( doneEditing() ), _userRegExps, TQT_SLOT( slotSelectNewAction() ) ); connect( _regExpButtons, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotShowEditor() ) ); connect( _userRegExps, TQT_SIGNAL( load( RegExp* ) ), this, TQT_SLOT( slotShowEditor() ) ); connect( _regExpButtons, TQT_SIGNAL( doSelect() ), this, TQT_SLOT( slotShowEditor() ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( savedRegexp() ), _userRegExps, TQT_SLOT( slotPopulateUserRegexps() ) ); connect( _auxButtons, TQT_SIGNAL( undo() ), this, TQT_SLOT( slotUndo() ) ); connect( _auxButtons, TQT_SIGNAL( redo() ), this, TQT_SLOT( slotRedo() ) ); connect( _auxButtons, TQT_SIGNAL( cut() ), _scrolledEditorWindow, TQT_SLOT( slotCut() ) ); connect( _auxButtons, TQT_SIGNAL( copy() ), _scrolledEditorWindow, TQT_SLOT( slotCopy() ) ); connect( _auxButtons, TQT_SIGNAL( paste() ), _scrolledEditorWindow, TQT_SLOT( slotPaste() ) ); connect( _auxButtons, TQT_SIGNAL( save() ), _scrolledEditorWindow, TQT_SLOT( slotSave() ) ); connect( _verifyButtons, TQT_SIGNAL( autoVerify( bool ) ), this, TQT_SLOT( setAutoVerify( bool ) ) ); connect( _verifyButtons, TQT_SIGNAL( verify() ), this, TQT_SLOT( doVerify() ) ); connect( _verifyButtons, TQT_SIGNAL( changeSyntax( const TQString& ) ), this, TQT_SLOT( setSyntax( const TQString& ) ) ); connect( this, TQT_SIGNAL( canUndo( bool ) ), _auxButtons, TQT_SLOT( slotCanUndo( bool ) ) ); connect( this, TQT_SIGNAL( canRedo( bool ) ), _auxButtons, TQT_SLOT( slotCanRedo( bool ) ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( anythingSelected( bool ) ), _auxButtons, TQT_SLOT( slotCanCut( bool ) ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( anythingSelected( bool ) ), _auxButtons, TQT_SLOT( slotCanCopy( bool ) ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( anythingOnClipboard( bool ) ), _auxButtons, TQT_SLOT( slotCanPaste( bool ) ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( canSave( bool ) ), _auxButtons, TQT_SLOT( slotCanSave( bool ) ) ); connect( _scrolledEditorWindow, TQT_SIGNAL( verifyRegExp() ), this, TQT_SLOT( maybeVerify() ) ); connect( _verifyButtons, TQT_SIGNAL( loadVerifyText( const TQString& ) ), this, TQT_SLOT( setVerifyText( const TQString& ) ) ); // connect( _verifier, TQT_SIGNAL( countChanged( int ) ), _verifyButtons, TQT_SLOT( setMatchCount( int ) ) ); // TQt anchors do not work for <pre>...</pre>, thefore scrolling to next/prev match // do not work. Enable this when they work. // connect( _verifyButtons, TQT_SIGNAL( gotoFirst() ), _verifier, TQT_SLOT( gotoFirst() ) ); // connect( _verifyButtons, TQT_SIGNAL( gotoPrev() ), _verifier, TQT_SLOT( gotoPrev() ) ); // connect( _verifyButtons, TQT_SIGNAL( gotoNext() ), _verifier, TQT_SLOT( gotoNext() ) ); // connect( _verifyButtons, TQT_SIGNAL( gotoLast() ), _verifier, TQT_SLOT( gotoLast() ) ); // connect( _verifier, TQT_SIGNAL( goForwardPossible( bool ) ), _verifyButtons, TQT_SLOT( enableForwardButtons( bool ) ) ); // connect( _verifier, TQT_SIGNAL( goBackwardPossible( bool ) ), _verifyButtons, TQT_SLOT( enableBackwardButtons( bool ) ) ); _auxButtons->slotCanPaste( false ); _auxButtons->slotCanCut( false ); _auxButtons->slotCanCopy( false ); _auxButtons->slotCanSave( false ); // Line Edit TQHBoxLayout* layout = new TQHBoxLayout( topLayout, 6 ); TQLabel* label = new TQLabel( i18n("ASCII syntax:"), this ); layout->addWidget( label ); clearButton = new TQToolButton( this ); const TQString icon( TQString::fromLatin1( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); TQIconSet clearIcon = SmallIconSet( icon ); clearButton->setIconSet( clearIcon ); layout->addWidget( clearButton ); TQToolTip::add( clearButton, i18n("Clear expression") ); _regexpEdit = new TQLineEdit( this ); layout->addWidget( _regexpEdit ); TQWhatsThis::add( _regexpEdit, i18n( "This is the regular expression in ASCII syntax. You are likely only " "to be interested in this if you are a programmer, and need to " "develop a regular expression using TQRegExp.<p>" "You may develop your regular expression both by using the graphical " "editor, and by typing the regular expression in this line edit.") ); #ifdef TQT_ONLY TQPixmap pix( "icons/error.png" ); #else TQPixmap pix = TDEGlobal::iconLoader()->loadIcon(locate("data", TQString::fromLatin1("kregexpeditor/pics/error.png") ), TDEIcon::Toolbar ); #endif _error = new TQLabel( this ); _error->setPixmap( pix ); layout->addWidget( _error ); _error->hide(); _timer = new TQTimer(this); connect( _scrolledEditorWindow, TQT_SIGNAL( change() ), this, TQT_SLOT( slotUpdateLineEdit() ) ); connect( _regexpEdit, TQT_SIGNAL(textChanged( const TQString& ) ), this, TQT_SLOT( slotTriggerUpdate() ) ); connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) ); connect( clearButton, TQT_SIGNAL( clicked() ), _regexpEdit, TQT_SLOT( clear() ) ); // Push an initial empty element on the stack. _undoStack.push( _scrolledEditorWindow->regExp() ); _redoStack.setAutoDelete( true ); TQAccel* accel = new TQAccel( this ); accel->connectItem( accel->insertItem( CTRL+Key_Z ), this, TQT_SLOT( slotUndo() ) ); accel->connectItem( accel->insertItem( CTRL+Key_R ), this, TQT_SLOT( slotRedo() ) ); setSyntax( TQString::fromLatin1( "TQt" ) ); }