]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/emptytable.C
Some string(widget->text()) fixes. Weirdness
[lyx.git] / src / frontends / qt2 / emptytable.C
index c655dcf3430e2c990ee7a30b2ca558b5f95bd780..4f99a215e813ad5473becdd0353a6e3623930650 100644 (file)
@@ -1,18 +1,27 @@
 /**
  * \file emptytable.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "emptytable.h"
 
 /**
  * A simple widget for a quick "preview" in TabularCreateDialog
  */
 
-const unsigned int cellsize = 20;
+unsigned int const cellsize = 20;
+
 
 EmptyTable::EmptyTable(QWidget * parent, const char * name)
        : QtTableView(parent, name, WRepaintNoErase)
@@ -24,13 +33,14 @@ 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)
+void EmptyTable::paintCell(QPainter * p, int row, int col)
 {
        int const x2 = cellWidth(col) - 1;
        int const y2 = cellHeight(row) - 1;
@@ -41,7 +51,7 @@ void EmptyTable::paintCell(QPainter *p, int row, int col)
 
        if (row + 1 != numRows() || col + 1 != numCols())
                return;
+
        // draw handle
        int const step = cellsize / 5;
        int const space = 4;
@@ -56,6 +66,7 @@ void EmptyTable::paintCell(QPainter *p, int row, int col)
        }
 }
 
+
 void EmptyTable::setNumberColumns(int nr_cols)
 {
        if (nr_cols < 1)
@@ -70,6 +81,7 @@ void EmptyTable::setNumberColumns(int nr_cols)
        emit colsChanged(nr_cols);
 }
 
+
 void EmptyTable::setNumberRows(int nr_rows)
 {
        if (nr_rows < 1)
@@ -84,6 +96,7 @@ void EmptyTable::setNumberRows(int nr_rows)
        emit rowsChanged(nr_rows);
 }
 
+
 void EmptyTable::mouseMoveEvent(QMouseEvent *ev)
 {
        int const x = ev->pos().x();