Questions regarding templates
Benoit Cerrina
benoit.cerrina at writeme.com
Sun Jan 9 21:01:08 GMT 2000
Hi,
I finally got my modem to work proparly under linux, expect that tommorow or
the day after I'll have checked in my patch for incremental classview refresh
and for correcting the behavior of the new class dialog regarding
subdirectories.
Ben
On dim, 09 jan 2000, you wrote: > On Sat, 08 Jan 2000 you
wrote: > > Hi all. I'm new to C++ and using QT/KDE, so I ask you to bear with
my stupidity. > > > > As I'm trying to develop my first project, I have the
following questions: > > 1. Is there anywhere that it's referenced what fields
are replaced in templates? > > Just the ones there (DATE, AUTHOR) or are there
others/ can one add custom > > ones?
>
> You can only add new keywords by changing the sourcecode in cproject.cpp :
>
> QString& CProject::setInfosInString(QString& strtemplate, bool basics) {
> QString date=QDate::currentDate().toString();
> QString year;
> year.setNum(QDate::currentDate().year());
> QString projectName=getProjectName();
>
> strtemplate.replace(QRegExp("\\|PRJNAME\\|"), projectName);
> strtemplate.replace(QRegExp("\\|NAME\\|"), projectName);
> strtemplate.replace(QRegExp("\\|NAMELITTLE\\|"), projectName.lower());
> strtemplate.replace(QRegExp("\\|NAMEBIG\\|"), projectName.upper());
>
> strtemplate.replace(QRegExp("\\|PRJDIR\\|"), getProjectDir());
> strtemplate.replace(QRegExp("\\|PRJFILE\\|"), getProjectFile());
> strtemplate.replace(QRegExp("\\|SUBDIR\\|"), getSubDir());
> strtemplate.replace(QRegExp("\\|AUTHOR\\|"), getAuthor());
> strtemplate.replace(QRegExp("\\|EMAIL\\|"), getEmail());
> strtemplate.replace(QRegExp("\\|VERSION\\|"), getVersion());
> strtemplate.replace(QRegExp("\\|BINPROGRAM\\|"), getBinPROGRAM());
> strtemplate.replace(QRegExp("\\|DATE\\|"), date);
> strtemplate.replace(QRegExp("\\|YEAR\\|"), year);
> ...........
>
>
> > 3. (Last stupid question of this email!) Is it possible to create a
> > titlebar-less window, for example, like xmms does?
>
> Please look at "WFlags" in the "QWidget" documentation.
>
> Ciao!
> Sandy
>
> --
> Hi! I'm a signature virus! Copy me into your signature file to help me
> spread!
--
Benoit Cerrina
More information about the KDevelop
mailing list