Ejemplo n.º 1
0
void TabWidget::closeTab(int index)
{
	if(index >= 0)
	{
		emit closeTabRequested(tabText(index));
	}
}
Ejemplo n.º 2
0
void KateTabBar::tabButtonCloseRequest(KateTabButton *tabButton)
{
    // keep width
    if (underMouse()) {
        m_keepTabWidth = true;
    }

    const int id = m_idToTab.key(tabButton, -1);
    Q_ASSERT(id >= 0);
    if (id >= 0) {
        emit closeTabRequested(id);
    }
}
Ejemplo n.º 3
0
PluginTextEditor::PluginTextEditor()
{
	ProjectManager *projectmanager = IPlatform::getInstance()->getProjectManager();
	
	Window *window = IPlatform::getInstance()->getWindowManager()->getWindow();
	QTabWidget *tabwidget = window->getTabWidget();
	QTextEdit *textedit = new QTextEdit(tr("Welcome!"), tabwidget);
	textedit->setReadOnly(true);
	tabwidget->addTab(textedit, tr("Welcome"));
	
	Settings *settings = window->getSettingsDialog();
	PluginPage *pluginpage = new PluginPage(settings);
	settings->addSettingsPage(pluginpage);
	
	connect(projectmanager, SIGNAL(fileOpened(QString)), this, SLOT(openFile(QString)));
	connect(projectmanager, SIGNAL(fileClosed(QString)), this, SLOT(closeFile(QString)));
	connect(window, SIGNAL(closeTabRequested(QString)), this, SLOT(closeFileRequest(QString)));
}