mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-17 21:36:00 +00:00
683b3a05e2
The idea is simple: we insert a pre-formatted table (with a given border style currently, but other attributes are possible as well) via file-insert and scale it then to the requested size. We need three sizes (1x1, 1x2 and 1x3) to generate all sizes properly (due to border specifications). Currently, these styles can only be accessed via lfun tabular-style-insert and the Tabular Create dialog. My plan is to add a buffer param to set a default style (#9901) which then also is respected by the toolbar button and probably a layout tag to let classes specify a default style (#8360).
68 lines
1.1 KiB
C++
68 lines
1.1 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiTabularCreate.h
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef GUITABULARCREATE_H
|
|
#define GUITABULARCREATE_H
|
|
|
|
#include "GuiDialog.h"
|
|
#include "ui_TabularCreateUi.h"
|
|
|
|
#include <utility>
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
|
|
class GuiTabularCreate : public GuiDialog, public Ui::TabularCreateUi
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GuiTabularCreate(GuiView & lv);
|
|
|
|
private Q_SLOTS:
|
|
void columnsChanged(int);
|
|
void rowsChanged(int);
|
|
void on_styleCO_activated(int);
|
|
|
|
private:
|
|
/// Apply changes
|
|
void applyView();
|
|
///
|
|
bool initialiseParams(std::string const & data);
|
|
/// clean-up on hide.
|
|
void clearParams();
|
|
///
|
|
void dispatchParams();
|
|
///
|
|
bool isBufferDependent() const { return true; }
|
|
///
|
|
FuncCode getLfun() const;
|
|
|
|
///
|
|
typedef std::pair<size_t, size_t> rowsCols;
|
|
///
|
|
rowsCols & params() { return params_; }
|
|
///
|
|
void getFiles();
|
|
|
|
private:
|
|
/// rows, cols params
|
|
rowsCols params_;
|
|
///
|
|
QString style_;
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUITABULARCREATE_H
|