KDevCompilerOptions Class Referenceabstract
#include <kdevcompileroptions.h>
Inherits TQObject.
Public Member Functions | |
KDevCompilerOptions (TQObject *parent=0, const char *name=0) | |
virtual TQString | exec (TQWidget *parent, const TQString &flags)=0 |
Detailed Description
The interface to compiler options configuration.
Used by build systems to give users a compiler options configuration dialog.
Common use case:
{
KService::Ptr service = KService::serviceByDesktopName( name );
if ( !service )
return 0;
KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library()));
if (!factory)
return 0;
TQStringList args;
TQVariant prop = service->property("X-TDevelop-Args");
if (prop.isValid())
args = TQStringList::split(" ", prop.toString());
TQObject *obj = factory->create(parent, service->name().latin1(),
"KDevCompilerOptions", args);
if (!obj->inherits("KDevCompilerOptions"))
return 0;
KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj;
return dlg;
}
...
KDevCompilerOptions *plugin = createCompilerOptions(compilerName, parent);
TQString flags = ""; //old compiler flags
if ( plugin )
{
flags = plugin->exec( parent, flags ); //new compiler flags are returned
delete plugin;
}
Definition at line 72 of file kdevcompileroptions.h.
Member Function Documentation
◆ exec()
|
pure virtual |
Opens a dialog which allows the user to configure the compiler options.
The initial settings in the dialog will be set from the flags argument of this method. After the dialog is accepted, the new settings will be returned as a string. If the dialog was cancelled, TQString() is returned.
The documentation for this class was generated from the following files: