MainWindow::MainWindow()
{

    /** Call these functions to initalize actions, menus and toolbars. */
    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    //viewType = NORMALVIEW;
    //operationalMode = WEBCAM;
    /** Create audio list */
    audioList = new PlayAudio(this);
    mode = WEBCAM;

    /** Initialize opencv camera */
    CvCapture *camera = cvCreateCameraCapture(0);
    assert(camera);
    IplImage *image=cvQueryFrame(camera);
    assert(image);
    mainCameraWidget = new CameraWidget(camera, this);

    /** Initialize text box */
    outputText = new QLineEdit(tr(""));
    outputText->setReadOnly(true);

    /** Creating main layout of the application */
    QVBoxLayout *mainLayout = new QVBoxLayout();
    mainLayout->addWidget(mainCameraWidget);
    mainLayout->addWidget(outputText);
    QWidget *widget = new QWidget();
    widget->setLayout(mainLayout);
    setCentralWidget(widget);
    this->setMouseTracking(true);

    /** Starting time to take update from the matching module */
    startTimer(3000);

    /** Connecting the main window with the camera widget and with the matching module */
    connect(this, SIGNAL(ViewTypeChange(int)), mainCameraWidget, SLOT(viewTypeChange(int)));
    connect(this, SIGNAL(operationalModeChange(int,QString)), mainCameraWidget, SLOT(operationalModeChange(int,QString)));
    connect(mainCameraWidget->matchGesture, SIGNAL(sendForDisplay(char)), this, SLOT(displayRecognizedAlphabet(char)));

}
FileBrowserDialog::FileBrowserDialog(const ServerRepo& repo, QWidget *parent)
    : QDialog(parent),
      repo_(repo)
{
    current_path_ = "/";
    // since root is special, the next step is unnecessary
    // current_lpath_.push_back("");

    const Account& account = seafApplet->accountManager()->currentAccount();
    data_mgr_ = new DataManager(account);

    setWindowTitle(tr("File Browser"));
    setWindowIcon(QIcon(":/images/seafile.png"));
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

    createToolBar();
    createStatusBar();
    createLoadingFailedView();
    createFileTable();

    QVBoxLayout *vlayout = new QVBoxLayout;
    vlayout->setContentsMargins(0, 6, 0, 0);
    vlayout->setSpacing(0);
    setLayout(vlayout);

    stack_ = new QStackedWidget;
    stack_->insertWidget(INDEX_LOADING_VIEW, loading_view_);
    stack_->insertWidget(INDEX_TABLE_VIEW, table_view_);
    stack_->insertWidget(INDEX_LOADING_FAILED_VIEW, loading_failed_view_);

    vlayout->addWidget(toolbar_);
    vlayout->addWidget(stack_);
    vlayout->addWidget(status_bar_);

    connect(table_view_, SIGNAL(direntClicked(const SeafDirent&)),
            this, SLOT(onDirentClicked(const SeafDirent&)));

    connect(data_mgr_, SIGNAL(getDirentsSuccess(const QList<SeafDirent>&)),
            this, SLOT(onGetDirentsSuccess(const QList<SeafDirent>&)));
    connect(data_mgr_, SIGNAL(getDirentsFailed(const ApiError&)),
            this, SLOT(onGetDirentsFailed(const ApiError&)));

    QTimer::singleShot(0, this, SLOT(fetchDirents()));
}
//! [1]
MainWindow::MainWindow()
//! [1] //! [2]
{
    textEdit = new QPlainTextEdit;
    setCentralWidget(textEdit);

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    readSettings();

    connect(textEdit->document(), SIGNAL(contentsChanged()),
            this, SLOT(documentWasModified()));

    setCurrentFile("");
    setUnifiedTitleAndToolBarOnMac(true);
}
Exemple #4
0
PlaYUVerApp::PlaYUVerApp() :
        m_pcCurrentSubWindow( NULL ),
        m_pcCurrentVideoSubWindow( NULL ),
        m_pcAboutDialog( NULL )
{

  setWindowModality( Qt::ApplicationModal );
  setWindowModality( Qt::NonModal );

  // DBus
#ifdef USE_QTDBUS
  m_pDBusAdaptor = new PlaYUVerAppAdaptor( this );
#endif

  m_pcWindowHandle = new PlaYUVerSubWindowHandle( this );

  m_appModuleVideo = new VideoHandle( this, m_pcWindowHandle );
  m_appModuleQuality = new QualityHandle( this, m_pcWindowHandle );
  m_appModuleExtensions = new ModulesHandle( this, m_pcWindowHandle, m_appModuleVideo );

  createActions();
  createToolBars();
  createDockWidgets();
  createMenus();
  createStatusBar();
  updateMenus();

  readSettings();

  setWindowTitle( QApplication::applicationName() );
  setWindowIcon( QIcon( ":/images/playuver.png" ) );
  setUnifiedTitleAndToolBarOnMac( true );
  setCentralWidget( m_pcWindowHandle );
  setAcceptDrops( true );
  setBackgroundRole( QPalette::Background );

  connect( m_pcWindowHandle, SIGNAL( windowActivated() ), this, SLOT( update() ) );
  connect( m_pcWindowHandle, SIGNAL( changed() ), this, SLOT( update() ) );
  connect( m_appModuleVideo, SIGNAL( changed() ), this, SLOT( update() ) );
  connect( m_appModuleQuality, SIGNAL( changed() ), this, SLOT( update() ) );
  connect( m_appModuleExtensions, SIGNAL( changed() ), this, SLOT( update() ) );

}
Exemple #5
0
MainWindow::MainWindow() {
    mNewFileCounter = 1;
    mProject = 0;
    mTransistionDiagram = 0;
    mProjectView = 0;

    mTabWidget = new QTabWidget;
    mTabWidget->setTabsClosable(true);
    connect(mTabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(closeTab(int)));
    setCentralWidget(mTabWidget);

    createStatusBar();
    createDockWindows();
    createActions();
    createMenus();
    createToolBars();

    newBlankPage();
}
Exemple #6
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    spreadsheet = new Spreadsheet;

    setCentralWidget(spreadsheet);

    createStatusBar();
    connectActions();

    createRecentFileActions();
    createRecentFileMenus();

    createContextMenu();
    readSettings();
    setCurrentFile("");
}
Exemple #7
0
MainWindow::MainWindow()
{
    spreadsheet = new SpreadSheet(this);
    setCentralWidget(spreadsheet);

    createActions();
    createMenus();
    createContextMenu();
    createToolBars();
    createStatusBar();

    readSettings();

    findDialog = 0;

    setAttribute(Qt::WA_DeleteOnClose);
    setWindowIcon(QIcon(":/images/icon.png"));
    setCurrentFile("");
}
Exemple #8
0
MainWindow::MainWindow() {

   QDesktopWidget *desktop = QApplication::desktop();

   int screenWidth, width;
   int screenHeight, height;
   int x, y;
   QSize windowSize;

   screenWidth = desktop -> width();
   screenHeight = desktop -> height();
   
   qDebug() << "Screen Width: " << screenWidth;
   qDebug() << "Screen Height: " << screenHeight;

   windowSize = size();
   width = windowSize.width();
   height = windowSize.height();

   qDebug() << "Window Width: " << width;
   qDebug() << "Window Height: " << height;

   x = (screenWidth - width) / 2;
   y = (screenHeight - height) / 2;
   // y -= 50;
   
   qDebug() << "Window position: " << x << ", " << y;

   move(x, y);

   createActions();
   createMenus();
   createStatusBar();

   qDebug() << "Connecting to db: " << db_connect();
   if(!db_checkStruct()){
      db_createStruct();
      db_checkStruct();
   }

   playersGrid *personaggi = new playersGrid(this);
   setCentralWidget(personaggi);
}
Exemple #9
0
MilkMainWindow::MilkMainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    setObjectName("MilkMainWindow");
    setWindowTitle("Milk");
    setWindowIcon(QIcon(":/ui/app.ico"));

    setDockOptions(QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks);

    setMinimumSize(320, 240);

    createCentralView();

    createAction();
    createMenu();
    createToolBar();
    createStatusBar();
    createDockPanel();
}
Exemple #10
0
MainWindow::MainWindow(){
    // Calls the functions that creates the widgets for the stack, menu bar, menu bar actions, & status bar
    createMainWindowMenu();
    createGameWidget();
    createActions();
    createMenus();
    createStatusBar();

    // Creates a stacked widget as the central widget that holds the menu and game widgets
    stack = new QStackedWidget();
    stack->addWidget(menuWidget);
    stack->addWidget(gameWidget);
    setCentralWidget(stack) ;

    // Sets the title, background, & window size
    setWindowTitle(tr("Brick Break"));
    setStyleSheet("QMainWindow{background-image:url(:/Resource/images/Background.png)}");
    setFixedSize(600,450);
}
Exemple #11
0
MainWindow::MainWindow()
{
    textEdit = new QTextEdit;
    setCentralWidget(textEdit);

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    readSettings();

    connect(textEdit->document(), SIGNAL(contentsChanged()),
            this, SLOT(documentWasModified()));

    setCurrentFile("");

    showSettings();
}
void PEditor::init() {
    setWindowIcon(QIcon(":/pi_icon.png"));

    env = new Environment(this);
    pi = new ProgInfo(".");
    doc = new DocViewer();

    lineNumbering = true;

    tabWidget = new TabWidget(this);
    connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(switchToTab(int)));

    setCentralWidget(tabWidget);
    setFocusProxy(tabWidget);

