mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
fix tab create to layout properly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2635 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
417a4da175
commit
125bbb8b79
@ -1,3 +1,12 @@
|
||||
2001-08-31 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* QTabularCreateDialog.C: fix warnings
|
||||
|
||||
* emptytable.h:
|
||||
* emptytable.C:
|
||||
* ui/QTabularCreateDialog.ui: fix layout
|
||||
when table size is changed
|
||||
|
||||
2001-08-31 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* Dialogs.C:
|
||||
|
@ -34,13 +34,13 @@ QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form)
|
||||
}
|
||||
|
||||
|
||||
void QTabularCreateDialog::columnsChanged(int nr_cols)
|
||||
void QTabularCreateDialog::columnsChanged(int)
|
||||
{
|
||||
form_->changed();
|
||||
}
|
||||
|
||||
|
||||
void QTabularCreateDialog::rowsChanged(int nr_rows)
|
||||
void QTabularCreateDialog::rowsChanged(int)
|
||||
{
|
||||
form_->changed();
|
||||
}
|
||||
|
@ -24,6 +24,12 @@ EmptyTable::EmptyTable(QWidget * parent, const char * name)
|
||||
setTableFlags(Tbl_autoScrollBars);
|
||||
}
|
||||
|
||||
QSize EmptyTable::sizeHint() const
|
||||
{
|
||||
return QSize(cellsize * numCols(), cellsize * numRows());
|
||||
}
|
||||
|
||||
|
||||
void EmptyTable::paintCell(QPainter *p, int row, int col)
|
||||
{
|
||||
int const x2 = cellWidth(col) - 1;
|
||||
@ -42,6 +48,7 @@ void EmptyTable::setNumberColumns(int nr_cols)
|
||||
return;
|
||||
setAutoUpdate(false);
|
||||
setNumCols(nr_cols);
|
||||
updateGeometry();
|
||||
setAutoUpdate(true);
|
||||
update();
|
||||
emit colsChanged(nr_cols);
|
||||
@ -55,6 +62,7 @@ void EmptyTable::setNumberRows(int nr_rows)
|
||||
return;
|
||||
setAutoUpdate(false);
|
||||
setNumRows(nr_rows);
|
||||
updateGeometry();
|
||||
setAutoUpdate(true);
|
||||
update();
|
||||
emit rowsChanged(nr_rows);
|
||||
|
@ -23,6 +23,8 @@ public:
|
||||
|
||||
~EmptyTable() {};
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
public slots:
|
||||
/// set the number of columns in the table and emit colsChanged() signal
|
||||
void setNumberColumns(int nr_cols);
|
||||
|
@ -13,7 +13,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>281</width>
|
||||
<width>265</width>
|
||||
<height>311</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -157,15 +157,81 @@
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>EmptyTable</class>
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>table</cstring>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Resize this to the correct table dimensions</string>
|
||||
<cstring>Layout3</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<spacer row="0" column="1" >
|
||||
<property>
|
||||
<name>name</name>
|
||||
<cstring>Spacer1_2</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>orientation</name>
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeType</name>
|
||||
<enum>MinimumExpanding</enum>
|
||||
</property>
|
||||
<property>
|
||||
<name>sizeHint</name>
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<spacer row="1" column="0" >
|
||||
<property>
|
||||
<name>name</name>
|
||||
<cstring>Spacer2_2</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>orientation</name>
|
||||
<enum>Vertical</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeType</name>
|
||||
<enum>MinimumExpanding</enum>
|
||||
</property>
|
||||
<property>
|
||||
<name>sizeHint</name>
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget row="0" column="0" >
|
||||
<class>EmptyTable</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>table</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizePolicy</name>
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Resize this to the correct table dimensions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLayoutWidget</class>
|
||||
|
Loading…
Reference in New Issue
Block a user