Esempio n. 1
0
void MainWindow::connectSlots(){
    //QObject::connect(MainWindow::createSm, SIGNAL(clicked()), this, SLOT(startScript()));
    QObject::connect(loadDataFile, SIGNAL(clicked()), this, SLOT(openDataFile()));
    QObject::connect(loadUtteranceFile, SIGNAL(clicked()), this, SLOT(openUtteranceFile()));
    QObject::connect(loadSm, SIGNAL(clicked()),this, SLOT(open()) );
    QObject::connect(firstUseBox, SIGNAL(clicked()), this, SLOT(openDataFile()));
    QObject::connect(createSm, SIGNAL(clicked()), this, SLOT(startScript()));
    QObject::connect(agentAdapterCombo, SIGNAL(activated(QString)),this, SLOT(setAdapter(QString)));
}
Esempio n. 2
0
void DataTypes::_addData( const QSet<QString>& data, const QHash<QString,QString>& defaultAdapters,
         const AbstractAdapter::AdapterType_t& defaultType ) 
{
    foreach( const QString& dataType, data ) {
        if( ! adapterAvailable( dataType ) ) {
            if( ! _adapterNames.contains(dataType) 
                && defaultAdapters.contains(dataType)
                && defaultAdapters.value(dataType) != "" ) {
                // Use the default value if there is one
                // and the config does not override it
                setAdapter(dataType, _createAdapter(defaultAdapters.value(dataType),
                           defaultType ) );
            } else {
                // use the configuration specified adapter
                // if available
                // will throw if nothing is found
                setAdapter(dataType, _createAdapter(dataType, defaultType ) );
            }
        }
        else {
            _setAdapter( _dataRequirements.last(), dataType );
        }
    }
}
Esempio n. 3
0
        void OptionsMenu::populate(const jni::Object& menu)
        {
            auto children = getChildren();

            // Set up the adapter if we don't have one.
            if (!getAdapter())
                setAdapter(new MenuAdapter(new jni::Object(menu)));

            IMenuAdapter* adapter = getAdapter();

            // Parse the tree hierarchy, instantiating system resources.
            for (size_t i = 0; i < children.getLength(); ++i) {
                auto& child = children[i];

                if (child.type == MenuItemType::Menu) {
                    adapter->insert(i, *child.menu);
                }
                else if (child.type == MenuItemType::Action) {
                    adapter->insert(i, *child.action);
                }
            }
        }
Esempio n. 4
0
void TipsyIOS::init( streambuf_type *sb, const char * type ) {
    m_sb = sb;
    if ( type ) setAdapter(type);
}