//     textEdit = new TextEditWidget(tabWidget);
    textEdit = 0;

    createActions();
    connect(tabWidget, SIGNAL(contextMenuAt(const QPoint &, int)), this, SLOT(showContextMenu(const QPoint &, int))); // The file actions are needed for showContextMenu().

    createMenus();
    createToolBars();
    createStatusBar();

    createDockWindows();

    connect(env, SIGNAL(canCompileChanged(bool)), this, SLOT(canCompileChanged(bool))); // This should be placed after createActions();
    if (env->getCanCompile())
        enableCLActs();
    else
        disableCLActs();

    tabCloseButton = new QToolButton(this);
    tabCloseButton->setDefaultAction(tabCloseAction);
    tabWidget->setCornerWidget(tabCloseButton);
    connect(tabCloseButton, SIGNAL(clicked()), this, SLOT(removeTab()));

    readSettings();

    openProgFunc(progName);
}
Exemple #13
0
SampleEditor::SampleEditor(QWidget * parent, Qt::WindowFlags flags)
: QMainWindow(parent,flags)
{
	table = new TableWindow();
	plot = new PlotWindow(this);
	histo = new HistoWindow(this);
	//graph =  new GraphWindow(this);
	dendro1 = new Dendrogram(this);
	dendro2 = new Dendrogram(this);
	heatmap = new Heatmap(this);
	biheatmap = new BiHeatmap(this);
	spdMSTWin = NULL;
	spdkNNGWin = NULL;
	//progressionheatmap = new ProgressionHeatmap(this);

	this->cc1 = NULL;
	this->cc2 = NULL;

	data = NULL;
	data = vtkSmartPointer<vtkTable>::New();		//Start with a new table

	selection = new ObjectSelection();
	selection2 = new ObjectSelection();

	lastPath = ".";

	createMenus();
	createStatusBar();
	this->flag = 0;

	setCentralWidget(table);
	setWindowTitle(tr("Sample Editor"));
	connect(selection, SIGNAL(changed()), this, SLOT(updateStatistics()));
    
	this->ClusterSelections = new SelectiveClustering();
	//this->SampleClusterManager = new ClusterManager();
	//this->SampleClusterManager->setClusteringModel(this->ClusterSelections );
	//this->SampleClusterManager->setObjectSelection(selection);
	//this->SampleClusterManager->setVisible(true);

	this->resize(500,500);
}
void MainWindow::init()
{
    setAttribute(Qt::WA_DeleteOnClose);

    isUntitled = true;

    textEdit = new QTextEdit;
    setCentralWidget(textEdit);

    createActions();
    createStatusBar();

    readSettings();

    connect(textEdit->document(), &QTextDocument::contentsChanged,
            this, &MainWindow::documentWasModified);
    //textEdit->document()返回QTextDocument*,继承自object
    setUnifiedTitleAndToolBarOnMac(true);
    //This property holds whether the window uses the unified title and toolbar look on OS X.
}
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent),
      pluginManager(PluginManager::instance())
{
    pluginManager->loadPlugins();

    createActions();
    createEditors();
    createMenus();
    createToolBars();
    createStatusBar();
    createDockWidget();
    createConnections();

    visualEditor->setFocus();
    setCentralWidget(editorStack);
    setWindowTitle(tr("OrbitsWriter [*]"));
    setWindowIcon(QIcon(":/img/orbitswriter"));
    setUnifiedTitleAndToolBarOnMac(true);
}
Exemple #16
0
/*!
  \brief Constructor.
  Creates a new MainWindow instance.
  \param parent parent widget of this window, default value is \a 0
 */
