Example #1
0
GuiCoordinator::GuiCoordinator(void){
  qDebug() << "GuiCoordinator constructor";
  _mainWindow=new MainWindow();

    // MainWindow -> GuiCoordinator : load the Table

    /*connect(
           _mainWindow,
           SIGNAL(robotFileXml(const QString&,const QString&)),
            this,
            SLOT(forwardRobotNameXml(const QString&,const QString&))
           );
*/
    connect(_mainWindow,
           SIGNAL(uiPlay()),
           this,
           SLOT(slotPlay()));

    connect(_mainWindow,
           SIGNAL(uiPause()),
           this,
           SLOT(slotPause()));
    connect(_mainWindow,
           SIGNAL(uiStop()),
           this,
           SLOT(slotStop()));
    connect(_mainWindow,
           SIGNAL(close()),
           this,
           SLOT(slotClose()));

  }
Example #2
0
EngineController::EngineController()
    : m_boundedPlayback( 0 )
    , m_multiPlayback( 0 )
    , m_multiSource( 0 )
    , m_playWhenFetched( true )
    , m_volume( 0 )
    , m_currentAudioCdTrack( 0 )
    , m_pauseTimer( new QTimer( this ) )
    , m_lastStreamStampPosition( -1 )
    , m_ignoreVolumeChangeAction ( false )
    , m_ignoreVolumeChangeObserve ( false )
    , m_tickInterval( 0 )
    , m_lastTickPosition( -1 )
    , m_lastTickCount( 0 )
    , m_mutex( QMutex::Recursive )
{
    DEBUG_BLOCK
    // ensure this object is created in a main thread
    Q_ASSERT( thread() == QCoreApplication::instance()->thread() );
    connect( this, SIGNAL(fillInSupportedMimeTypes()), SLOT(slotFillInSupportedMimeTypes()) );
    connect( this, SIGNAL(trackFinishedPlaying(Meta::TrackPtr,double)),
             SLOT(slotTrackFinishedPlaying(Meta::TrackPtr,double)) );
    new PowerManager( this ); // deals with inhibiting suspend etc.

    m_pauseTimer->setSingleShot( true );
    connect( m_pauseTimer, SIGNAL(timeout()), SLOT(slotPause() ) );
    m_equalizerController = new EqualizerController( this );
}
Example #3
0
void
GLWidget::slotTogglePlayPause()
{
    if (_playMode == PlayMode_Pause)
        slotPlay();
    else
        slotPause();
}
Example #4
0
void FVAnimation::setupMenu( )
{
    contextMenuObj->clear();

    acPlay = contextMenuObj->addAction(tr("&Play"), this, SLOT( slotPlay() ) );
    acPause = contextMenuObj->addAction(tr("&Pause"), this, SLOT( slotPause() ) );
    acStop = contextMenuObj->addAction(tr("&Stop"), this, SLOT( slotStop() ) );

    acPause->setEnabled( false );
    acStop->setEnabled( false );


    contextMenuObj->addSeparator();
    contextMenuObj->addAction(tr("&Update"), this, SLOT( slotUpdate() ) );

    contextMenuObj->addSeparator();
    contextMenuObj->addAction(tr("De&lete"),(QWidget*) manager, SLOT(slotDelete()) );
}
Example #5
0
void CDeviceDetailView::constructLayout()
{
  // Create the buttons
  // ... edit
  pqPushButtonEdit = new QPushButton( QIcon( ":icons/32x32/edit.png" ), "" );
  pqPushButtonEdit->setMaximumSize( 36, 34 );
  pqPushButtonEdit->setToolTip( tr("Edit this device's configuration") );
  pqPushButtonEdit->setEnabled( false );
  QWidget::connect( pqPushButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
  // ... delete
  pqPushButtonDelete = new QPushButton( QIcon( ":icons/32x32/delete.png" ), "" );
  pqPushButtonDelete->setMaximumSize( 36, 34 );
  pqPushButtonDelete->setToolTip( tr("Delete this device") );
  pqPushButtonDelete->setEnabled( false );
  QWidget::connect( pqPushButtonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
  // ... stop
  pqPushButtonStop = new QPushButton( QIcon( ":icons/32x32/stop.png" ), "" );
  pqPushButtonStop->setMaximumSize( 36, 34 );
  pqPushButtonStop->setToolTip( tr("Stop this device") );
  pqPushButtonStop->setCheckable( true );
  pqPushButtonStop->setEnabled( false );
  QWidget::connect( pqPushButtonStop, SIGNAL( clicked() ), this, SLOT( slotStop() ) );
  // ... pause
  pqPushButtonPause = new QPushButton( QIcon( ":icons/32x32/pause.png" ), "" );
  pqPushButtonPause->setMaximumSize( 36, 34 );
  pqPushButtonPause->setToolTip( tr("Pause this device") );
  pqPushButtonPause->setCheckable( true );
  pqPushButtonPause->setEnabled( false );
  QWidget::connect( pqPushButtonPause, SIGNAL( clicked() ), this, SLOT( slotPause() ) );
  // ... start
  pqPushButtonStart = new QPushButton( QIcon( ":icons/32x32/start.png" ), "" );
  pqPushButtonStart->setMaximumSize( 36, 34 );
  pqPushButtonStart->setToolTip( tr("Start this device") );
  pqPushButtonStart->setCheckable( true );
  pqPushButtonStart->setEnabled( false );
  QWidget::connect( pqPushButtonStart, SIGNAL( clicked() ), this, SLOT( slotStart() ) );

  // Create layout
  QVBoxLayout* __pqVBoxLayout = new QVBoxLayout();

  // Add header
  QFont __qFontHeader;
  __qFontHeader.setPixelSize( 16 );
  __qFontHeader.setBold( true );
  QHBoxLayout* __pqHBoxLayoutHeader = new QHBoxLayout();
  QLabel* __pqLabelIcon = new QLabel();
  __pqLabelIcon->setPixmap( QPixmap( ":icons/32x32/device.png" ) );
  __pqLabelIcon->setToolTip( tr("Device") );
  __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
  poTextName = new COverlayText();
  poTextName->setToolTip( tr("Name") );
  poTextName->setFont( __qFontHeader );
  poTextName->setWordWrap( true );
  __pqHBoxLayoutHeader->addWidget( poTextName, 1 );
  __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );

  // Add data
  QFont __qFontData;
  QTabWidget* __poTabWidget = new QTabWidget();
  __poTabWidget->setTabPosition( QTabWidget::South );
  __poTabWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );

  // ... summary
  QWidget* __poWidgetSummary = new QWidget();
  QVBoxLayout* __pqVBoxLayoutSummary = new QVBoxLayout();
  __qFontData.setPixelSize( 20 );
  poTextDriver = new COverlayText();
  poTextDriver->setToolTip( tr("Driver") );
  poTextDriver->setFont( __qFontData );
  poTextDriver->setIndent( 10 );
  poTextDriver->setAlignment( Qt::AlignHCenter );
  poTextDriver->resetText();
  __pqVBoxLayoutSummary->addWidget( poTextDriver, 0 );
  pqLabelActivity = new COverlayText();
  pqLabelActivity->setToolTip( tr("Activity") );
  pqLabelActivity->setFont( __qFontData );
  pqLabelActivity->setIndent( 10 );
  pqLabelActivity->setAlignment( Qt::AlignHCenter );
  __pqVBoxLayoutSummary->addWidget( pqLabelActivity, 1 );
  __poWidgetSummary->setLayout( __pqVBoxLayoutSummary );
  __poTabWidget->addTab( __poWidgetSummary, tr("Summary") );

  // ... [end]
  __pqVBoxLayout->addWidget( __poTabWidget, 1 );

  // Add separator
  QFrame* __pqFrameSeparator = new QFrame();
  __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
  __pqVBoxLayout->addWidget( __pqFrameSeparator );

  // Add buttons
  QHBoxLayout* __pqHBoxLayoutButtons = new QHBoxLayout();
  __pqHBoxLayoutButtons->addWidget( pqPushButtonEdit, 0, Qt::AlignLeft );
  __pqHBoxLayoutButtons->addWidget( pqPushButtonDelete, 1, Qt::AlignLeft );
  __pqHBoxLayoutButtons->addWidget( pqPushButtonStop, 1, Qt::AlignRight );
  __pqHBoxLayoutButtons->addWidget( pqPushButtonPause, 0, Qt::AlignRight );
  __pqHBoxLayoutButtons->addWidget( pqPushButtonStart, 0, Qt::AlignRight );
  __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );

  // Set the layout
  COverlayObjectDetailView::setLayout( __pqVBoxLayout );

}
    FenetrePrincipale::FenetrePrincipale(QWidget *parent) :
        QMainWindow(parent)
    {

        if (this->objectName().isEmpty())
            this->setObjectName(QString::fromUtf8("MainWindow"));
        this->resize(1024, 768);
        actionNouvelle_Partie = new QAction(this);
        actionNouvelle_Partie->setObjectName(QString::fromUtf8("actionNouvelle_Partie"));
        actionSauvegarder_la_Partie = new QAction(this);
        actionSauvegarder_la_Partie->setObjectName(QString::fromUtf8("actionSauvegarder_la_Partie"));
        actionCharger_une_Partie = new QAction(this);
        actionCharger_une_Partie->setObjectName(QString::fromUtf8("actionCharger_une_Partie"));
        actionA_Propos = new QAction(this);
        actionA_Propos->setObjectName(QString::fromUtf8("actionA_Propos"));
        centralWidget = new QWidget(this);
        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
        labelDescriptionVague = new QLabel(centralWidget);
        labelDescriptionVague->setObjectName(QString::fromUtf8("labelDescriptionVague"));
        labelDescriptionVague->setGeometry(QRect(20, 700, 672, 20));
        groupBoxInformationsJeu = new QGroupBox(centralWidget);
        groupBoxInformationsJeu->setObjectName(QString::fromUtf8("groupBoxInformationsJeu"));
        groupBoxInformationsJeu->setGeometry(QRect(710, 10, 300, 161));
        groupBoxInformationsJeu->setAutoFillBackground(false);
        lcdNumberCredits = new QLCDNumber(groupBoxInformationsJeu);
        lcdNumberCredits->setObjectName(QString::fromUtf8("lcdNumberCredits"));
        lcdNumberCredits->setGeometry(QRect(20, 52, 121, 41));
        lcdNumberVies = new QLCDNumber(groupBoxInformationsJeu);
        lcdNumberVies->setObjectName(QString::fromUtf8("lcdNumberVies"));
        lcdNumberVies->setGeometry(QRect(160, 50, 121, 41));
        labelCredits = new QLabel(groupBoxInformationsJeu);
        labelCredits->setObjectName(QString::fromUtf8("labelCredits"));
        labelCredits->setGeometry(QRect(20, 30, 111, 21));
        QFont font;
        font.setPointSize(13);
        font.setBold(true);
        font.setWeight(75);
        labelCredits->setFont(font);
        labelCredits->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
        labelVies = new QLabel(groupBoxInformationsJeu);
        labelVies->setObjectName(QString::fromUtf8("labelVies"));
        labelVies->setGeometry(QRect(160, 30, 111, 21));
        labelVies->setFont(font);
        labelVies->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);

        boutonLancerVague = new QPushButton(groupBoxInformationsJeu);
        boutonLancerVague->setObjectName(QString::fromUtf8("boutonLancerVague"));
        boutonLancerVague->setGeometry(QRect(20, 110, 121, 31));
        boutonLancerVague->setDisabled(true);

        boutonPause = new QPushButton(groupBoxInformationsJeu);
        boutonPause->setObjectName(QString::fromUtf8("boutonPause"));
        boutonPause->setGeometry(QRect(160, 110, 121, 31));
        boutonPause->setDisabled(true);

        groupBoxCreationDefense = new QGroupBox(centralWidget);
        groupBoxCreationDefense->setObjectName(QString::fromUtf8("groupBoxCreationDefense"));
        groupBoxCreationDefense->setGeometry(QRect(710, 190, 300, 160));
        boutonCreerPistoleteau = new QPushButton(groupBoxCreationDefense);
        boutonCreerPistoleteau->setObjectName(QString::fromUtf8("boutonCreerPistoleteau"));
        boutonCreerPistoleteau->setGeometry(QRect(20, 30, 121, 31));
        boutonCreerPistoleteau->setDisabled(true);
        boutonCreerLancepierre = new QPushButton(groupBoxCreationDefense);
        boutonCreerLancepierre->setObjectName(QString::fromUtf8("boutonCreerLancepierre"));
        boutonCreerLancepierre->setGeometry(QRect(160, 30, 121, 31));
        boutonCreerLancepierre->setDisabled(true);
        boutonCreerPaintball = new QPushButton(groupBoxCreationDefense);
        boutonCreerPaintball->setObjectName(QString::fromUtf8("boutonCreerPaintball"));
        boutonCreerPaintball->setGeometry(QRect(20, 70, 121, 31));
        boutonCreerPaintball->setDisabled(true);
        boutonCreerPetanque = new QPushButton(groupBoxCreationDefense);
        boutonCreerPetanque->setObjectName(QString::fromUtf8("boutonCreerPetanque"));
        boutonCreerPetanque->setGeometry(QRect(160, 70, 121, 31));
        boutonCreerPetanque->setDisabled(true);
        boutonCreerMusicien = new QPushButton(groupBoxCreationDefense);
        boutonCreerMusicien->setObjectName(QString::fromUtf8("boutonCreerMusicien"));
        boutonCreerMusicien->setGeometry(QRect(20, 110, 121, 31));
        boutonCreerMusicien->setDisabled(true);
        groupBoxInformations = new QGroupBox(centralWidget);
        groupBoxInformations->setObjectName(QString::fromUtf8("groupBoxInformations"));
        groupBoxInformations->setEnabled(true);
        groupBoxInformations->setGeometry(QRect(710, 370, 300, 201));
        groupBoxInformations->setMinimumSize(QSize(299, 200));
        groupBoxInformations->hide();
        labelDefenseurType = new QLabel(groupBoxInformations);
        labelDefenseurType->setObjectName(QString::fromUtf8("labelDefenseurType"));
        labelDefenseurType->setGeometry(QRect(20, 20, 80, 16));
        QFont font1;
        font1.setPointSize(10);
        font1.setBold(true);
        font1.setWeight(75);
        labelDefenseurType->setFont(font1);
        labelDefenseurCibles = new QLabel(groupBoxInformations);
        labelDefenseurCibles->setObjectName(QString::fromUtf8("labelDefenseurCibles"));
        labelDefenseurCibles->setGeometry(QRect(20, 40, 80, 16));
        labelDefenseurCibles->setFont(font1);
        labelDefenseurPortee = new QLabel(groupBoxInformations);
        labelDefenseurPortee->setObjectName(QString::fromUtf8("labelDefenseurPortee"));
        labelDefenseurPortee->setGeometry(QRect(20, 60, 80, 16));
        labelDefenseurPortee->setFont(font1);
        labelDefenseurCadence = new QLabel(groupBoxInformations);
        labelDefenseurCadence->setObjectName(QString::fromUtf8("labelDefenseurCadence"));
        labelDefenseurCadence->setGeometry(QRect(20, 80, 80, 16));
        labelDefenseurCadence->setFont(font1);
        labelDefenseurFrappe = new QLabel(groupBoxInformations);
        labelDefenseurFrappe->setObjectName(QString::fromUtf8("labelDefenseurFrappe"));
        labelDefenseurFrappe->setGeometry(QRect(20, 100, 80, 16));
        labelDefenseurFrappe->setFont(font1);
        labelDefenseurNiveau = new QLabel(groupBoxInformations);
        labelDefenseurNiveau->setObjectName(QString::fromUtf8("labelDefenseurNiveau"));
        labelDefenseurNiveau->setGeometry(QRect(20, 120, 80, 16));
        labelDefenseurNiveau->setFont(font1);
        boutonSupprimerDefense = new QPushButton(groupBoxInformations);
        boutonSupprimerDefense->setObjectName(QString::fromUtf8("boutonSupprimerDefense"));
        boutonSupprimerDefense->setGeometry(QRect(160, 150, 121, 31));
        QFont font2;
        font2.setPointSize(10);
        font2.setBold(false);
        font2.setItalic(true);
        font2.setWeight(50);
        boutonSupprimerDefense->setFont(font2);
        boutonAmeliorerDefense = new QPushButton(groupBoxInformations);
        boutonAmeliorerDefense->setObjectName(QString::fromUtf8("boutonAmeliorerDefense"));
        boutonAmeliorerDefense->setGeometry(QRect(20, 150, 121, 31));
        boutonAmeliorerDefense->setFont(font1);
        labelDefenseurType_info = new QLabel(groupBoxInformations);
        labelDefenseurType_info->setObjectName(QString::fromUtf8("labelDefenseurType_info"));
        labelDefenseurType_info->setGeometry(QRect(130, 20, 160, 16));
        labelDefenseurType_info->setFont(font1);
        labelDefenseurCibles_info = new QLabel(groupBoxInformations);
        labelDefenseurCibles_info->setObjectName(QString::fromUtf8("labelDefenseurCibles_info"));
        labelDefenseurCibles_info->setGeometry(QRect(130, 40, 160, 16));
        labelDefenseurCibles_info->setFont(font1);
        labelDefenseurPortee_info = new QLabel(groupBoxInformations);
        labelDefenseurPortee_info->setObjectName(QString::fromUtf8("labelDefenseurPortee_info"));
        labelDefenseurPortee_info->setGeometry(QRect(130, 60, 160, 16));
        labelDefenseurPortee_info->setFont(font1);
        labelDefenseurCadence_info = new QLabel(groupBoxInformations);
        labelDefenseurCadence_info->setObjectName(QString::fromUtf8("labelDefenseurCadence_info"));
        labelDefenseurCadence_info->setGeometry(QRect(130, 80, 160, 16));
        labelDefenseurCadence_info->setFont(font1);
        labelDefenseurFrappe_info = new QLabel(groupBoxInformations);
        labelDefenseurFrappe_info->setObjectName(QString::fromUtf8("labelDefenseurFrappe_info"));
        labelDefenseurFrappe_info->setGeometry(QRect(130, 100, 160, 16));
        labelDefenseurFrappe_info->setFont(font1);
        labelDefenseurNiveau_info = new QLabel(groupBoxInformations);
        labelDefenseurNiveau_info->setObjectName(QString::fromUtf8("labelDefenseurNiveau_info"));
        labelDefenseurNiveau_info->setGeometry(QRect(130, 120, 160, 16));
        labelDefenseurNiveau_info->setFont(font1);


        widgetCarte = new QWidget(centralWidget);
        widgetCarte->setPalette(QColor("white"));
        widgetCarte->setAutoFillBackground(true);
        widgetCarte->setGeometry(QRect(10, 10, 691, 691));
        widgetCarte->setObjectName(QString::fromUtf8("widgetCarte"));

        carteGraphicsScene = new MyQGraphicsScene;
        carteGraphicsScene->setSceneRect(10, 10, Constantes::largeurGraphicsScene, Constantes::hauteurGraphicsScene);
        carteGraphicsView = new QGraphicsView(carteGraphicsScene, widgetCarte);
        carteGraphicsView->setBackgroundBrush(QPixmap(QString(":/images/herbe.jpg")));

        this->setCentralWidget(centralWidget);
        statusBar = new QStatusBar(this);
        statusBar->setObjectName(QString::fromUtf8("statusBar"));
        this->setStatusBar(statusBar);
        menuBar = new QMenuBar(this);
        menuBar->setObjectName(QString::fromUtf8("menuBar"));
        menuBar->setGeometry(QRect(0, 0, 1024, 21));
        menuTowerDefense = new QMenu(menuBar);
        menuTowerDefense->setObjectName(QString::fromUtf8("menuTowerDefense"));
        menuAide = new QMenu(menuBar);
        menuAide->setObjectName(QString::fromUtf8("menuAide"));
        this->setMenuBar(menuBar);

        menuBar->addAction(menuTowerDefense->menuAction());
        menuBar->addAction(menuAide->menuAction());
        menuTowerDefense->addAction(actionNouvelle_Partie);
        menuTowerDefense->addAction(actionSauvegarder_la_Partie);
        menuTowerDefense->addAction(actionCharger_une_Partie);
        menuAide->addAction(actionA_Propos);


        this->setWindowTitle(QApplication::translate("MainWindow", "Tower Defense - LO21", 0, QApplication::UnicodeUTF8));
        actionNouvelle_Partie->setText(QApplication::translate("MainWindow", "Nouvelle Partie", 0, QApplication::UnicodeUTF8));
        actionNouvelle_Partie->setShortcut(QApplication::translate("MainWindow", "Ctrl+N", 0, QApplication::UnicodeUTF8));
        actionSauvegarder_la_Partie->setText(QApplication::translate("MainWindow", "Sauvegarder la Partie", 0, QApplication::UnicodeUTF8));
        actionSauvegarder_la_Partie->setShortcut(QApplication::translate("MainWindow", "Ctrl+S", 0, QApplication::UnicodeUTF8));
        actionCharger_une_Partie->setText(QApplication::translate("MainWindow", "Charger une Partie", 0, QApplication::UnicodeUTF8));
        actionCharger_une_Partie->setShortcut(QApplication::translate("MainWindow", "Ctrl+L", 0, QApplication::UnicodeUTF8));
        actionA_Propos->setText(QApplication::translate("MainWindow", "A Propos", 0, QApplication::UnicodeUTF8));
        actionA_Propos->setShortcut(QApplication::translate("MainWindow", "F1", 0, QApplication::UnicodeUTF8));
        labelDescriptionVague->setText(QApplication::translate("MainWindow", "Aucune vague en cours...", 0, QApplication::UnicodeUTF8));
        groupBoxInformationsJeu->setTitle(QApplication::translate("MainWindow", "Informations de la partie", 0, QApplication::UnicodeUTF8));
        labelCredits->setText(QApplication::translate("MainWindow", "Cr\303\251dits", 0, QApplication::UnicodeUTF8));
        labelVies->setText(QApplication::translate("MainWindow", "Vies", 0, QApplication::UnicodeUTF8));
        boutonLancerVague->setText(QApplication::translate("MainWindow", "Lancer la Vague", 0, QApplication::UnicodeUTF8));
        boutonPause->setText(QApplication::translate("MainWindow", "Pause", 0, QApplication::UnicodeUTF8));
        groupBoxCreationDefense->setTitle(QApplication::translate("MainWindow", "Cr\303\251er une d\303\251fense", 0, QApplication::UnicodeUTF8));
        boutonCreerPistoleteau->setText(QApplication::translate("MainWindow", "Pistolet \303\240 Eau", 0, QApplication::UnicodeUTF8));
        boutonCreerLancepierre->setText(QApplication::translate("MainWindow", "Lance-Pierre", 0, QApplication::UnicodeUTF8));
        boutonCreerPaintball->setText(QApplication::translate("MainWindow", "Paint-Ball", 0, QApplication::UnicodeUTF8));
        boutonCreerPetanque->setText(QApplication::translate("MainWindow", "P\303\251tanque", 0, QApplication::UnicodeUTF8));
        boutonCreerMusicien->setText(QApplication::translate("MainWindow", "Musicien", 0, QApplication::UnicodeUTF8));
        groupBoxInformations->setTitle(QApplication::translate("MainWindow", "D\303\251tails", 0, QApplication::UnicodeUTF8));
        labelDefenseurType->setText(QApplication::translate("MainWindow", "Type :", 0, QApplication::UnicodeUTF8));
        labelDefenseurCibles->setText(QApplication::translate("MainWindow", "Cibles :", 0, QApplication::UnicodeUTF8));
        labelDefenseurPortee->setText(QApplication::translate("MainWindow", "Port\303\251e :", 0, QApplication::UnicodeUTF8));
        labelDefenseurCadence->setText(QApplication::translate("MainWindow", "Cadence :", 0, QApplication::UnicodeUTF8));
        labelDefenseurFrappe->setText(QApplication::translate("MainWindow", "Frappe :", 0, QApplication::UnicodeUTF8));
        labelDefenseurNiveau->setText(QApplication::translate("MainWindow", "Niveau :", 0, QApplication::UnicodeUTF8));
        boutonSupprimerDefense->setText(QApplication::translate("MainWindow", "Supprimer", 0, QApplication::UnicodeUTF8));
        boutonAmeliorerDefense->setText(QApplication::translate("MainWindow", "Am\303\251liorer", 0, QApplication::UnicodeUTF8));
        labelDefenseurType_info->setText(QApplication::translate("MainWindow", "-", 0, QApplication::UnicodeUTF8));
        labelDefenseurCibles_info->setText(QApplication::translate("MainWindow", "-", 0, QApplication::UnicodeUTF8));
        labelDefenseurPortee_info->setText(QApplication::translate("MainWindow", "-", 0, QApplication::UnicodeUTF8));
        labelDefenseurCadence_info->setText(QApplication::translate("MainWindow", "-", 0, QApplication::UnicodeUTF8));
        labelDefenseurFrappe_info->setText(QApplication::translate("MainWindow", "-", 0, QApplication::UnicodeUTF8));
        labelDefenseurNiveau_info->setText(QApplication::translate("MainWindow", "-", 0, QApplication::UnicodeUTF8));
        menuTowerDefense->setTitle(QApplication::translate("MainWindow", "Menu", 0, QApplication::UnicodeUTF8));
        menuAide->setTitle(QApplication::translate("MainWindow", "Aide", 0, QApplication::UnicodeUTF8));


        timer = new QTimer();


        // Connexion des signaux et des slots
        QObject::connect(timer, SIGNAL(timeout()), carteGraphicsScene, SLOT(advance()));
        QObject::connect(boutonLancerVague, SIGNAL(clicked()), this, SLOT(lancerVague()));
        QObject::connect(boutonPause, SIGNAL(clicked()), this, SLOT(slotPause()));
        QObject::connect(boutonCreerPaintball, SIGNAL(clicked()), this, SLOT(activerInsertion()));
        QObject::connect(boutonCreerLancepierre, SIGNAL(clicked()), this, SLOT(activerInsertion()));
        QObject::connect(boutonCreerPetanque, SIGNAL(clicked()), this, SLOT(activerInsertion()));
        QObject::connect(boutonCreerPistoleteau, SIGNAL(clicked()), this, SLOT(activerInsertion()));
        QObject::connect(boutonCreerMusicien, SIGNAL(clicked()), this, SLOT(activerInsertion()));
        QObject::connect(boutonAmeliorerDefense, SIGNAL(clicked()), carteGraphicsScene, SLOT(ameliorerDefenseur()));
        QObject::connect(boutonSupprimerDefense, SIGNAL(clicked()), carteGraphicsScene, SLOT(supprimerDefenseur()));

        QObject::connect(carteGraphicsScene, SIGNAL(mauvaisEndroitClique()), this, SLOT(mauvaisEndroitClique()));

        // Connexion entre les factories et la partie graphique
        // Mise à jour des informations courantes du jeu
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(creditChanged()), this, SLOT(creditChanged()));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(creditChanged()), carteGraphicsScene, SLOT(creditChanged()));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(viesChanged()), this, SLOT(viesChanged()));
        QObject::connect(carteGraphicsScene, SIGNAL(signalAfficherInfosDefenseur(Defenseur*)), this, SLOT(afficherInfosDefenseur(Defenseur*)));


        // Gestion de l'affichage des ennemis
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalAjouterEnnemi(Ennemi*)), this, SLOT(ajouterEnnemi(Ennemi*)));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalEnnemiMort(Ennemi*)), this, SLOT(supprimerEnnemi(Ennemi*)));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalEnnemiBut(Ennemi*)), this, SLOT(supprimerEnnemi(Ennemi*)));

        // Gestion de l'affichage des defenseurs
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalAjouterDefenseur(Defenseur*)), this, SLOT(ajouterDefenseur(Defenseur*)));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalSupprimerDefenseur(Defenseur*)), this, SLOT(supprimerDefenseur(Defenseur*)));

        // Gestion de l'affichage des projectiles
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalAjouterProjectile(Projectile*)), this, SLOT(ajouterProjectile(Projectile*)));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalSupprimerProjectile(Projectile*)), this, SLOT(supprimerProjectile(Projectile*)));

        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalPlusDeVies()), this, SLOT(plusDeVies()));
        QObject::connect(JoueurSingleton::getInstance(), SIGNAL(signalVagueTerminee()), this, SLOT(vagueTerminee()));

        QObject::connect(actionNouvelle_Partie, SIGNAL(triggered()), this, SLOT(lancerNouvellePartie()));





    }