On Tue, Jan 18, 2011 at 05:06:56AM +0100, tbp wrote: > Hello, Hi. > here is a simple & crude patch against Qt Creator 2.1 RC1 allowing to > toggle the left pane, bottom status bar and menu bar independently, > resulting in, when combined, much more screen estate to be dedicated > to what matters, that is, code; see attached screenshots. > > I've tried to follow prevailing code conventions, and a cursory > testing appears to indicate my patch works as advertised, but since i > couldn't figure what i was supposed to do regarding translations, i've > abstained. Feel free to clue me. > > Advices, comments & insults welcome.
I am afraid you have to go through the process outlined at http://qt.gitorious.org/qt/pages/QtContributionGuidelines. Most of that process is one-time only, so it's not as scary as it looks on first sight. > PS: as Qt/Qt-Creator outsider, i really could have used a little > something to inspect UI hierarchy at run-time. Do you mean you want to be able to select a widget in a running application and examine the data of the widget including parents and children? That works again (as of yesterday or so ;-}) using the "Select Widget to Watch" entry in the context menu of the Locals and Watchers view. > diff -rupN > qt-creator-2.1.0-rc1-src.orig/src/plugins/coreplugin/coreconstants.h > qt-creator-2.1.0-rc1-src/src/plugins/coreplugin/coreconstants.h > --- qt-creator-2.1.0-rc1-src.orig/src/plugins/coreplugin/coreconstants.h > 2010-11-24 16:28:38.000000000 +0100 > +++ qt-creator-2.1.0-rc1-src/src/plugins/coreplugin/coreconstants.h > 2011-01-18 01:54:34.736306002 +0100 > @@ -130,6 +130,9 @@ const char * const EXIT > [...] > +FancyTabWidget::FancyTabWidget(QWidget *parent, QAction > *toggleSidePaneAction, QAction *toggleStatusBarAction) > : QWidget(parent) > { > m_tabBar = new FancyTabBar(this); > @@ -424,6 +425,15 @@ FancyTabWidget::FancyTabWidget(QWidget * > setLayout(mainLayout); > > connect(m_tabBar, SIGNAL(currentChanged(int)), this, > SLOT(showWidget(int))); > + > + m_toggleSidePaneAction = toggleSidePaneAction; Four spaces for indentation. > [...] > > +void Core::Internal::FancyTabWidget::setSidePaneVisible(bool visible) > +{ > + bool is_visible = !m_selectionWidget->isHidden(); > + if (is_visible == visible) > + return; > + if (visible) > + m_selectionWidget->show(); > + else > + m_selectionWidget->hide(); This could be more compact: m_selectionWidget->setVisible(visible); > [...] > +void MainWindow::setSidepaneVisible(bool visible) > +{ > + m_modeStack->setSidePaneVisible(visible); > +} > +void MainWindow::setStatusbarVisible(bool visible) > +{ > + m_modeStack->setStatusBarVisible(visible); > +} One empty line between functions. Andre' _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-creator