Ui::MainWindow::MainWindow(QWidget *parent /* = 0 */)
    : QMainWindow(parent)
{
    setWindowIcon(QIcon(":/app"));
    setWindowTitle(tr("PicWorks v%1", "Main window title with version number.").arg(appCtx->version()));

    mapper = new QSignalMapper(this);

    mdiArea = new QMdiArea;
    setCentralWidget(mdiArea);

    createActions();
    createMenus();
    createStatusBar();
    createDockPanels();
    createToolBar();
    createToolBox();
    createCommonBar();
    establishConnections();
}
Exemple #17
0
MainWindow::MainWindow()
{
    renderArea = new RenderArea(this); // tworzenie palety do rysowania
    setCentralWidget(renderArea);

    keyPressEater = new KeyPressEater();

    createActions();
    createMenus();
    createDockWindows();
    createStatusBar();

    cmdLineEdit->setFocus();

    connect(renderArea, SIGNAL(fail()), this, SLOT(fail()));

    setWindowTitle(tr("Turtle"));
    setWindowIcon(QIcon(":/images/hisc-app-kturtle.svg"));
    setCurrentFile("");
}
Exemple #18
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    mdiArea = new QMdiArea;
    setCentralWidget(mdiArea);
    connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
            this, SLOT(updateActions()));

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    setWindowIcon(QPixmap(":/images/icon.png"));
    setWindowTitle(tr("MDI Editor"));
    QTimer::singleShot(0, this, SLOT(loadFiles()));
}
Exemple #19
0
Window::Window()
{
    hide();

    controller = new Controller(Settings::getUserName());

    createActions();
    createTrayIcon();
    createMenus();
    createStatusBar();

    textLog = new QPlainTextEdit;
    textLog->appendPlainText(tr("Welcome") + ", " + Settings::getUserName() + "!");
    textLog->appendPlainText(tr("If it is not you, choose Main->Profile to introduce yourself."));
    textLog->appendPlainText("");
    textLog->setReadOnly(true);
    setCentralWidget(textLog);

    appIcon = new QIcon();
    appIcon->addFile(":/img/app.png", QSize(32, 32));
    appIcon->addFile(":/img/tray.png", QSize(16, 16));

    QRect screenRect = QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen());
    QRect windowRect(0, 0, 400, 300);

    if (screenRect.width() < 400) {
        windowRect.setWidth(screenRect.width());
    }
    if (screenRect.height() < 300) {
        windowRect.setHeight(screenRect.height());
    }
    windowRect.moveCenter(screenRect.center());

    setGeometry(windowRect);
    setFixedSize(400, 300);

    setWindowTitle(tr("QeyLogger Control Center"));
    setWindowIcon(*appIcon);

    show();
}
Exemple #20
0
int main(int argc,char *argv[])
{

	GtkWidget *mainWindow;
	GtkWidget *mainVBox;
	GtkWidget *menuBar;
	GtkWidget *scrolledWindow;
	GtkWidget *textView;
	GtkWidget *toolBar;
	GtkWidget *statusBar;
	GtkTextBuffer *buf;


	gtk_init (&argc,&argv);

	mainWindow		= createWindow ("SimpleEditor",800,500,GTK_WIN_POS_CENTER);
	mainVBox		= gtk_vbox_new (FALSE,0);
	statusBar		= createStatusBar ();
	textView		= createTextView (statusBar);
	scrolledWindow  = gtk_scrolled_window_new (NULL,NULL);
	menuBar			= createMenuBar (textView,mainWindow);
	buf				= gtk_text_view_get_buffer(GTK_TEXT_VIEW(textView));
	toolBar			= createToolBar (textView);

	g_signal_connect(buf,"changed",G_CALLBACK(buffer_text_changed),NULL);
	g_signal_connect(G_OBJECT(mainWindow),"delete-event",G_CALLBACK(mainWindowDeleteEvent),(gpointer)textView);

	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrolledWindow),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);

	gtk_container_add (GTK_CONTAINER(mainWindow),mainVBox);
	gtk_box_pack_start (GTK_BOX(mainVBox),menuBar,FALSE,FALSE,0);
	gtk_box_pack_start (GTK_BOX(mainVBox),toolBar,FALSE,FALSE,0);
	gtk_box_pack_start (GTK_BOX(mainVBox),scrolledWindow,TRUE,TRUE,0);
	gtk_box_pack_start (GTK_BOX(mainVBox),statusBar,FALSE,FALSE,0);
	gtk_container_add (GTK_CONTAINER(scrolledWindow),textView);
	
	gtk_widget_show_all(mainWindow);
		
	gtk_main ();
	return 0;
}
MainWindowImpl::MainWindowImpl( QWidget * parent, Qt::WFlags f) 
	: QMainWindow(parent, f)
{	
    c_widget = new QWidget();

    lab1_1_widget = new lab1_1();
    connect(lab1_1_widget, SIGNAL(progress_val(int &)), this, SLOT(progress_val(int &)));
    connect(lab1_1_widget, SIGNAL(debug_info_sgn(QString &)), this, SLOT(debug_info_sgn(QString &)));
    lab1_1_widget->setDegugInfo(false);

    lab1_2_widget = new lab1_2();
    connect(lab1_2_widget, SIGNAL(progress_val(int &)), this, SLOT(progress_val(int &)));
    connect(lab1_2_widget, SIGNAL(debug_info_sgn(QString &)), this, SLOT(debug_info_sgn(QString &)));
    lab1_2_widget->setDegugInfo(false);

    lab1_3_widget = new lab1_3();
    connect(lab1_3_widget, SIGNAL(progress_val(int &)), this, SLOT(progress_val(int &)));
    connect(lab1_3_widget, SIGNAL(debug_info_sgn(QString &)), this, SLOT(debug_info_sgn(QString &)));
    lab1_3_widget->setDegugInfo(false);

    tabWidget = new QTabWidget();
    tabWidget->addTab(lab1_1_widget, "Lab 1-1");
    tabWidget->addTab(lab1_2_widget, "Lab 1-2");
    tabWidget->addTab(lab1_3_widget, "Lab 1-3");

    textBrowser = new QTextBrowser();
    textBrowser->setMaximumHeight(80);

    QVBoxLayout *mainLayout = new QVBoxLayout(c_widget);
    mainLayout->addWidget(tabWidget);
    mainLayout->addWidget(textBrowser);

    setCentralWidget(c_widget);

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    setWindowIcon(QIcon(":/images/icon.png"));
}
Exemple #22
0
TextEditor::TextEditor(const QString &fileName, QWidget *parent) : QMainWindow(parent)
{
    qDebug("TextEditor()");
    textEdit = new QTextEdit;
    setCentralWidget(textEdit);

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    readSettings();

    connect(textEdit->document(), SIGNAL(contentsChanged()), this, SLOT(documentWasModified()));

    resize( 640,400 );
    if (!fileName.isEmpty())
        loadFile(fileName);
    else
        setCurrentFile("");
}
Exemple #23
0
LevelsWidget::LevelsWidget(const QVector<QString> &vectorDate,
                           const QVector<QVector<double> > &vectorSensorReadings2D,
                           QWidget *parent) :
    QMainWindow(parent)
{
    levelOneDec = new LevelOneDec(vectorDate, vectorSensorReadings2D);
    levelTwoDec = new LevelTwoDec(vectorDate, vectorSensorReadings2D);

    createActions();

    createMenus();

    createCentralLevelsWidget();

    createStatusBar();

    settingsLevelsWindow();

    retranslateUi();

}
Exemple #24
0
worms::worms()
{
      createActions();
      createMenus();
      createToolBars();
      createStatusBar();
      settings = new QSettings("kreved.org", "worms");
      scene = new QGraphicsScene;
      
      scene->addEllipse(QRectF(-100.0, -100.0, 100.0, 100.0));
      scene->setBackgroundBrush(Qt::blue);
      this->
 // a gradient background
 QRadialGradient gradient(0, 0, 10);
 gradient.setSpread(QGradient::RepeatSpread);
 scene->setBackgroundBrush(gradient);
      
      QGraphicsView view(scene);
      view.show();
      readSettings();
}
Exemple #25
0
FenPrincipale::FenPrincipale( QWidget *parent)
: QMainWindow(parent)

