Source

imalse / gui / NetAnim / main / main.cpp

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: John Abraham <john.abraham@gatech.edu>
 * Inspired and adapted from NetAnim 1 written by George F Riley (riley@ece.gatech.edu)
 */
#include <stdlib.h> 

#include "main/netanim.h"
#include "animator/animatormode.h"

#include <QtGui>
#include <QX11EmbedWidget>

using namespace netanim;

int main(int argc, char * argv[])
{
    QApplication app(argc, argv);   
    
    QX11EmbedWidget * window = new QX11EmbedWidget();
    window->embedInto(atoi(argv[1]));
    window->show();
    
    QMainWindow *mainWindow = new QMainWindow(0);    
    NetAnim *netAnim = new NetAnim(mainWindow);
    
    QVBoxLayout *layout = new QVBoxLayout(window);
    layout->addWidget(mainWindow);
    layout->activate();
    mainWindow->setCentralWidget(netAnim->m_tabWidget);    
    
    mainWindow->show();
    window->resize(700, 616);
    
    return app.exec(); 
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.