Even that most (or all) tables have the remove button at the section 0, the method defaultColumnWidth should not assume that it will always be true.
This patch will consider the title width of each section, instead of using a static width (which cause problems when the language is not en).
Signed-off-by: Marcos Cardinot <mcardinot@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I hope this time I got it right. basically, the old code
tried to guess where the plus icon should be with a fairly
bad set of defauults.
This one patch asks for the Qt style where everything is and
uses that knowledge to make it be in a more sane position.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Giuseppe Bilotta <giuseppe.bilota@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't hard-code column widths or icon sizes/positions. Instead, compute
them from the fonts used.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
* ensure include guard to every header
* comment endif guard block
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In the offending commit a QWidget was changed to QTableView, but
only in the header - and thus making avaliable all method calls,
but the initialization of the widgets was still a QWidget, and
nothing of QTableView was used besides an incorrect call to
setColumnHidden.
This commit fixes that by using the view() method provided by the
TableView implementation which returns the true QTableView that should be
used for specific nitpicking, like hidding columns. :)
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
To make the planner work this adds a new column to the Cylinder widget
(depth - for the depth at which we want to change to a certain gas
during deco).
This also tries to hide that column in the equipment view and hide the
start/end pressure columns in the planner view. Oddly that fails :-(
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This means we don't have to new/delete them, which is a waste of
overhead.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This means we can also remove the forward declarations.
This is the first step in removing the memory allocation for the ui
sub-classes. Without the second step, this commit is just making the
compilation time increase for no good reason :-)
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>