예제 #1
0
TabLog::TabLog(TabSupervisor *_tabSupervisor, AbstractClient *_client, QWidget *parent)
    : Tab(_tabSupervisor, parent), client(_client)
{
    roomTable = new QTableWidget();
    roomTable->setColumnCount(6);
    roomTable->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    roomTable->setHorizontalHeaderLabels(QString(tr("Time;SenderName;SenderIP;Message;TargetID;TargetName")).split(";"));

    gameTable = new QTableWidget();
    gameTable->setColumnCount(6);
    gameTable->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    gameTable->setHorizontalHeaderLabels(QString(tr("Time;SenderName;SenderIP;Message;TargetID;TargetName")).split(";"));

    chatTable = new QTableWidget();
    chatTable->setColumnCount(6);
    chatTable->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    chatTable->setHorizontalHeaderLabels(QString(tr("Time;SenderName;SenderIP;Message;TargetID;TargetName")).split(";"));

    QTabWidget *tabManager = new QTabWidget();
    tabManager->addTab(roomTable, tr("Room Logs"));
    tabManager->addTab(gameTable, tr("Game Logs"));
    tabManager->addTab(chatTable, tr("Chat Logs"));
    setCentralWidget(tabManager);

    createDock();
    restartLayout();
    clearClicked();
    retranslateUi();
}
예제 #2
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
   showFullScreen();
   startInfo = new StartDialog(this);
   
   testArea = new TestEnv(numTargets,200,20,this);
   QObject::connect(testArea, SIGNAL(emitHit(const int&)), this, SLOT(setRem(const int&)));
   QObject::connect(testArea, SIGNAL(emitError(const int&)), this, SLOT(setErr(const int&)));
   QObject::connect(testArea, SIGNAL(emitFinish()), this, SLOT(startTests()));
   QObject::connect(testArea, SIGNAL(retResults(const int&, const int&, const double&)), this, SLOT(saveResults(const int&, const int&, const double&)));

   testArea2 = new TestEnv(numTargets,200,20,this);
   QObject::connect(testArea2, SIGNAL(emitHit(const int&)), this, SLOT(setRem(const int&)));
   QObject::connect(testArea2, SIGNAL(emitError(const int&)), this, SLOT(setErr(const int&)));
   QObject::connect(testArea2, SIGNAL(emitFinish()), this, SLOT(startTests()));
   QObject::connect(testArea2, SIGNAL(retResults(const int&, const int&, const double&)), this, SLOT(saveResults(const int&, const int&, const double&)));

   QHBoxLayout *layout = new QHBoxLayout();
   layout->addWidget(testArea);
   layout->addWidget(testArea2);

   QWidget *temp = new QWidget();
   temp->setLayout(layout);
   setCentralWidget(temp);
   
   createDock();
   getInfo();
   loadCursors();
   displayInformation();
   startTests();
}
void PixelStreamerLauncher::openDock(const QPointF pos, const QSize size, const QString rootDir)
{
    const QString& uri = DockPixelStreamer::getUniqueURI();

    const QSize& dockSize = DockPixelStreamer::constrainSize(size);

    const QSizeF normalizedSize( (double)dockSize.width() / config_.getTotalWidth(),
                                 (double)dockSize.height() / config_.getTotalHeight());
    windowManager_.createContentWindow(uri, pos, normalizedSize);

    if( !processes_.count(uri) )
    {
        if( !createDock(dockSize, rootDir))
            put_flog(LOG_ERROR, "Dock process could not be started!");
    }
}
예제 #4
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
//PRE: parent points to an initialized QWidget
//POST: The application's GUI elements are created (menus, dock, toolbar), and we are set up to
//		start playing songs
{
    setWindowIcon(QIcon(":/Icon/GLUI.png"));		//Set Icon to image as located by .qrc file

    glWindow = new GLWidget(0);						//Initialize member pointer variables
    myPlayer = new Player(0);
    playlistWidget = new QListWidget();
    myWave = NULL;

    playlistWidget->clear();                        //Clear playlist initially

    curTrack = -1;									//-1 indicates no track playing
    numTracks = 0;									//we have no track list

    setCentralWidget(glWindow);						//every QMainWindow needs a central widget
    //(the one that is the primary focus)

    connect(this, SIGNAL(newSong(Wave*)), 			//When we start playing a new song,
            myPlayer, SLOT(playNewSong(Wave*)));	//let the SDL music player
    connect(this, SIGNAL(newSong(Wave*)),
            glWindow, SLOT(playNewSong(Wave*)));	//and GLWidget play the new song

    connect(glWindow, SIGNAL(songEnded()), 			//When the current song has ended,
            this, SLOT(gotoNextSong()));			// go to the next song

    connect(playlistWidget, SIGNAL(currentRowChanged(int)), //Handle the playlist being clicked
            this, SLOT(listClicked(int)));

    createDock();									//Create the GUI components
    createActions();
    createMenus();
    createToolBar();
    //playlistDock->toggleViewAction()->trigger(); (This doesn't work for hiding playlist upon start)
}