|
|
@ -279,11 +279,11 @@ TQWidgetList* KKbdAccessExtensions::getAllPanels()
|
|
|
|
TQWidget* widget = allWidgets->first();
|
|
|
|
TQWidget* widget = allWidgets->first();
|
|
|
|
while (widget) {
|
|
|
|
while (widget) {
|
|
|
|
if (widget->isVisible()) {
|
|
|
|
if (widget->isVisible()) {
|
|
|
|
if (::tqqt_cast<TQSplitter*>( widget )) {
|
|
|
|
if (::tqt_cast<TQSplitter*>( widget )) {
|
|
|
|
// Only size TQSplitters with at least two handles (there is always one hidden).
|
|
|
|
// Only size TQSplitters with at least two handles (there is always one hidden).
|
|
|
|
if (dynamic_cast<TQSplitter *>(widget)->sizes().count() >= 2)
|
|
|
|
if (dynamic_cast<TQSplitter *>(widget)->sizes().count() >= 2)
|
|
|
|
allPanels->append(widget);
|
|
|
|
allPanels->append(widget);
|
|
|
|
} else if (::tqqt_cast<TQDockWindow*>( widget )) {
|
|
|
|
} else if (::tqt_cast<TQDockWindow*>( widget )) {
|
|
|
|
if (dynamic_cast<TQDockWindow *>(widget)->isResizeEnabled()) {
|
|
|
|
if (dynamic_cast<TQDockWindow *>(widget)->isResizeEnabled()) {
|
|
|
|
// kdDebug() << "KKbdAccessExtensions::getAllPanels: TQDockWindow = " << widget->name() << endl;
|
|
|
|
// kdDebug() << "KKbdAccessExtensions::getAllPanels: TQDockWindow = " << widget->name() << endl;
|
|
|
|
allPanels->append(widget);
|
|
|
|
allPanels->append(widget);
|
|
|
@ -303,7 +303,7 @@ void KKbdAccessExtensions::nextHandle()
|
|
|
|
if (panel) {
|
|
|
|
if (panel) {
|
|
|
|
bool advance = true;
|
|
|
|
bool advance = true;
|
|
|
|
d->handleNdx++;
|
|
|
|
d->handleNdx++;
|
|
|
|
if (::tqqt_cast<TQSplitter*>( panel ))
|
|
|
|
if (::tqt_cast<TQSplitter*>( panel ))
|
|
|
|
advance = (d->handleNdx >= dynamic_cast<TQSplitter *>(panel)->sizes().count());
|
|
|
|
advance = (d->handleNdx >= dynamic_cast<TQSplitter *>(panel)->sizes().count());
|
|
|
|
else
|
|
|
|
else
|
|
|
|
// Undocked windows have only one "handle" (center).
|
|
|
|
// Undocked windows have only one "handle" (center).
|
|
|
@ -345,7 +345,7 @@ void KKbdAccessExtensions::prevHandle()
|
|
|
|
if (allWidgets->current()) panel = allWidgets->prev();
|
|
|
|
if (allWidgets->current()) panel = allWidgets->prev();
|
|
|
|
delete allWidgets;
|
|
|
|
delete allWidgets;
|
|
|
|
if (panel) {
|
|
|
|
if (panel) {
|
|
|
|
if (::tqqt_cast<TQSplitter*>( panel ))
|
|
|
|
if (::tqt_cast<TQSplitter*>( panel ))
|
|
|
|
d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
|
|
|
|
d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (dynamic_cast<TQDockWindow *>(panel)->area())
|
|
|
|
if (dynamic_cast<TQDockWindow *>(panel)->area())
|
|
|
@ -361,7 +361,7 @@ void KKbdAccessExtensions::prevHandle()
|
|
|
|
panel = allWidgets->last();
|
|
|
|
panel = allWidgets->last();
|
|
|
|
delete allWidgets;
|
|
|
|
delete allWidgets;
|
|
|
|
if (panel) {
|
|
|
|
if (panel) {
|
|
|
|
if (::tqqt_cast<TQSplitter*>( panel ))
|
|
|
|
if (::tqt_cast<TQSplitter*>( panel ))
|
|
|
|
d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
|
|
|
|
d->handleNdx = dynamic_cast<TQSplitter *>(panel)->sizes().count() - 1;
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (dynamic_cast<TQDockWindow *>(panel)->area())
|
|
|
|
if (dynamic_cast<TQDockWindow *>(panel)->area())
|
|
|
@ -391,7 +391,7 @@ void KKbdAccessExtensions::showIcon()
|
|
|
|
if (!d->panel) return;
|
|
|
|
if (!d->panel) return;
|
|
|
|
TQPoint p;
|
|
|
|
TQPoint p;
|
|
|
|
// kdDebug() << "KKbdAccessExtensions::showIcon: topLevelWidget = " << d->panel->topLevelWidget()->name() << endl;
|
|
|
|
// kdDebug() << "KKbdAccessExtensions::showIcon: topLevelWidget = " << d->panel->topLevelWidget()->name() << endl;
|
|
|
|
if (::tqqt_cast<TQSplitter*>( d->panel )) {
|
|
|
|
if (::tqt_cast<TQSplitter*>( d->panel )) {
|
|
|
|
TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
|
|
|
|
TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
|
|
|
|
int handleNdx = d->handleNdx - 1;
|
|
|
|
int handleNdx = d->handleNdx - 1;
|
|
|
|
TQValueList<int> sizes = splitter->sizes();
|
|
|
|
TQValueList<int> sizes = splitter->sizes();
|
|
|
@ -461,7 +461,7 @@ void KKbdAccessExtensions::resizePanel(int dx, int dy, int state)
|
|
|
|
int adj = dx + dy;
|
|
|
|
int adj = dx + dy;
|
|
|
|
if (adj == 0) return;
|
|
|
|
if (adj == 0) return;
|
|
|
|
// kdDebug() << "KKbdAccessExtensions::resizePanel: panel = " << d->panel->name() << endl;
|
|
|
|
// kdDebug() << "KKbdAccessExtensions::resizePanel: panel = " << d->panel->name() << endl;
|
|
|
|
if (::tqqt_cast<TQSplitter*>( d->panel )) {
|
|
|
|
if (::tqt_cast<TQSplitter*>( d->panel )) {
|
|
|
|
TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
|
|
|
|
TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel);
|
|
|
|
int handleNdx = d->handleNdx - 1;
|
|
|
|
int handleNdx = d->handleNdx - 1;
|
|
|
|
TQValueList<int> sizes = splitter->sizes();
|
|
|
|
TQValueList<int> sizes = splitter->sizes();
|
|
|
@ -534,7 +534,7 @@ void KKbdAccessExtensions::resizePanelFromKey(int key, int state)
|
|
|
|
if (adj != 0)
|
|
|
|
if (adj != 0)
|
|
|
|
resizePanel(dx, dy, state);
|
|
|
|
resizePanel(dx, dy, state);
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (key == TQt::Key_Enter && ::tqqt_cast<TQDockWindow*>( d->panel )) {
|
|
|
|
if (key == TQt::Key_Enter && ::tqt_cast<TQDockWindow*>( d->panel )) {
|
|
|
|
TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel);
|
|
|
|
TQDockWindow* dockWindow = dynamic_cast<TQDockWindow *>(d->panel);
|
|
|
|
if (dockWindow->area())
|
|
|
|
if (dockWindow->area())
|
|
|
|
dockWindow->undock();
|
|
|
|
dockWindow->undock();
|
|
|
|