{
//    ui->setupUi(this);

    textEdit = new QTextEdit;
  //  setCentralWidget(textEdit);

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();
    createDockWindows();

    //setWindowIcon(":res/feuille_calcul");
      tex.show();
    setWindowTitle(tr("Caltopo"));

   // newLetter();
    setUnifiedTitleAndToolBarOnMac(true);
    //connect( ui-> actionImportGSI, SIGNAL(triggered()), this, SLOT(ImportGSI2()));

//      ui-> actionImportGSI->setShortcut(tr("Ctrl+A"));
//      connect(ui -> actionQuitter, SIGNAL(triggered()), qApp, SLOT(quit()));
//      setWindowTitle(tr("Caltopo"));

//      connect (ui -> actioncreerProjet,SIGNAL(triggered()), this, SLOT(creerProjet()));
//      connect (ui -> actionouvrirProjet,SIGNAL(triggered()), this, SLOT(ouvrirProjet()));
//      connect (ui-> actionafficherTable, SIGNAL(triggered()), this, SLOT(afficherTable()));
//      connect (ui-> actiongestProjet, SIGNAL(triggered()), this, SLOT(gestProjet()));
//      connect (ui-> actionafficherPolygonal, SIGNAL(triggered()), this, SLOT(afficherPolygonal()));
//      connect (ui->actionGoogle_map,SIGNAL (triggered()), this,SLOT (ouvrirWeb()));
//      connect(ui->actionAfficher_la_fen_tre_de_la_polygo,SIGNAL (triggered()), this,SLOT (fenePolygo()));
//      tablemesures->hide();
//        tabless->hide();

        //center = new QTextEdit(this);

}
/* MainWindow */
MainWindow::MainWindow(QWidget* parent)
    : RibbonWindow(parent)
{
    m_ribbonStyle = qobject_cast<Qtitan::RibbonStyle*>(qApp->style());
    Q_ASSERT(m_ribbonStyle != Q_NULL);

    m_widgetFontTextColor = Q_NULL;
    m_popupTableGallery = Q_NULL;
    m_popupUndoGallery = Q_NULL;

    setWindowTitle(tr("Qtitan Ribbon Galleries Sample"));

    createMenuFile();
    createQuickAccessBar();
    createGalleryItems();
    createRibbon();
    createStatusBar();

    move(QPoint(200, 200));
    QRect geom = QApplication::desktop()->availableGeometry();
    resize(2 * geom.width() / 3, 2 * geom.height() / 3);
}
Exemple #27
0
/****************************************************************************
**
** Copyright (C) 2015
**
** This file is generated by the Magus toolkit
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/

// Include
#include <QString>
#include <QFile>
#include <QMenuBar>
#include <QHBoxLayout>
#include <QPixmap>
#include "mainwindow.h"
#include "tool_filereader.h"
#include "tool_gradientwidget.h"
#include "tool_sceneviewwidget.h"
#include "tool_layered_sceneviewwidget.h"
#include "tool_glspherewidget.h"

//****************************************************************************/
MainWindow::MainWindow(void) : mIsClosing(false)
{
    mTextureSelection = 0;
    mTextureSelectionExt = 0;

	// Perform standard functions
    createActions();
    createMenus();
    createToolBars();
    createStatusBar();
    createDockWindows();

    // Set the title
    setWindowTitle(QString("Tools"));

    // Set the stylesheet of the application
    QFile File(QString("dark.qss"));
    File.open(QFile::ReadOnly);
    QString styleSheet = QLatin1String(File.readAll());
    setStyleSheet(styleSheet);
	showMaximized();
}
Exemple #28
0
//! [0]
Window::Window()
{
    glWidget = new GLWidget;
	targetWidget = new TargetView;
	
	QSplitter *splitter = new QSplitter;
	
	splitter->addWidget(glWidget);
    splitter->addWidget(targetWidget);

	setCentralWidget(splitter);
    setWindowTitle(tr("Matching Shape Version 0.8a Sun 5/10/2013"));
	
	createActions();
	createMenus();
	createStatusBar();
	
	updateFitTarget();
	
	connect(targetWidget, SIGNAL(targetChanged(void)), this, SLOT(updateFitTarget(void)));
	connect(glWidget, SIGNAL(needTargetRedraw(void)), this, SLOT(drawRight(void)));
}
Exemple #29
0
CMainWindow::CMainWindow()
{
    textEdit = new QPlainTextEdit;
    setCentralWidget(textEdit);

    createActions();
    createMenus();
    createToolBars();
    createStatusBar();

    readSettings();

    connect(textEdit->document(), SIGNAL(contentsChanged()),
            this, SLOT(documentWasModified()));

    setCurrentFile("");
    setUnifiedTitleAndToolBarOnMac(true);


    // add sample widows ...
    sampleData = new CGraphViewer();
    frecuencyData  = new CGraphViewer();


    nordGroupBox = new QGroupBox(tr("Vertical layout"));

    QVBoxLayout *verticalLayout = new QVBoxLayout;

    //horizontalLayout->addWidget(graph);
    //sampleData->setWindow(0,0,800,200);

    verticalLayout->addWidget(sampleData);
    verticalLayout->addWidget(frecuencyData);

    nordGroupBox->setLayout(verticalLayout);
    setCentralWidget(nordGroupBox);


}
Exemple #30
0
void MainWindow::on_actOpen_triggered()
{
    if (loaded) {

    }


    QString dir = QFileDialog::getExistingDirectory(this, "Выберите папку турнира", QDir::homePath(), QFileDialog::ShowDirsOnly);
    QDir d (dir);
    if (dir.isEmpty()) {return;}
    if (!d.exists(dir + "/tour.db"))
    {
        QMessageBox::critical(this, "Ошибка", "Не найдена БД турнира");
          return;
            }
    QSettings stg(dir+"/settings.ini", QSettings::IniFormat, this);
    stg.beginGroup("Tournament");
    QString type = stg.value("type", "F**K").toString();
    if (type =="league") {
trn = new League (dir);
}
    else if (type == "cup") {
       trn= new Cup(dir);
          }
QStringList lst = trn->getData(1).toStringList();
 appendTable();
   createMenus();
      setWindowTitle(tr("%1 - RKS Manager").arg(trn->title()));
      QString *message = new QString();
 if (trn->checkPlanning(message))
     ui->actPlanning->setText(tr("Спланировать: %1").arg(QVariant(*message).toString()));
else
    ui->mnuLeague->removeAction(ui->actPlanning);
ui->tableWidget->sortByColumn(8);

   loaded = true;
   createStatusBar();
}