コード例 #1
0
ファイル: pmanagement.cpp プロジェクト: rutku/dediq
void pManagement::projectContents()
{
    /*
     *Todo: Hazır şablonlar sınıfı oluşturulacak.
     *Bu method hazır şablon sınıfına devredilecek.
    */
    //Ana dosya oluşuturuluyor.
    QString path = getProjectPath()+QDir::separator()+getProjectName()+
                   QDir::separator()+getMainClass();
    QFile mclass(path+".d");
    if (!mclass.open(QIODevice::WriteOnly | QIODevice::Text))
        return;
    QTextStream out(&mclass);
    out << "import std.stdio;" << endl
            << "void main(){" << endl
            << " writefln(\"Merhaba\");" << endl
            << "}" << endl;
    mclass.close();

    QFile mindex(getProjectPath()+QDir::separator()+getProjectName()+QDir::separator()+"index.did");
    if (!mindex.open(QIODevice::WriteOnly | QIODevice::Text))
        return;
    QTextStream out2(&mindex);
    out2 << "RUNCLASS=" << getMainClass() <<".d\n";
    mindex.close();
    projectsHistory(getProjectPath()+QDir::separator()+getProjectName());
}
コード例 #2
0
/*----------------------------------------------------------------------------*/
void Xml_Generator::createMenu()
{

	//For handling the Project_Definition Menu
	Project_Definition= menuBar()->addMenu(tr("Project Definition"));
	ProjectName = new QAction(tr("Project Name..."), this);
	connect(ProjectName, SIGNAL(triggered()), this, SLOT(getProjectName()));
	ProjectName->setShortcut(tr("Ctrl+P"));
	Project_Definition->addAction(ProjectName);



	addchildAction = new QAction(tr("Add Child"), this);
	addchildAction->setShortcut(tr("Ctrl+C"));
	connect(addchildAction, SIGNAL(triggered()), this, SLOT(addChild()));
	Project_Definition->addAction(addchildAction);



	saveAction = new QAction(tr("Save"), this);
	saveAction->setShortcut(tr("Ctrl+S"));
	connect(saveAction, SIGNAL(triggered()), this, SLOT(nowSave()));
	Project_Definition->addAction(saveAction);


	exitAction= new QAction(tr("Exit"), this);
	exitAction->setShortcut(tr("Ctrl+X"));
	connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
	Project_Definition->addAction(exitAction);

}
コード例 #3
0
void TopicWindow::update(){

    int i;
    QString name, path;

    path = "./" + getProjectName() + "/thumbs/";

    QDir *directory = new QDir(path);

    name = model->getDataName() + "_topic_" + QString::number(0) + ".png";
//    qDebug() << name;

    if(directory->entryList().contains(name)){
        thumbNails[0]->setImage(path + name);
    }else{
        name = "baseThumb.png";
        thumbNails[0]->setImage(path + name);
    }

    for(i=0; i < K; i++){

        name = model->getDataName() + "_topic_" + QString::number(i+1) + ".png";
        if(directory->entryList().contains(name)){
            thumbNails[i+1]->setImage(path + name);
        }else{
            name = "baseThumb.png";
            thumbNails[i+1]->setImage(path + name);
        }
    }

    delete directory;
}
コード例 #4
0
ファイル: pmanagement.cpp プロジェクト: rutku/dediq
void pManagement::createProject()
{
    //Görsel arayüzden alacağımız proje ismi ve yoluna dizin eklenecek
    //İçerisine sınıf ve index.txt atılacak.

    QTextStream cout(stdout);


    QDir pPath(getProjectPath()+QDir::separator()+getProjectName());
    bool stats = pPath.exists();
    if(!stats)
    {
        QDir dir(getProjectPath());
        dir.mkdir(getProjectName());
        projectContents();
    }else
    {
        cout << "Dizin var" << endl;
    }
}
コード例 #5
0
void TopicWindow::showDialog(int i){

    if(i == 0){
        dialog->setWindowTitle(fname + " : Background");
    }else{
        dialog->setWindowTitle(fname + " : Topic " + QString::number(i));
    }
    dialog->setImage(getProjectName() + "/thumbs/" + model->getDataName() + "_topic_" + QString::number(i) + ".png");
    dialog->setLocalTopic(i);
    dialog->setLabels();
    dialog->show();
}
コード例 #6
0
ファイル: jucer_Project.cpp プロジェクト: furio/pyplasm
//==============================================================================
void Project::createPropertyEditors (PropertyListBuilder& props)
{
    props.add (new TextPropertyComponent (getProjectName(), "Project Name", 256, false),
               "The name of the project.");

    props.add (new TextPropertyComponent (getVersionValue(), "Project Version", 16, false),
               "The project's version number, This should be in the format major.minor.point");

    props.add (new TextPropertyComponent (getCompanyName(), "Company Name", 256, false),
               "Your company name, which will be added to the properties of the binary where possible");

    {
        StringArray projectTypeNames;
        Array<var> projectTypeCodes;

        const Array<ProjectType*>& types = ProjectType::getAllTypes();

        for (int i = 0; i < types.size(); ++i)
        {
            projectTypeNames.add (types.getUnchecked(i)->getDescription());
            projectTypeCodes.add (types.getUnchecked(i)->getType());
        }

        props.add (new ChoicePropertyComponent (getProjectTypeValue(), "Project Type", projectTypeNames, projectTypeCodes));
    }

    props.add (new TextPropertyComponent (getBundleIdentifier(), "Bundle Identifier", 256, false),
               "A unique identifier for this product, mainly for use in Mac builds. It should be something like 'com.yourcompanyname.yourproductname'");

    getProjectType().createPropertyEditors (*this, props);

    props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false),
               "Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash.");

    props.setPreferredHeight (22);
}
コード例 #7
0
ファイル: jucer_Project.cpp プロジェクト: randi2kewl/ShoutOut
void Project::setMissingDefaultValues()
{
    if (! projectRoot.hasProperty (Ids::id_))
        projectRoot.setProperty (Ids::id_, createAlphaNumericUID(), 0);

    // Create main file group if missing
    if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid())
    {
        Item mainGroup (*this, ValueTree (Tags::projectMainGroup));
        projectRoot.addChild (mainGroup.getNode(), 0, 0);
    }

    getMainGroup().initialiseNodeValues();

    if (getDocumentTitle().isEmpty())
        setTitle ("Juce Project");

    if (! projectRoot.hasProperty (Ids::projectType))
        getProjectType() = application;

    if (! projectRoot.hasProperty (Ids::version))
        getVersion() = "1.0.0";

    if (! projectRoot.hasProperty (Ids::juceLinkage))
        getJuceLinkageModeValue() = useAmalgamatedJuceViaMultipleTemplates;

    const String juceFolderPath (getRelativePathForFile (StoredSettings::getInstance()->getLastKnownJuceFolder()));

    // Create configs group
    if (! projectRoot.getChildWithName (Tags::configurations).isValid())
    {
        projectRoot.addChild (ValueTree (Tags::configurations), 0, 0);
        createDefaultConfigs();
    }

    if (! projectRoot.getChildWithName (Tags::exporters).isValid())
        createDefaultExporters();

    const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (getProjectName().toString(), false, true, false));

    if (! projectRoot.hasProperty (Ids::buildVST))
    {
        shouldBuildVST() = true;
        shouldBuildRTAS() = false;
        shouldBuildAU() = true;

        getPluginName() = getProjectName().toString();
        getPluginDesc() = getProjectName().toString();
        getPluginManufacturer() = "yourcompany";
        getPluginManufacturerCode() = "Manu";
        getPluginCode() = "Plug";
        getPluginChannelConfigs() = "{1, 1}, {2, 2}";
        getPluginIsSynth() = false;
        getPluginWantsMidiInput() = false;
        getPluginProducesMidiOut() = false;
        getPluginSilenceInProducesSilenceOut() = false;
        getPluginTailLengthSeconds() = 0;
        getPluginEditorNeedsKeyFocus() = false;
        getPluginAUExportPrefix() = sanitisedProjectName + "AU";
        getPluginAUCocoaViewClassName() = sanitisedProjectName + "AU_V1";
        getPluginRTASCategory() = String::empty;
    }

    if (! projectRoot.hasProperty (Ids::bundleIdentifier))
        setBundleIdentifierToDefault();
}
コード例 #8
0
ファイル: jucer_Project.cpp プロジェクト: randi2kewl/ShoutOut
const String Project::getDocumentTitle()
{
    return getProjectName().toString();
}
コード例 #9
0
ファイル: jucer_Project.cpp プロジェクト: randi2kewl/ShoutOut
//==============================================================================
void Project::createPropertyEditors (Array <PropertyComponent*>& props)
{
    props.add (new TextPropertyComponent (getProjectName(), "Project Name", 256, false));
    props.getLast()->setTooltip ("The name of the project.");

    props.add (new TextPropertyComponent (getVersion(), "Project Version", 16, false));
    props.getLast()->setTooltip ("The project's version number, This should be in the format major.minor.point");

    const char* projectTypes[] = { "Application (GUI)", "Application (Non-GUI)", "Audio Plug-in", "Static Library", 0 };
    const char* projectTypeValues[] = { application, commandLineApp, audioPlugin, library, 0 };
    props.add (new ChoicePropertyComponent (getProjectType(), "Project Type", StringArray (projectTypes), Array<var> (projectTypeValues)));

    const char* linkageTypes[] = { "Not linked to Juce", "Linked to Juce Static Library", "Include Juce Amalgamated Files", "Include Juce Source Code Directly (In a single file)", "Include Juce Source Code Directly (Split across several files)", 0 };
    const char* linkageTypeValues[] = { notLinkedToJuce, useLinkedJuce, useAmalgamatedJuce, useAmalgamatedJuceViaSingleTemplate, useAmalgamatedJuceViaMultipleTemplates, 0 };
    props.add (new ChoicePropertyComponent (getJuceLinkageModeValue(), "Juce Linkage Method", StringArray (linkageTypes), Array<var> (linkageTypeValues)));
    props.getLast()->setTooltip ("The method by which your project will be linked to Juce.");

    props.add (new TextPropertyComponent (getBundleIdentifier(), "Bundle Identifier", 256, false));
    props.getLast()->setTooltip ("A unique identifier for this product, mainly for use in Mac builds. It should be something like 'com.yourcompanyname.yourproductname'");

    {
        OwnedArray<Project::Item> images;
        findAllImageItems (images);

        StringArray choices;
        Array<var> ids;

        choices.add ("<None>");
        ids.add (var::null);
        choices.add (String::empty);
        ids.add (var::null);

        for (int i = 0; i < images.size(); ++i)
        {
            choices.add (images.getUnchecked(i)->getName().toString());
            ids.add (images.getUnchecked(i)->getID());
        }

        props.add (new ChoicePropertyComponent (getSmallIconImageItemID(), "Icon (small)", choices, ids));
        props.getLast()->setTooltip ("Sets an icon to use for the executable.");

        props.add (new ChoicePropertyComponent (getBigIconImageItemID(), "Icon (large)", choices, ids));
        props.getLast()->setTooltip ("Sets an icon to use for the executable.");
    }

    if (isAudioPlugin())
    {
        props.add (new BooleanPropertyComponent (shouldBuildVST(), "Build VST", "Enabled"));
        props.getLast()->setTooltip ("Whether the project should produce a VST plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildAU(), "Build AudioUnit", "Enabled"));
        props.getLast()->setTooltip ("Whether the project should produce an AudioUnit plugin.");
        props.add (new BooleanPropertyComponent (shouldBuildRTAS(), "Build RTAS", "Enabled"));
        props.getLast()->setTooltip ("Whether the project should produce an RTAS plugin.");
    }

    if (isAudioPlugin())
    {
        props.add (new TextPropertyComponent (getPluginName(), "Plugin Name", 128, false));
        props.getLast()->setTooltip ("The name of your plugin (keep it short!)");
        props.add (new TextPropertyComponent (getPluginDesc(), "Plugin Description", 256, false));
        props.getLast()->setTooltip ("A short description of your plugin.");

        props.add (new TextPropertyComponent (getPluginManufacturer(), "Plugin Manufacturer", 256, false));
        props.getLast()->setTooltip ("The name of your company (cannot be blank).");
        props.add (new TextPropertyComponent (getPluginManufacturerCode(), "Plugin Manufacturer Code", 4, false));
        props.getLast()->setTooltip ("A four-character unique ID for your company. Note that for AU compatibility, this must contain at least one upper-case letter!");
        props.add (new TextPropertyComponent (getPluginCode(), "Plugin Code", 4, false));
        props.getLast()->setTooltip ("A four-character unique ID for your plugin. Note that for AU compatibility, this must contain at least one upper-case letter!");

        props.add (new TextPropertyComponent (getPluginChannelConfigs(), "Plugin Channel Configurations", 256, false));
        props.getLast()->setTooltip ("This is the set of input/output channel configurations that your plugin can handle.  The list is a comma-separated set of pairs of values in the form { numInputs, numOutputs }, and each "
                                     "pair indicates a valid configuration that the plugin can handle. So for example, {1, 1}, {2, 2} means that the plugin can be used in just two configurations: either with 1 input "
                                     "and 1 output, or with 2 inputs and 2 outputs.");

        props.add (new BooleanPropertyComponent (getPluginIsSynth(), "Plugin is a Synth", "Is a Synth"));
        props.getLast()->setTooltip ("Enable this if you want your plugin to be treated as a synth or generator. It doesn't make much difference to the plugin itself, but some hosts treat synths differently to other plugins.");

        props.add (new BooleanPropertyComponent (getPluginWantsMidiInput(), "Plugin Midi Input", "Plugin wants midi input"));
        props.getLast()->setTooltip ("Enable this if you want your plugin to accept midi messages.");

        props.add (new BooleanPropertyComponent (getPluginProducesMidiOut(), "Plugin Midi Output", "Plugin produces midi output"));
        props.getLast()->setTooltip ("Enable this if your plugin is going to produce midi messages.");

        props.add (new BooleanPropertyComponent (getPluginSilenceInProducesSilenceOut(), "Silence", "Silence in produces silence out"));
        props.getLast()->setTooltip ("Enable this if your plugin has no tail - i.e. if passing a silent buffer to it will always result in a silent buffer being produced.");

        props.add (new TextPropertyComponent (getPluginTailLengthSeconds(), "Tail Length (in seconds)", 12, false));
        props.getLast()->setTooltip ("This indicates the length, in seconds, of the plugin's tail. This information may or may not be used by the host.");

        props.add (new BooleanPropertyComponent (getPluginEditorNeedsKeyFocus(), "Key Focus", "Plugin editor requires keyboard focus"));
        props.getLast()->setTooltip ("Enable this if your plugin needs keyboard input - some hosts can be a bit funny about keyboard focus..");

        props.add (new TextPropertyComponent (getPluginAUExportPrefix(), "Plugin AU Export Prefix", 64, false));
        props.getLast()->setTooltip ("A prefix for the names of exported entry-point functions that the component exposes - typically this will be a version of your plugin's name that can be used as part of a C++ token.");

        props.add (new TextPropertyComponent (getPluginAUCocoaViewClassName(), "Plugin AU Cocoa View Name", 64, false));
        props.getLast()->setTooltip ("In an AU, this is the name of Cocoa class that creates the UI. Some hosts bizarrely display the class-name, so you might want to make it reflect your plugin. But the name must be "
                                     "UNIQUE to this exact version of your plugin, to avoid objective-C linkage mix-ups that happen when different plugins containing the same class-name are loaded simultaneously.");

        props.add (new TextPropertyComponent (getPluginRTASCategory(), "Plugin RTAS Category", 64, false));
        props.getLast()->setTooltip ("(Leave this blank if your plugin is a synth). This is one of the RTAS categories from FicPluginEnums.h, such as: ePlugInCategory_None, ePlugInCategory_EQ, ePlugInCategory_Dynamics, "
                                     "ePlugInCategory_PitchShift, ePlugInCategory_Reverb, ePlugInCategory_Delay, "
                                     "ePlugInCategory_Modulation, ePlugInCategory_Harmonic, ePlugInCategory_NoiseReduction, "
                                     "ePlugInCategory_Dither, ePlugInCategory_SoundField");
    }

    props.add (new TextPropertyComponent (getProjectPreprocessorDefs(), "Preprocessor definitions", 32768, false));
    props.getLast()->setTooltip ("Extra preprocessor definitions. Use the form \"NAME1=value NAME2=value\", using whitespace or commas to separate the items - to include a space or comma in a definition, precede it with a backslash.");

    for (int i = props.size(); --i >= 0;)
        props.getUnchecked(i)->setPreferredHeight (22);
}
コード例 #10
0
ファイル: app.cpp プロジェクト: Ram-Z/hexdame
void
App::printVersionMessage()
{
    std::cout << getProjectName() << " v" << getProjectVersion() << std::endl;
    std::cout << getProjectVendorName() << "; Copyright (C) " << getProjectCopyrightYears();
}
コード例 #11
0
ファイル: ProjectVersion.hpp プロジェクト: Kitware/VTK
 /**
  * Get the version string
  *
  * @return the Version in "ProjectName Major.Minor.Patch" string format
  */	
 std::string getFull() {
   return getProjectName()+std::string(" ")+
          getMajorStr()+std::string(".")+
          getMinorStr()+std::string(".")+
          getPatchStr();
 }
コード例 #12
0
QString NewProjectDialog::getProjectFullPath() const
{
  return QDir::fromNativeSeparators(QDir(getWorkingDir()+"/"+getProjectName()).path());
}