Ejemplo n.º 1
0
GuiMainWindow::GuiMainWindow(QWidget *parent)
    : QMainWindow(parent),
      settingsWindow(NULL),
      newTabToolButton(),
      menuCookieTermWnd(NULL),
      dragDropSite()
{
    memset(menuCommonActions, 0, sizeof(menuCommonActions));

    setWindowTitle(APPNAME);

    tabArea = new GuiTabWidget(this);
    tabArea->setTabsClosable(true);
    tabArea->setMovable(true);

    // this removes the frame border of QTabWidget
    tabArea->setDocumentMode(true);

    connect(tabArea, SIGNAL(tabCloseRequested(int)), SLOT(tabCloseRequested(int)));
    connect(tabArea, SIGNAL(currentChanged(int)), SLOT(currentChanged(int)));
    connect(tabArea, SIGNAL(sig_tabChangeSettings(GuiTerminalWindow*)), SLOT(on_changeSettingsTab(GuiTerminalWindow*)));

    initializeMenuSystem();
    inittializeDragDropWidget();

    this->setCentralWidget(tabArea);

    // read & restore the settings
    readSettings();
}
Ejemplo n.º 2
0
GuiMainWindow::GuiMainWindow(QWidget *parent)
    : QMainWindow(parent),
      menuCookieTermWnd(NULL),
      toolBarTerminalTop(this),
      dragDropSite(),
      findToolBar(NULL),
      webPluginWnd(NULL),
      mru_count_last(0),
      tabNavigate(NULL),
      paneNavigate(NULL),
      tabArea(new GuiTabWidget(this)),
      settingsWindow(NULL),
      compactSettingsWindow(NULL),
      newTabToolButton()
{
    setWindowTitle(APPNAME);

    tabArea->setTabsClosable(true);
    tabArea->setMovable(true);

    // this removes the frame border of QTabWidget
    tabArea->setDocumentMode(true);

    connect(tabArea, SIGNAL(tabCloseRequested(int)), SLOT(tabCloseRequested(int)));
    connect(tabArea, SIGNAL(currentChanged(int)), SLOT(currentChanged(int)));
    connect(tabArea->getGuiTabBar(), SIGNAL(sig_tabInserted()), SLOT(on_tabLayoutChanged()));
    connect(tabArea->getGuiTabBar(), SIGNAL(sig_tabRemoved()), SLOT(on_tabLayoutChanged()));
    connect(tabArea->getGuiTabBar(), SIGNAL(tabMoved(int,int)), SLOT(on_tabLayoutChanged()));

    initializeMenuSystem();
    inittializeDragDropWidget();
    toolBarTerminalTop.initializeToolbarTerminalTop(this);

    tabArea->setCornerWidget(&newTabToolButton, Qt::TopLeftCorner);

    this->setCentralWidget(tabArea);

    resize(800, 600);   // initial size
    // read & restore the settings
    readWindowSettings();

}