Example #1
0
void SessionGroup::setMasterMode(int mode)
{
   _masterMode = mode;

   connectAll(false);
   connectAll(true);
}
Example #2
0
MarginsEditingWidget::MarginsEditingWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::MarginsEditingWidget)
{
    ui->setupUi(this);
    connectAll();
}
Example #3
0
ConnectorOld::ConnectorOld(QObject *parent)
  : Connector(parent),
    // All messages from this server encoded in WINDOWS-CP1251
    codec(QTextCodec::codecForName("cp-1251")), lastTimeId(0)
{
  connectAll();
}
Example #4
0
void
AccountManager::toggleAccountsConnected()
{
    tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
    if ( m_connected )
        disconnectAll();
    else
        connectAll();
}
CGraphicBuildingTile::CGraphicBuildingTile(CStructure* _structure,QSize tileSize, QObject *sender) : CGraphicGameTile(tileSize,sender)
{
    structure=_structure;
    connectAll(sender);
    //setBrush(Qt::black);
    if(_structure!=NULL)
    {   this->setPos(structure->getCoordinatesOfActualLUCorner().getX()*tileSize.width(),structure->getCoordinatesOfActualLUCorner().getY()*tileSize.height());
    }
}
Example #6
0
void MarginsEditingWidget::setMargins(const QMargins &margins)
{
    disconnectAll();
    ui->leftMarginSpinBox->setValue(margins.left());
    ui->topMarginSpinBox->setValue(margins.top());
    ui->rightMarginSpinBox->setValue(margins.right());
    ui->bottomMarginSpinBox->setValue(margins.bottom());
    connectAll();
}
Example #7
0
gui::ToolBox::ToolBox(const Gtk::Image& original, Gtk::Image& current) :
		Gtk::Frame(FRAME_LABEL), buttonBox_(Gtk::ORIENTATION_VERTICAL), imageOriginal_(
				original), imageCurrent_(current) {
	set_border_width(BORDER_WIDTH);
	histogramWindow_ = nullptr;
	initButtons();
	connectAll();
	addAll();
	show_all_children();
}
void ClusterFilterControllerWidget::setFilter(std::shared_ptr<DataConverter> filter)
{
    if ((mFilter = std::dynamic_pointer_cast<ClusterFilter>(filter)) == nullptr) {
        qDebug() << "wrong initializtion of MarginFilterControllerWidget";
        return;
    }
    disconnectAll();
    initializeState();
    connectAll();

}
void ClusterFilterControllerWidget::treatNumberOfConsecErrorsChanging()
{
    if (mFilter) {
        mFilter->setNumberOfConsecErrors(ui->numberOfConsecErrorsSpinBox->value());
        disconnectAll();
        initializeState();
        connectAll();
        mModel->updateOutputData();
    }
    ui->numberOfConsecErrorsSpinBox->clearFocus();
}
void ClusterFilterControllerWidget::treatWindowWidthChanging()
{
    if (mFilter) {
        mFilter->setWindowWidth(ui->windowWidthSpinBox->value());
        disconnectAll();
        initializeState();
        connectAll();
        mModel->updateOutputData();
    }
    ui->windowWidthSpinBox->clearFocus();
}
Example #11
0
QgsSpatialQueryDialog::QgsSpatialQueryDialog( QWidget* parent, QgisInterface* iface ): QDialog( parent )
{
  setupUi( this );

  QSettings settings;
  restoreGeometry( settings.value( "SpatialQuery/geometry" ).toByteArray() );

  mLayerReference = mLayerTarget = NULL;
  mIface = iface;
  mRubberSelectId = new QgsRubberSelectId( iface->mapCanvas() );

  initGui();
  connectAll();
} // QgsSpatialQueryDialog::QgsSpatialQueryDialog( QWidget* parent, QgisInterface* iface )
Example #12
0
Grillewindow::Grillewindow(QWidget *parent):
    QDialog(parent),
    maxColor(4),
    isCopied(false),
    homePath(""),
    seedsInRow(1),
    comportement(NULL),
    ui(new Ui::Grillewindow)
{
    ui->setupUi(this);
    copyPath = QCoreApplication::applicationDirPath();
    copyPath += "/copies";
    ui->label_path->setText("(RĂ©pertoire : " + copyPath + ")");
    connectAll();
}
Example #13
0
int main(int argc, char** argv) {


    extern dexpd_config conf0;
    int socknum = 0;
    int sock_id = 0;

    int wd = 0;
    int notify_fd = 0;
    int option_index = 0;

    char *peer_str;
    char c;
    int peer_num;

    pthread_t notify_th;
    pthread_t reconnect_th;
    pthread_t listenv6;

    struct sockaddr_in peer_addr;

    static struct option long_options[] = {
        {"dennis",no_argument,0, 'T'},
        {0, 0, 0, 0}
    };

    c = getopt_long (argc, argv, "T",long_options, &option_index);

    switch(c) {

    case 'T':

        dennis_tribute();
        break;

    default:

        break;

    }



    socklen_t addr_len = sizeof(peer_addr);

    printf ("\n");

    printf ("        /\\\n");
    printf ("       /01\\\n");
    printf ("      /0011\\\n");
    printf ("     /000111\\     [[ Obsidian 0.1 == Clement Game 2011 ]]\n");
    printf ("    /00001111\\\n");
    printf ("   /0000011000\\\n");
    printf ("   \\0000000000/\n\n");


    init_config();


    if (conf0.use_tls) {
        printf("initializing TLS config...\n");
        conf0.ctx=(SSL_CTX*)initialize_ctx(conf0.tls_server_cert,"password");
        load_dh_params(conf0.ctx,conf0.tls_server_dh);
    }

    printf("Loading catalog from %s...\n",conf0.data_dir);

    load_catalog(conf0.data_dir);
    printf("starting inotify events listener...\n");

    //inotify init functions on datadir;
    notify_fd = inotify_init();
    wd = inotify_add_watch(notify_fd, conf0.data_dir, IN_CLOSE_WRITE|IN_MOVED_TO);

    //starting a new thread for inotify events read
    pthread_create(&notify_th,NULL,notify_thread,&notify_fd);


    printf("initating connections with peers...\n");
    connectAll();
    pthread_create(&reconnect_th,NULL,reconnect_loop,NULL);

    printf("listening on %s:%d...\n",conf0.listening_addr,conf0.listening_port);

    socknum  = create_socket(conf0.listening_addr,conf0.listening_port);

    if (conf0.use_ipv6) {

        printf("listening on %s:%d...\n",conf0.ipv6_listening_addr,conf0.listening_port);
        pthread_create(&listenv6,NULL,listen_v6,NULL);

    }



    while(1) {

        if((sock_id = accept(socknum,(struct sockaddr*)&peer_addr,&addr_len))<0) {

            fprintf(stderr,"ERROR: CANNOT ACCEPT NEW CONNECTION ON %s:%d",conf0.listening_addr,conf0.listening_port);

        }

        else {

            peer_str = inet_ntoa(peer_addr.sin_addr);
            printf("New Connection From %s\n",peer_str);

            //gerer la notion de public ici
            if ( (peer_num = isPeer(peer_str,sock_id)) < 0 && conf0.pub == 0) {

                fprintf(stderr,"ERROR: REMOTE HOST NOT In PEERS LIST\n");
                close(sock_id);

            }

            else if (conf0.pub == 1) {

                printf("Notice: Accepting public connection for host %s\n",peer_str);
                createPeer(peer_str,sock_id,1);

            }

            else {

                conf0.peers[peer_num].ssl = NULL;
                pthread_create(&conf0.peers[peer_num].ioth,NULL,dexp_serv_ioth,(void*)&conf0.peers[peer_num]);


            }



        }



    }


}
Example #14
0
ChatChannel::ChatChannel(Connector *conn, QString id, QString name)
  : QObject(conn),
    _conn(conn), _id (id), _name(name)
{
  connectAll();
}
Example #15
0
objectMap_t buildConfig( SST::M5::M5* comp, std::string name, std::string configFile, SST::Params& params )
{
    objectMap_t     objectMap;
    linkMap_t       linkMap;

    DBGC( 2, "name=`%s` file=`%s`\n", name.c_str(), configFile.c_str() );

#if XML
    SST::SSTSDLModelDefinition sdl = SST::SSTSDLModelDefinition( configFile );
#else
    Config cfg(0,1);
    cfg.model_options = configFile;
    SST::SSTPythonModelDefinition sdl = SST::SSTPythonModelDefinition(SST_INSTALL_PREFIX "/libexec/xmlToPython.py", 0, &cfg);
#endif

    SST::ConfigGraph& graph = *sdl.createConfigGraph();

    Factory factory( comp );

    SST::ConfigLinkMap_t::iterator lmIter;

    for ( lmIter = graph.getLinkMap().begin(); 
                lmIter != graph.getLinkMap().end(); ++lmIter ) {
        SST::ConfigLink& tmp = (*lmIter);
        DBGC(2,"key=%ld name=%s\n",tmp.key(), tmp.name.c_str());

        LinkInfo l0,l1;
        l0.compName = graph.getComponentMap()[ tmp.component[0] ].name.c_str();
        l1.compName = graph.getComponentMap()[ tmp.component[1] ].name.c_str();

        l0.portName = tmp.port[0];
        l1.portName = tmp.port[1];

        l0.portNum = 0;
        l1.portNum = 0;

        linkMap[ tmp.name  ] =  std::make_pair( l0, l1 ); 
    } 
    //printLinkMap( linkMap );

    SST::ConfigComponentMap_t::iterator iter; 

    for ( iter = graph.getComponentMap().begin(); 
            iter != graph.getComponentMap().end(); ++iter ) {
        SST::ConfigComponent& tmp = (*iter);
        DBGC(2,"id=%d %s %s\n",tmp.id, tmp.name.c_str(), 
                                                    tmp.type.c_str());

        SST::Params tmpParams = params.find_prefix_params( tmp.name + "." );
        tmp.params.insert( tmpParams.begin(), tmpParams.end() );
        tmp.params.enableVerify(false);

        Gem5Object_t* simObject = factory.createObject( 
                        name + "." + tmp.name, tmp.type, tmp.params );
        objectMap[ tmp.name.c_str() ] = simObject;  
        
        createLinks( *comp, *(Gem5Object_t*) simObject, tmp.params );
    }

    connectAll( objectMap, linkMap );
    return objectMap;
}
Example #16
0
Board::Board(Connector *conn)
  : QObject(conn), _conn(conn)
{
  connectAll();
}
Example #17
0
SessionGroup::~SessionGroup()
{
    // disconnect all
    connectAll(false);
}