mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-28 19:30:54 +00:00
Set header texts.
This commit is contained in:
parent
e5fd9ca07b
commit
d4f57a1902
2 changed files with 42 additions and 28 deletions
|
@ -50,6 +50,8 @@ void UXTEditor::open( QString filename )
|
|||
d_ptr->t->setColumnCount( 2 );
|
||||
d_ptr->t->setRowCount( infos.size() );
|
||||
|
||||
setHeaderText( "Id", "Text" );
|
||||
|
||||
int i = 0;
|
||||
|
||||
std::vector< STRING_MANAGER::TStringInfo >::const_iterator itr = infos.begin();
|
||||
|
@ -93,4 +95,14 @@ void UXTEditor::closeEvent( QCloseEvent *e )
|
|||
close();
|
||||
}
|
||||
|
||||
void UXTEditor::setHeaderText( const QString &id, const QString &text )
|
||||
{
|
||||
QTableWidgetItem *h1 = new QTableWidgetItem( id );
|
||||
QTableWidgetItem *h2 = new QTableWidgetItem( text );
|
||||
h1->setTextAlignment( Qt::AlignLeft );
|
||||
h2->setTextAlignment( Qt::AlignLeft );
|
||||
d_ptr->t->setHorizontalHeaderItem( 0, h1 );
|
||||
d_ptr->t->setHorizontalHeaderItem( 1, h2 );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,33 +1,35 @@
|
|||
#ifndef UXT_EDITOR_H
|
||||
#define UXT_EDITOR_H
|
||||
|
||||
#include "translation_manager_editor.h"
|
||||
|
||||
namespace TranslationManager
|
||||
{
|
||||
|
||||
class UXTEditorPvt;
|
||||
|
||||
class UXTEditor : public CEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
UXTEditor( QMdiArea *parent = NULL );
|
||||
#ifndef UXT_EDITOR_H
|
||||
#define UXT_EDITOR_H
|
||||
|
||||
#include "translation_manager_editor.h"
|
||||
|
||||
namespace TranslationManager
|
||||
{
|
||||
|
||||
class UXTEditorPvt;
|
||||
|
||||
class UXTEditor : public CEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
UXTEditor( QMdiArea *parent = NULL );
|
||||
~UXTEditor();
|
||||
|
||||
void open( QString filename );
|
||||
void save();
|
||||
void saveAs( QString filename );
|
||||
void activateWindow();
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent *e );
|
||||
|
||||
private:
|
||||
UXTEditorPvt *d_ptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void activateWindow();
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent *e );
|
||||
|
||||
private:
|
||||
void setHeaderText( const QString &id, const QString &text );
|
||||
|
||||
UXTEditorPvt *d_ptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue