1 /*************************************************************************** 2 * copyright : (C) 2003-2011 by Pascal Brachet * 3 * http://www.xm1math.net/texmaker/ * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 ***************************************************************************/ 11 12 #ifndef Header_Tab_Dialog 13 #define Header_Tab_Dialog 14 15 #include "mostQtHeaders.h" 16 17 #include "ui_tabdialog.h" 18 19 struct colData 20 { 21 int alignment; 22 int leftborder; 23 }; 24 25 struct liData 26 { 27 bool topborder; 28 bool merge; 29 int mergefrom; 30 int mergeto; 31 }; 32 33 class TabDialog : public QDialog { 34 Q_OBJECT 35 public: 36 TabDialog(QWidget *parent=nullptr, const char *name=nullptr); 37 ~TabDialog(); 38 Ui::TabDialog ui; 39 QString getLatexText(); 40 static QStringList getRequiredPackages(const QString &text); 41 QList<colData> colDataList; 42 QList<liData> liDataList; 43 private slots: 44 void NewRows(int num); 45 void NewColumns(int num); 46 void updateSpanStatus(bool enabled); 47 void applytoAllColumns(); 48 void applytoAllLines(); 49 void updateColSettings(); 50 void updateRowSettings(); 51 void showColSettings(int column); 52 void showRowSettings(int row); 53 void showColRowSettings(int row,int column); 54 void updateTableWidget(); 55 private: 56 QStringList alignlist; 57 QStringList alignlistLabels; 58 QStringList borderlist; 59 }; 60 61 62 #endif 63 64