Changeset 223 in PSPA
- Timestamp:
- Dec 21, 2012, 4:21:50 PM (12 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/History
r35 r223 7 7 8 8 9 21 December 2012 Laurent Garnier 10 - Pas mal de modification coté physique par Guy et François 11 - Par rapport à la dernière revision : 12 o GWt_LigneFaiseau : Ajout d'une imag de fond plutot que orange. 13 o Ajout d'une nouvelle classe GWt_draggableImage (tout est dit) 14 o Suppression des bordures pointillées dans les éléments 15 9 16 17 Octobre 2012 Laurent Garnier 10 17 - Affichage d'un Dialog lors du clic sur le bouton Drift -
Interface_Web/trunk/pspaWT/cmt/requirements
r207 r223 17 17 18 18 19 macro lib_PSPSLib_cppflags " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD " Linux-x86_64 " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD -DHAS_IMAGEMAGIC"19 macro lib_PSPSLib_cppflags " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD -DHAS_IMAGEMAGIC -DPSPA_DEBUG" Linux-x86_64 " ${Wt_cflags} ${boost_cflags} -DTHREADED -DDRAWWT_BUILD -DHAS_IMAGEMAGIC" 20 20 #macro PSPSLib_shlibflags " ${Wt_linkopts} ${boost_linkopts} ${dld_linkopts} -F/System/Library/Frameworks " 21 21 22 22 #macro PSPSLib_linkopts " -L${PSPAWTROOT}/$(Platform_bin) -lPSPSLib " 23 23 24 application pspaWT bareParticle.cc particleBeam.cc GWt_cell.cc GWt_rfgun.cc GWt_soleno.cc GWt_bend.cc GWt_beam.cc GWt_globalParameters.cc GWt_drift.cc GWt_abstractElement.cc dataManager.cc elementsCollection.cc elementDrift.cc elementCell.cc elementRfgun.cc elementSoleno.cc elementBend.cc elementBeam.cc globalParameters.cc abstractElement.cc GWt_LigneFaisceau.cc GWt_pspaApplication.cc GWt_dropZoneLigneFaiseau.cc GWt_d ialog.cc nomdElements.cc nomDeLogiciel.cc transportMoments.cc main.cc use_cppflags='" ${lib_PSPSLib_cppflags}"'24 application pspaWT bareParticle.cc particleBeam.cc GWt_cell.cc GWt_rfgun.cc GWt_soleno.cc GWt_bend.cc GWt_beam.cc GWt_globalParameters.cc GWt_drift.cc GWt_abstractElement.cc dataManager.cc elementsCollection.cc elementDrift.cc elementCell.cc elementRfgun.cc elementSoleno.cc elementBend.cc elementBeam.cc globalParameters.cc abstractElement.cc GWt_LigneFaisceau.cc GWt_pspaApplication.cc GWt_dropZoneLigneFaiseau.cc GWt_draggableImage.cc GWt_dialog.cc nomdElements.cc nomDeLogiciel.cc transportMoments.cc main.cc use_cppflags='" ${lib_PSPSLib_cppflags}"' 25 25 26 26 macro DrawWt_linkopts " ${PSPSLib_linkopts} ${Wt_linkopts} ${boost_linkopts} ${dld_linkopts}" -
Interface_Web/trunk/pspaWT/src/GWt_LigneFaisceau.cc
r198 r223 24 24 25 25 hbox_ = new WHBoxLayout(); 26 // decorationStyle().setBackgroundColor (WColor("orange")); 26 // decorationStyle().setBackgroundColor (WColor(245,245,245)); 27 decorationStyle().setBackgroundImage (WApplication::appRoot()+"../icons/background.png"); 27 28 setLayout(hbox_); 28 29 -
Interface_Web/trunk/pspaWT/src/GWt_dropZoneLigneFaiseau.cc
r199 r223 18 18 abstractElement_(NULL) 19 19 { 20 // decorationStyle().setBackgroundColor (WColor("yellow"));21 20 resize(5,5); 22 21 cout<<"new GWt_dropZoneLigneFaiseau : "<< this << endl; … … 24 23 // connect mouse events 25 24 26 setMouseOverDelay(500);25 // setMouseOverDelay(100); 27 26 mouseWentOver().connect(this, &GWt_dropZoneLigneFaiseau::mouseOver); 28 27 mouseWentUp().connect(this, &GWt_dropZoneLigneFaiseau::mouseUp); … … 59 58 void GWt_dropZoneLigneFaiseau::mouseOver(const WMouseEvent& e) 60 59 { 60 decorationStyle().setCursor(OpenHandCursor); 61 61 // Add text 62 62 if (insertMessage_) { … … 64 64 insertMessage_->show(); 65 65 resize(insertMessage_->width(),insertMessage_->height()); 66 } else { 67 decorationStyle().setCursor(OpenHandCursor); 66 68 } 67 69 } … … 70 72 } 71 73 72 decorationStyle().setBorder (WBorder (WBorder::Dashed, WBorder::Medium,WColor(blue))); 73 74 pspa_->addConsoleMessage(" mouseOver");75 cout << " GWt_dropZoneLigneFaiseau::mouseOver" << endl; 74 75 #ifdef PSPA_DEBUG 76 pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOver"); 77 #endif 76 78 } 77 79 … … 84 86 resize(10,10); 85 87 } 86 decorationStyle().setBorder (WBorder (WBorder::Dashed, WBorder::Medium,WColor(255,255,255,255)));87 } else {88 decorationStyle().setBorder (WBorder (WBorder::Solid, WBorder::Thin,WColor(200,200,200)));89 88 } 90 89 if (insertMessage_) { … … 94 93 linkImage_->show(); 95 94 } 95 decorationStyle().setCursor(ArrowCursor); 96 97 #ifdef PSPA_DEBUG 96 98 pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOut"); 99 #endif 97 100 } 98 101 99 102 void GWt_dropZoneLigneFaiseau::mouseIsDragged(const WMouseEvent& e) 100 103 { 104 #ifdef PSPA_DEBUG 101 105 pspa_->addConsoleMessage(" GWt_dropZoneLigneFaiseau::mouseDragged"); 106 #endif 102 107 } 103 108 104 109 void GWt_dropZoneLigneFaiseau::mouseUp(const WMouseEvent& e) 105 110 { 111 #ifdef PSPA_DEBUG 106 112 pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseOut up"); 113 #endif 107 114 } 108 115 109 116 void GWt_dropZoneLigneFaiseau::mouseDown(const WMouseEvent& e) 110 117 { 118 #ifdef PSPA_DEBUG 111 119 pspa_->addConsoleMessage("GWt_dropZoneLigneFaiseau::mouseDown up"); 120 #endif 112 121 } 113 122 114 123 void GWt_dropZoneLigneFaiseau::dropEvent(WDropEvent evt) 115 124 { 125 #ifdef PSPA_DEBUG 116 126 pspa_->addConsoleMessage(" GWt_dropZoneLigneFaiseau::dropEvent"); 127 #endif 117 128 118 129 nomdElements e(evt.mimeType()); … … 200 211 layout->setStretchFactor(this,0); 201 212 213 // change background 214 decorationStyle().setBackgroundColor (WColor("white")); 215 216 // remove border 217 decorationStyle().setBorder (WBorder (WBorder::None)); 218 202 219 203 220 // insert after … … 225 242 } 226 243 227 // update border228 decorationStyle().setBorder (WBorder (WBorder::Solid, WBorder::Thin,WColor(200,200,200)));229 244 230 245 … … 292 307 WBoxLayout* layout = ((WBoxLayout*)(wc->layout())); 293 308 309 #ifdef PSPA_DEBUG 294 310 pspa_->addConsoleMessage("remove from drag Zone"); 295 311 cout << "remove from drag Zone id" << layout->indexOf ((WLayoutItem*)(layout->findWidgetItem (other))) << " count:" << layout->count()<< endl; 296 312 #endif 297 313 // first element 298 314 if (layout->indexOf ((WLayoutItem*)(layout->findWidgetItem (other))) == 1) { 299 315 if (layout->itemAt (2)) { 300 316 layout->removeItem (layout->itemAt(2)); 317 #ifdef PSPA_DEBUG 301 318 pspa_->addConsoleMessage("remove first link"); 319 #endif 302 320 } 303 321 … … 306 324 if (layout->itemAt (layout->count()-3)) { 307 325 layout->removeItem (layout->itemAt(layout->count()-3)); 326 #ifdef PSPA_DEBUG 308 327 pspa_->addConsoleMessage("remove last link"); 328 #endif 309 329 } 310 330 } … … 313 333 if (layout->findWidgetItem (other)) { 314 334 layout->removeItem (layout->itemAt(layout->indexOf((WLayoutItem*)(layout->findWidgetItem (other))))); 335 #ifdef PSPA_DEBUG 315 336 pspa_->addConsoleMessage("remove drop zone"); 337 #endif 316 338 } 317 339 -
Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc
r222 r223 7 7 #include "GWt_globalParameters.h" 8 8 #include "GWt_dialog.h" 9 #include "GWt_draggableImage.h" 9 10 #include "particleBeam.h" 10 11 #include "bareParticle.h" … … 49 50 50 51 WContainerWidget *w = root(); 51 w->setStyleClass("PSPA");52 useStyleSheet (WApplication::appRoot()+"../include/pspa.css"); 52 53 dtmanage_ = new dataManager(); 53 54 … … 143 144 void PspaApplication::createDragImage(const char *url,const char *smallurl,const char *mimeType,WContainerWidget *p,WString name) 144 145 { 145 WImage *result = new WImage(url,p);146 GWt_draggableImage *result = new GWt_draggableImage(url,p); 146 147 WImage *dragImage = new WImage(smallurl,p); 147 148 … … 152 153 cout << "createDragImage" << dragImage<<endl; 153 154 result->setDraggable(mimeType,dragImage,true); 155 154 156 } 155 157
Note: See TracChangeset
for help on using the changeset viewer.