From 0057443b052b39a3806d6fb77c916ee6c6abe637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Thu, 8 Mar 2012 10:48:33 +0000 Subject: [PATCH] whatsthis messages depends on the whatsthisgenerator git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14059 383ad7c9-94d9-4d36-a494-682f7c89f535 --- .../PrimitivesGenerator.cc | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Plugin-PrimitivesGenerator/PrimitivesGenerator.cc b/Plugin-PrimitivesGenerator/PrimitivesGenerator.cc index 269e6a669..eb5c87696 100644 --- a/Plugin-PrimitivesGenerator/PrimitivesGenerator.cc +++ b/Plugin-PrimitivesGenerator/PrimitivesGenerator.cc @@ -83,45 +83,42 @@ void PrimitivesGeneratorPlugin::pluginsInitialized() { QIcon* icon; QAction* action; - const QString baseHelpURL = "" + clickText); + WhatsThisGenerator whatsThisGen("PrimitivesGenerator"); + whatsThisGen.setWhatsThis(action,tr("Create a Cube."),"Cube"); - action = primitivesMenu->addAction("Dodecahedron" ,this,SLOT(addDodecahedron())); + action = primitivesMenu->addAction("Dodecahedron" ,this,SLOT(addDodecahedron())); icon = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"primitive_dodecahedron.png"); action->setIcon(*icon); - action->setWhatsThis(tr("Create a Dodecahedron. ") + baseHelpURL+ "#Dodecahedron'>" + clickText); + whatsThisGen.setWhatsThis(action,tr("Create a Dodecahedron."), "Dodecahedron"); action = primitivesMenu->addAction("Icosahedron" ,this,SLOT(addIcosahedron())); icon = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"primitive_icosahedron.png"); action->setIcon(*icon); - action->setWhatsThis(tr("Create a Icosahedron. ") + baseHelpURL+ "#Icosahedron'>" + clickText); + whatsThisGen.setWhatsThis(action,tr("Create a Icosahedron.","Icosahedron")); action = primitivesMenu->addAction("Octahedron" ,this,SLOT(addOctahedron())); icon = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"primitive_octahedron.png"); action->setIcon(*icon); - action->setWhatsThis(tr("Create an Octahedron. ") + baseHelpURL+ "#Octahedron'>" + clickText); + whatsThisGen.setWhatsThis(action,tr("Create an Octahedron."),"Octahedron"); action = primitivesMenu->addAction("Pyramid" ,this,SLOT(addPyramid())); icon = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"primitive_pyramid.png"); action->setIcon(*icon); - action->setWhatsThis(tr("Create a Pyramid. ") + baseHelpURL+ "#Pyramid'>" + clickText); + whatsThisGen.setWhatsThis(action,tr("Create a Pyramid."),"Pyramid"); action = primitivesMenu->addAction("Sphere",this,SLOT(addSphere())); icon = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"primitive_sphere.png"); action->setIcon(*icon); - action->setWhatsThis(tr("Create a Sphere. ") + baseHelpURL+ "#Sphere'>" + clickText); + whatsThisGen.setWhatsThis(action,tr("Create a Sphere. "),"Sphere"); action = primitivesMenu->addAction("Tetrahedron",this,SLOT(addTetrahedron())); icon = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"primitive_tetrahedron.png"); action->setIcon(*icon); - action->setWhatsThis(tr("Create a Tetrahedron. ") + baseHelpURL+ "#Tetrahedron'>" + clickText); - + whatsThisGen.setWhatsThis(action,tr("Create a Tetrahedron."),"Tetrahedron"); } } -- GitLab