|
|
@ -24,8 +24,8 @@
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TabbedWidget::TabbedWidget(TQWidget* tqparent, const char* name, bool translucency)
|
|
|
|
TabbedWidget::TabbedWidget(TQWidget* parent, const char* name, bool translucency)
|
|
|
|
: TranslucentWidget(tqparent, name, translucency)
|
|
|
|
: TranslucentWidget(parent, name, translucency)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
current_position = -1;
|
|
|
|
current_position = -1;
|
|
|
|
pressed = false;
|
|
|
|
pressed = false;
|
|
|
@ -68,26 +68,26 @@ void TabbedWidget::createContextMenu()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
context_menu = new KPopupMenu();
|
|
|
|
context_menu = new KPopupMenu();
|
|
|
|
|
|
|
|
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("split_horizontally")->plug(context_menu);
|
|
|
|
action("split_horizontally")->plug(context_menu);
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("split_vertically")->plug(context_menu);
|
|
|
|
action("split_vertically")->plug(context_menu);
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("remove_terminal")->plug(context_menu);
|
|
|
|
action("remove_terminal")->plug(context_menu);
|
|
|
|
|
|
|
|
|
|
|
|
context_menu->insertSeparator();
|
|
|
|
context_menu->insertSeparator();
|
|
|
|
|
|
|
|
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("move_tab_left")->plug(context_menu);
|
|
|
|
action("move_tab_left")->plug(context_menu);
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("move_tab_right")->plug(context_menu);
|
|
|
|
action("move_tab_right")->plug(context_menu);
|
|
|
|
|
|
|
|
|
|
|
|
context_menu->insertSeparator();
|
|
|
|
context_menu->insertSeparator();
|
|
|
|
|
|
|
|
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("edit_name")->plug(context_menu);
|
|
|
|
action("edit_name")->plug(context_menu);
|
|
|
|
|
|
|
|
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("remove_tab")->plug(context_menu);
|
|
|
|
action("remove_tab")->plug(context_menu);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -452,16 +452,16 @@ void TabbedWidget::mousePressEvent(TQMouseEvent* e)
|
|
|
|
|
|
|
|
|
|
|
|
if (!context_menu) createContextMenu();
|
|
|
|
if (!context_menu) createContextMenu();
|
|
|
|
|
|
|
|
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("move_tab_left")->setEnabled((position - 1 > 0));
|
|
|
|
action("move_tab_left")->setEnabled((position - 1 > 0));
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("move_tab_right")->setEnabled((position - 1 < int(items.count()) - 1));
|
|
|
|
action("move_tab_right")->setEnabled((position - 1 < int(items.count()) - 1));
|
|
|
|
|
|
|
|
|
|
|
|
context_menu->exec(TQCursor::pos());
|
|
|
|
context_menu->exec(TQCursor::pos());
|
|
|
|
|
|
|
|
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("move_tab_left")->setEnabled(true);
|
|
|
|
action("move_tab_left")->setEnabled(true);
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(tqparent()->tqparent()))->actionCollection()->
|
|
|
|
static_cast<KMainWindow*>(TQT_TQWIDGET(parent()->parent()))->actionCollection()->
|
|
|
|
action("move_tab_right")->setEnabled(true);
|
|
|
|
action("move_tab_right")->setEnabled(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|