diff --git a/plugins/mapper/cmapwidget.cpp b/plugins/mapper/cmapwidget.cpp index 83bef69..690640a 100644 --- a/plugins/mapper/cmapwidget.cpp +++ b/plugins/mapper/cmapwidget.cpp @@ -1,416 +1,417 @@ /*************************************************************************** cmapwidget.cpp ------------------- begin : Sun Mar 18 2001 copyright : (C) 2001 by Kmud Developer Team email : kmud-devel@kmud.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "cmapwidget.h" #include #include +#include #include #include #include #include "cmapmanager.h" #include "cmapzone.h" #include "cmaplevel.h" #include "cmappath.h" #include "cmapcmdelementproperties.h" #include "cmapview.h" #include "cmaptoolbase.h" #include "cmappluginbase.h" static unsigned char move_bits[] = { 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0x80, 0x01, 0x80, 0x01, 0x84, 0x21, 0x86, 0x61, 0xff, 0xff, 0xff, 0xff, 0x86, 0x61, 0x84, 0x21, 0x80, 0x01, 0x80, 0x01, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01}; CMapWidget::CMapWidget(CMapView *view,CMapManager *manager,QWidget *parent) : QWidget(parent) { // Setup vars viewWidget = view; bMouseDrag = false; QBitmap mouseDragCursorShape = QBitmap::fromData (QSize(16,16), move_bits); mouseDragCursor = new QCursor( mouseDragCursorShape, mouseDragCursorShape, -1,-1); mapManager = manager; initContexMenus(); // FIXME_jp : set to proper size instead of test size // Setup scrollview setFocusPolicy(Qt::StrongFocus); setMouseTracking(true); setFocus(); } CMapWidget::~CMapWidget() { viewWidget = NULL; } /** Used to create the element context menus */ void CMapWidget::initContexMenus(void) { room_menu = (QMenu *)getView()->guiFactory()->container("room_popup",getView()); text_menu = (QMenu *)getView()->guiFactory()->container("text_popup",getView()); path_menu = (QMenu *)getView()->guiFactory()->container("path_popup",getView()); empty_menu = (QMenu *)getView()->guiFactory()->container("empty_popup",getView()); } /** Used to get the views */ CMapView *CMapWidget::getView(void) { return viewWidget; } /** draw the map widget */ void CMapWidget::paintEvent(QPaintEvent *ev) { QPainter p(this); CMapZone *zone = viewWidget->getCurrentlyViewedZone(); QColor color = zone->getUseDefaultBackground() ? mapManager->getMapData()->backgroundColor : zone->getBackgroundColor(); p.fillRect(ev->rect(), color); drawGrid(&p); drawElements(&p); mapManager->getCurrentTool()->paint(&p); } bool CMapWidget::event(QEvent *e) { if (e->type() == QEvent::ToolTip) { QHelpEvent *helpEvent = static_cast(e); QPoint point = helpEvent->pos(); CMapView *view = getView(); CMapLevel *level = view->getCurrentlyViewedLevel(); CMapElement *element = level ? level->findElementAt(point) : 0; QString s; if (element) { if (element->getElementType() == ROOM) { s = ((CMapRoom*)element)->getLabel(); } else if (element->getElementType() == ZONE) { s = ((CMapZone*)element)->getLabel(); } if (!s.trimmed().isEmpty()) QToolTip::showText (helpEvent->globalPos(), s, this); else QToolTip::hideText (); } } return QWidget::event(e); } /** Draw the grid if it's visible */ void CMapWidget::drawGrid(QPainter* p) { if (!mapManager->getMapData()->gridVisable) return; p->setPen(mapManager->getMapData()->gridColor); QSize gridSize = mapManager->getMapData()->gridSize; int maxx = width(); int maxy = height(); // Draw the lines going across for (int y = 0; y <= maxy; y += gridSize.width()) p->drawLine(0, y, maxx, y); // Draw the lines going down for (int x = 0; x <= maxx; x += gridSize.height()) p->drawLine(x, 0, x, maxy); } /** Used to draw all the elments */ void CMapWidget::drawElements(QPainter *p) { CMapLevel *level = viewWidget->getCurrentlyViewedLevel(); if (!level) return; CMapLevel *lowerLevel = level->getPrevLevel(); CMapLevel *upperLevel = level->getNextLevel(); // Mark all paths as undrawn foreach (CMapRoom *room, *level->getRoomList()) foreach (CMapPath *path, *room->getPathList()) path->setDone(false); if (lowerLevel && mapManager->getMapData()->showLowerLevel) { foreach (CMapRoom *room, *lowerLevel->getRoomList()) foreach (CMapPath *path, *room->getPathList()) path->setDone(false); } if (upperLevel && mapManager->getMapData()->showUpperLevel) { foreach (CMapRoom *room, *upperLevel->getRoomList()) foreach (CMapPath *path, *room->getPathList()) path->setDone(false); } // Draw the upper map elements if (lowerLevel && mapManager->getMapData()->showLowerLevel) foreach (CMapElement *element, lowerLevel->getAllElements()) element->lowerPaint(p, viewWidget->getCurrentlyViewedZone()); // Paint the map elements of the current map foreach (CMapElement *element, level->getAllElements()) if (element->getDoPaint()) element->paint(p, viewWidget->getCurrentlyViewedZone()); // Draw the upper map elements if (upperLevel && mapManager->getMapData()->showUpperLevel) { foreach (CMapElement *element, upperLevel->getAllElements()) element->higherPaint(p, viewWidget->getCurrentlyViewedZone()); } } /** The mouse release event */ void CMapWidget::mouseReleaseEvent(QMouseEvent *e) { QCursor* oldCursor; switch (e->button()) { case Qt::LeftButton: // Send the mouse event to the current tool mapManager->getCurrentTool()->mouseReleaseEvent(e->pos(),e,viewWidget->getCurrentlyViewedLevel()); break; case Qt::MidButton: bMouseDrag = false; oldCursor= new QCursor(cursor()); setCursor(*mouseDragCursor); delete mouseDragCursor; mouseDragCursor = oldCursor; break; default: break; } } void CMapWidget::showRoomContextMenu(void) { CMapRoom *room = (CMapRoom *) getView()->getSelectedElement(); KActionCollection *acol = getView()->actionCollection(); QAction *roomSetCurrentPos = acol->action("roomCurrentPos"); QAction *roomSetLogin = acol->action("roomLoginPoint"); KSelectAction *labelMenu=(KSelectAction *) acol->action("labelMenu"); roomSetCurrentPos->setEnabled(!room->getCurrentRoom()); roomSetLogin->setEnabled(!room->getLoginRoom()); switch(room->getLabelPosition()) { case CMapRoom::HIDE : labelMenu->setCurrentItem(0); break; case CMapRoom::NORTH : labelMenu->setCurrentItem(1); break; case CMapRoom::NORTHEAST : labelMenu->setCurrentItem(2); break; case CMapRoom::EAST : labelMenu->setCurrentItem(3); break; case CMapRoom::SOUTHEAST : labelMenu->setCurrentItem(4); break; case CMapRoom::SOUTH : labelMenu->setCurrentItem(5); break; case CMapRoom::SOUTHWEST : labelMenu->setCurrentItem(6); break; case CMapRoom::WEST : labelMenu->setCurrentItem(7); break; case CMapRoom::NORTHWEST : labelMenu->setCurrentItem(8); break; case CMapRoom::CUSTOM : labelMenu->setCurrentItem(9); break; } showContextMenu (room_menu); } void CMapWidget::showPathContextMenu(void) { CMapPath *path = (CMapPath *) getView()->getSelectedElement(); bool twoWay = path->getOpsitePath(); KActionCollection *acol = getView()->actionCollection(); KToggleAction *pathTwoWay = (KToggleAction *)acol->action("pathTwoWay"); KToggleAction *pathOneWay = (KToggleAction *)acol->action("pathOneWay"); QAction *pathEditBends = acol->action("pathEditBends"); QAction *pathDelBend = acol->action("pathDelBend"); QAction *pathAddBend = acol->action("pathAddBend"); pathTwoWay->setChecked(twoWay); pathOneWay->setChecked(!twoWay); CMapView *view = (CMapView *) viewWidget; pathDelBend->setEnabled(path->mouseInPathSeg(selectedPos,view->getCurrentlyViewedZone())!=-1); pathEditBends->setEnabled(path->getBendCount() > 0); pathAddBend->setEnabled(path->getSrcRoom()->getZone()==path->getDestRoom()->getZone()); showContextMenu (path_menu); } void CMapWidget::showTextContextMenu(void) { showContextMenu (text_menu); } void CMapWidget::showOtherContextMenu(void) { showContextMenu (empty_menu); } void CMapWidget::showContextMenu(QMenu *menu) { CMapView *view = mapManager->getActiveView(); CMapElement *el = view->getSelectedElement(); popupMenu(el, menu, selectedPos); } void CMapWidget::showContexMenu(QMouseEvent *e) { CMapLevel *level = viewWidget->getCurrentlyViewedLevel(); if (!level) return; CMapView *view = mapManager->getActiveView(); view->setSelectedPos(e->pos()); selectedPos = e->pos(); view->setSelectedElement(0); CMapElement *element = level->findElementAt (e->pos()); if (!element) { showOtherContextMenu(); return; } view->setSelectedElement(element); mapManager->unsetEditElement(); switch(element->getElementType()) { case ROOM : showRoomContextMenu(); break; case PATH : showPathContextMenu(); break; case TEXT : showTextContextMenu(); break; default : showOtherContextMenu(); break; } } /** This method is used to tell the plugins a menu is about to open then open the menu */ void CMapWidget::popupMenu(CMapElement *element,QMenu *menu,QPoint pos) { if (element) { for (CMapPluginBase *plugin = mapManager->getPluginList()->first();plugin!=0;plugin = mapManager->getPluginList()->next()) plugin->beforeOpenElementMenu(element); } menu->popup(mapToGlobal(pos)); } /** This is called when the mouse leaves the widget */ void CMapWidget::leaveEvent(QEvent *) { // Send the mouse event to the current tool mapManager->getCurrentTool()->mouseLeaveEvent(); } /** This is called when the mouse enters the widget */ void CMapWidget::enterEvent(QEvent *) { // Send the mouse event to the current tool mapManager->getCurrentTool()->mouseEnterEvent(); } /** The mouse press event */ void CMapWidget::mousePressEvent(QMouseEvent *e) { QCursor* oldCursor; switch (e->button()) { case Qt::RightButton: showContexMenu(e); break; case Qt::MidButton: bMouseDrag = true; nMouseDragPosX = e->globalX(); nMouseDragPosY = e->globalY(); oldCursor = new QCursor(cursor()); setCursor(*mouseDragCursor); delete mouseDragCursor; mouseDragCursor = oldCursor; break; case Qt::LeftButton: // Send the mouse event to the current tool //p.begin(viewport()); //p.translate(-contentsX(),-contentsY()); mapManager->getCurrentTool()->mousePressEvent(e->pos(),e,viewWidget->getCurrentlyViewedLevel()); //p.end(); default: break; } } void CMapWidget::mouseDoubleClickEvent(QMouseEvent *e) { mapManager->getCurrentTool()->mouseDoubleClickEvent(e->pos(), e, viewWidget->getCurrentlyViewedLevel()); } /** Called when the mouse is being moved */ void CMapWidget::mouseMoveEvent(QMouseEvent *e) { if (bMouseDrag) { int dx, dy; dx = e->globalX() - nMouseDragPosX; dy = e->globalY() - nMouseDragPosY; nMouseDragPosX = e->globalX(); nMouseDragPosY = e->globalY(); QScrollArea *parent = (QScrollArea *) parentWidget(); QScrollBar *sx = parent->horizontalScrollBar(); QScrollBar *sy = parent->verticalScrollBar(); sx->setValue(sx->value() + dx*3); sy->setValue(sy->value() + dy*3); } else { // Send the mouse event to the current tool mapManager->getCurrentTool()->mouseMoveEvent(e->pos(),e->button(),viewWidget->getCurrentlyViewedLevel()); } } /** Called when a key is pressed */ void CMapWidget::keyPressEvent(QKeyEvent *e) { mapManager->getCurrentTool()->keyPressEvent(e); } /** Called when a key is released */ void CMapWidget::keyReleaseEvent(QKeyEvent *e) { mapManager->getCurrentTool()->keyReleaseEvent(e); } diff --git a/plugins/mapper/cmapwidget.h b/plugins/mapper/cmapwidget.h index dd345f8..f94ecf4 100644 --- a/plugins/mapper/cmapwidget.h +++ b/plugins/mapper/cmapwidget.h @@ -1,116 +1,115 @@ /*************************************************************************** cmapwidget.h ------------------- begin : Sun Mar 18 2001 copyright : (C) 2001 by Kmud Developer Team email : kmud-devel@kmud.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef CMAPWIDGET_H #define CMAPWIDGET_H #include -#include #include #include #include #include class CMapManager; class CMapElement; class CMapLevel; class CMapView; /**This is that map widget used for displaying a view of the map *@author Kmud Developer Team */ class CMapWidget : public QWidget { Q_OBJECT public: CMapWidget(CMapView *view,CMapManager *manager,QWidget *parent=0); virtual ~CMapWidget(); /** Used to get the views */ CMapView *getView(void); protected: /** This is used to display custop tooltips. */ bool event (QEvent *e); /** This is called when the mouse leaves the widget */ void leaveEvent(QEvent *e); /** This is called when the mouse enters the widget */ void enterEvent(QEvent *e); /** draw the map widget */ void paintEvent(QPaintEvent *); /** The mouse release event */ void mouseReleaseEvent(QMouseEvent *e); /** The mouse press event */ void mousePressEvent(QMouseEvent *e); /** Called when the mouse is being moved */ void mouseMoveEvent(QMouseEvent *e); /** double click event */ void mouseDoubleClickEvent(QMouseEvent *e); /** Called when a key is pressed */ virtual void keyPressEvent(QKeyEvent *e); /** Called when a key is released */ virtual void keyReleaseEvent(QKeyEvent *e); /** Used to display the text context menu */ void showTextContextMenu(void); /** Used to display the path context menu */ void showPathContextMenu(void); /** Used to display the Room context menu */ void showRoomContextMenu(void); /** Used to display the context menu for other / no elements */ void showOtherContextMenu(void); void showContextMenu(QMenu *menu); /** Draw the map elements */ virtual void drawElements(QPainter *p); /** Draw the grid if it's visible */ virtual void drawGrid(QPainter* p); private: /** Show the context menus */ void showContexMenu(QMouseEvent *e); /** Used to create the element context menus */ void initContexMenus(void); /** This method is used to tell the plugins a menu is about to open then open the menu */ void popupMenu(CMapElement *element,QMenu *menu,QPoint pos); friend class CMapView; private: QPoint selectedPos; /** true when the map is being moved by mouse */ bool bMouseDrag; /** y position of last mouse drag event */ int nMouseDragPosY; /** x position of last mouse drag event */ int nMouseDragPosX; /** The Cursor used when move draging the map */ QCursor* mouseDragCursor; // Menus QMenu *room_menu; QMenu *path_menu; QMenu *text_menu; QMenu *empty_menu; /** A pointer to the map manager */ CMapManager *mapManager; /** A pointer to the mapview */ CMapView *viewWidget; }; #endif diff --git a/plugins/mapper/dialogs/dlgmappathpropertiesbase.ui b/plugins/mapper/dialogs/dlgmappathpropertiesbase.ui index 82ef0bd..594e528 100644 --- a/plugins/mapper/dialogs/dlgmappathpropertiesbase.ui +++ b/plugins/mapper/dialogs/dlgmappathpropertiesbase.ui @@ -1,1212 +1,1200 @@ DlgMapPathPropertiesBase 0 0 435 486 Path Properties 6 11 0 Exits 11 6 - + Exit Details 6 11 Two Way Exit Normal exit 6 0 6 0 Source Directions false 0 6 Down true 30 30 30 30 E true 30 30 30 30 S true 0 0 32767 32767 Up true 30 30 30 30 W true 30 30 30 30 NE true 30 30 30 30 NW true 30 30 30 30 SE true 30 30 30 30 N true 30 30 30 30 SW true Qt::Horizontal QSizePolicy::Expanding 20 20 6 0 Destination Direction false 0 6 Down true 30 30 30 30 NE true 30 30 30 30 SE true 30 30 30 30 N true 30 30 30 30 NW true 30 30 30 30 W true 30 30 30 30 E true 30 30 30 30 S true 30 30 30 30 SW true Up true Qt::Horizontal QSizePolicy::Expanding 20 20 Special Exit Special Command false 6 0 Source To Destination: false 6 0 Destination To Source: false Commands 6 11 Src To Destination Commands 6 11 Before walking path: false After walking path: false Destination To Source Commands 6 11 Before walking path: false After walking path: false Qt::Vertical QSizePolicy::Expanding 20 20 6 0 Qt::Horizontal QSizePolicy::Expanding 20 20 OK Cancel qPixmapFromMimeSource - - Q3GroupBox - QGroupBox -
Qt3Support/Q3GroupBox
- 1 -
- - Q3ButtonGroup - Q3GroupBox -
Qt3Support/Q3ButtonGroup
- 1 -
cmdOK clicked() DlgMapPathPropertiesBase accept() 20 20 20 20 cmdCancel clicked() DlgMapPathPropertiesBase reject() 20 20 20 20 cmdSrcUp clicked() DlgMapPathPropertiesBase slotSrcUp() 20 20 20 20 cmdDestSW clicked() DlgMapPathPropertiesBase slotDestSW() 20 20 20 20 cmdDestDown clicked() DlgMapPathPropertiesBase slotDestDown() 20 20 20 20 cmdDestW clicked() DlgMapPathPropertiesBase slotDestW() 20 20 20 20 cmdDestE clicked() DlgMapPathPropertiesBase slotDestE() 20 20 20 20 cmdDestNE clicked() DlgMapPathPropertiesBase slotDestNE() 20 20 20 20 cmdSrcW clicked() DlgMapPathPropertiesBase slotSrcW() 20 20 20 20 cmdDestN clicked() DlgMapPathPropertiesBase slotDestN() 20 20 20 20 cmdSrcNE clicked() DlgMapPathPropertiesBase slotSrcNE() 20 20 20 20 cmdSrcS clicked() DlgMapPathPropertiesBase slotSrcS() 20 20 20 20 cmdSrcSE clicked() DlgMapPathPropertiesBase slotSrcSE() 20 20 20 20 cmdSrcDown clicked() DlgMapPathPropertiesBase slotSrcDown() 20 20 20 20 cmdSrcSW clicked() DlgMapPathPropertiesBase slotSrcSW() 20 20 20 20 cmdSrcNW clicked() DlgMapPathPropertiesBase slotSrcNW() 20 20 20 20 cmdSrcN clicked() DlgMapPathPropertiesBase slotSrcN() 20 20 20 20 cmdSrcE clicked() DlgMapPathPropertiesBase slotSrcE() 20 20 20 20 chkNormal clicked() DlgMapPathPropertiesBase slotExitTypeChange() 20 20 20 20 cmdDestS clicked() DlgMapPathPropertiesBase slotDestS() 20 20 20 20 cmdDestSE clicked() DlgMapPathPropertiesBase slotDestSE() 20 20 20 20 cmdDestNW clicked() DlgMapPathPropertiesBase slotDestNW() 20 20 20 20 cmdDestUp clicked() DlgMapPathPropertiesBase slotDestUp() 20 20 20 20 optTwoWay toggled(bool) DlgMapPathPropertiesBase slotDirectionChange() 217 122 20 20 chkSpecial clicked() DlgMapPathPropertiesBase slotExitTypeChange() 20 20 20 20
diff --git a/plugins/mapper/dialogs/dlgmaproompropertiesbase.ui b/plugins/mapper/dialogs/dlgmaproompropertiesbase.ui index 15d6f8e..5d47bf2 100644 --- a/plugins/mapper/dialogs/dlgmaproompropertiesbase.ui +++ b/plugins/mapper/dialogs/dlgmaproompropertiesbase.ui @@ -1,997 +1,980 @@ DlgMapRoomPropertiesBase 0 0 370 386 Room Properties 6 11 1 &Description 6 11 Label: false Description: false - + &Appearance 6 11 Color 6 11 6 0 Room Color: false 50 30 50 30 Qt::Horizontal QSizePolicy::Expanding 20 0 Default room color - + LabelPosition 6 11 0 6 30 30 30 30 S true 30 30 30 30 SE true 30 30 30 30 SW true 30 30 30 30 W true 30 30 30 30 NW true 30 30 30 30 N true 30 30 30 30 E true 30 30 30 30 NE true 6 0 Qt::Vertical QSizePolicy::Expanding 0 30 Custom true Hide true Qt::Horizontal QSizePolicy::Expanding 113 0 Qt::Vertical QSizePolicy::Expanding 0 16 &Exits 6 11 6 0 Room Exits: false false Direction Before command After command 6 0 Qt::Vertical QSizePolicy::Expanding 0 20 Properties Delete &Contents 6 11 6 0 RoomContents: false false 6 0 Qt::Vertical QSizePolicy::Expanding 0 20 New Item Remove Item 6 0 Qt::Horizontal QSizePolicy::Expanding 20 0 OK true Cancel qPixmapFromMimeSource - - Q3GroupBox - QGroupBox -
Qt3Support/Q3GroupBox
- 1 -
- - Q3ButtonGroup - Q3GroupBox -
Qt3Support/Q3ButtonGroup
- 1 -
KColorButton QPushButton
kcolorbutton.h
- - Q3MultiLineEdit - QWidget -
q3multilineedit.h
-
kcolorbutton.h cmdPathDelete clicked() DlgMapRoomPropertiesBase slotPathDelete() 20 20 20 20 cmdPathProperties clicked() DlgMapRoomPropertiesBase slotPathProperties() 20 20 20 20 cmdAddItem clicked() DlgMapRoomPropertiesBase slotAddItem() 20 20 20 20 cmdRemoveItem clicked() DlgMapRoomPropertiesBase slotRemoveItem() 20 20 20 20 cmdCancel clicked() DlgMapRoomPropertiesBase reject() 20 20 20 20 cmdNW clicked() DlgMapRoomPropertiesBase slotNW() 20 20 20 20 cmdW clicked() DlgMapRoomPropertiesBase slotW() 20 20 20 20 cmdSW clicked() DlgMapRoomPropertiesBase slotSW() 20 20 20 20 cmdS clicked() DlgMapRoomPropertiesBase slotS() 20 20 20 20 cmdSE clicked() DlgMapRoomPropertiesBase slotSE() 20 20 20 20 cmdE clicked() DlgMapRoomPropertiesBase slotE() 20 20 20 20 cmdNE clicked() DlgMapRoomPropertiesBase slotNE() 20 20 20 20 cmdN clicked() DlgMapRoomPropertiesBase slotN() 20 20 20 20 cmdHide clicked() DlgMapRoomPropertiesBase slotHide() 20 20 20 20 chkUseDefaltColor toggled(bool) DlgMapRoomPropertiesBase slotUseDefaultColor(bool) 20 20 20 20 lstContents itemSelectionChanged() DlgMapRoomPropertiesBase slotNewItemSelected() 20 20 20 20 txtItemName textChanged(QString) DlgMapRoomPropertiesBase slotEditItemName(QString) 20 20 20 20 cmdOk clicked() DlgMapRoomPropertiesBase accept() 20 20 20 20 cmdCustom clicked() DlgMapRoomPropertiesBase slotCustom() 20 20 20 20
diff --git a/plugins/mapper/dialogs/dlgmaptextpropertiesbase.ui b/plugins/mapper/dialogs/dlgmaptextpropertiesbase.ui index 099d83a..5945358 100644 --- a/plugins/mapper/dialogs/dlgmaptextpropertiesbase.ui +++ b/plugins/mapper/dialogs/dlgmaptextpropertiesbase.ui @@ -1,542 +1,542 @@ DlgMapTextPropertiesBase 0 0 351 403 Text Properties 11 6 &Font 11 6 0 6 0 6 Family: false QFrame::StyledPanel QFrame::Sunken 0 6 0 6 Bold Italic 0 6 Color: false 30 30 30 30 Button 20 20 QSizePolicy::Expanding Qt::Vertical S&ize 11 6 0 6 Actual Size 11 6 0 6 40 32767 Width (pixels): false Height (pixels): false 40 32767 Font Size 11 6 0 6 0 6 1 1 92 0 70 32767 Enter font size: false 40 32767 0 6 20 20 QSizePolicy::Expanding Qt::Horizontal Set Size 20 20 QSizePolicy::Expanding Qt::Vertical Text 11 6 Text: false - + Preview: false 300 120 QFrame::StyledPanel QFrame::Sunken 0 6 20 20 QSizePolicy::Expanding Qt::Horizontal OK true Cancel qPixmapFromMimeSource cmdCancel clicked() DlgMapTextPropertiesBase reject() cmdOk clicked() DlgMapTextPropertiesBase accept() chkBold clicked() DlgMapTextPropertiesBase slotBoldClicked() chkItalic clicked() DlgMapTextPropertiesBase slotItalicClicked() cmdColor changed(QColor) DlgMapTextPropertiesBase slotColorChanged(QColor) lstFamily itemSelectionChanged() DlgMapTextPropertiesBase slotFamilySelected() cmdSetSize clicked() DlgMapTextPropertiesBase slotSetSize() txtText textChanged() DlgMapTextPropertiesBase slotUpdatePreview() txtWidth textChanged(QString) DlgMapTextPropertiesBase slotUpdatePreview() txtHeight textChanged(QString) DlgMapTextPropertiesBase slotUpdatePreview() diff --git a/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.cpp b/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.cpp index 5ce20d1..a7b535d 100644 --- a/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.cpp +++ b/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.cpp @@ -1,62 +1,62 @@ /*************************************************************************** cmapnotespane.cpp ------------------- begin : Wed Aug 8 2001 copyright : (C) 2001 by Kmud Developer Team email : kmud-devel@kmud.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "cmapnotespane.h" #include "../cmappluginstandard.h" #include "../cmapcmdnotes.h" #include "../../../cmapmanager.h" #include #include #include CMapNotesPane::CMapNotesPane(CMapPluginStandard *plugin,QString title,QIcon *icon,elementTyp panelType,CMapElement *element,QWidget *parent) : CMapPropertiesPaneBase(title,icon,panelType,element,parent) { m_plugin = plugin; m_element = element; notesLayout = new QVBoxLayout( this ); notesLayout->setSpacing( 6 ); notesLayout->setMargin( 11 ); lblNotes = new QLabel( this); lblNotes->setText( i18n( "Notes:" ) ); notesLayout->addWidget( lblNotes ); - txtNotes = new Q3MultiLineEdit( this ); + txtNotes = new QTextEdit( this ); notesLayout->addWidget( txtNotes ); txtNotes->setText(m_plugin->getNote(element)); } CMapNotesPane::~CMapNotesPane() { } /** This is called when the ok button of the property dialog is pressed */ void CMapNotesPane::slotOk() { CMapCMDNotes *cmd = new CMapCMDNotes(m_plugin,m_element,txtNotes->text()); m_plugin->getManager()->addCommand(cmd); } /** This is called when the cancel button of the property dialog is pressed */ void CMapNotesPane::slotCancel() { } diff --git a/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.h b/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.h index a766c2c..e06f0fd 100644 --- a/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.h +++ b/plugins/mapper/plugins/standard/propertyPanes/cmapnotespane.h @@ -1,61 +1,60 @@ /*************************************************************************** cmapnotespane.h ------------------- begin : Wed Aug 8 2001 copyright : (C) 2001 by Kmud Developer Team email : kmud-devel@kmud.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef CMAPNOTESPANE_H #define CMAPNOTESPANE_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "../../../cmapelement.h" #include "../../../cmappropertiespanebase.h" class CMapPluginStandard; class QVBoxLayout; /**This pane adds the ability to save notes for rooms and zones *@author Kmud Developer Team */ class CMapNotesPane : public CMapPropertiesPaneBase { public: CMapNotesPane(CMapPluginStandard *plugin,QString title,QIcon *icon,elementTyp panelType,CMapElement *element,QWidget *parent); ~CMapNotesPane(); public slots: /** This is called when the ok button of the property dialog is pressed */ void slotOk(); /** This is called when the cancel button of the property dialog is pressed */ void slotCancel(); private: CMapElement *m_element; /** The components of the pane */ QVBoxLayout *notesLayout; QLabel *lblNotes; - Q3MultiLineEdit *txtNotes; + QTextEdit *txtNotes; CMapPluginStandard *m_plugin; }; #endif