• R/O
  • SSH
  • HTTPS

cadencii: コミット


コミットメタ情報

リビジョン1714 (tree)
日時2011-08-06 19:18:32
作者kbinani

ログメッセージ

[Cadencii/trunk] #25598 QtとJavaの分を実装

変更サマリ

差分

--- Cadencii/trunk/BuildJavaUI/src/org/kbinani/cadencii/FormWordDictionaryUiImpl.java (revision 1713)
+++ Cadencii/trunk/BuildJavaUI/src/org/kbinani/cadencii/FormWordDictionaryUiImpl.java (revision 1714)
@@ -284,14 +284,6 @@
284284 }
285285
286286 @Override
287- public void listDictionariesSetColumnWidth(
288- int columnIndex,
289- int columnWidth )
290- {
291- this.listDictionaries.setColumnWidth( columnIndex, columnWidth );
292- }
293-
294- @Override
295287 public int listDictionariesGetSelectedRow()
296288 {
297289 return this.listDictionaries.getSelectedRow();
@@ -311,10 +303,9 @@
311303
312304 @Override
313305 public String listDictionariesGetItemAt(
314- int row,
315- int column )
306+ int row )
316307 {
317- return this.listDictionaries.getItemAt( row, column );
308+ return this.listDictionaries.getItemAt( row, 0 );
318309 }
319310
320311 @Override
@@ -327,10 +318,9 @@
327318 @Override
328319 public void listDictionariesSetItemAt(
329320 int row,
330- int column,
331321 String value )
332322 {
333- this.listDictionaries.setItemAt( row, column, value );
323+ this.listDictionaries.setItemAt( row, 0, value );
334324 }
335325
336326 @Override
@@ -356,27 +346,13 @@
356346
357347 @Override
358348 public void listDictionariesAddRow(
359- String[] values,
349+ String value,
360350 boolean selected )
361351 {
362- this.listDictionaries.addRow( values, selected );
352+ this.listDictionaries.addRow( new String[]{ value }, selected );
363353 }
364354
365355 @Override
366- public int listDictionariesGetColumnWidth(
367- int column )
368- {
369- return this.listDictionaries.getColumnWidth( column );
370- }
371-
372- @Override
373- public void listDictionariesSetColumnHeaders(
374- String[] headers )
375- {
376- this.listDictionaries.setColumnHeaders( headers );
377- }
378-
379- @Override
380356 public void labelAvailableDictionariesSetText(
381357 String value )
382358 {
--- Cadencii/trunk/Cadencii/FormWordDictionaryUiListener.cs (revision 1713)
+++ Cadencii/trunk/Cadencii/FormWordDictionaryUiListener.cs (revision 1714)
@@ -51,7 +51,7 @@
5151
5252 [PureVirtualFunction]
5353 void buttonCancelClick();
54- }
54+ };
5555
5656 #if !JAVA
5757 }
--- Cadencii/trunk/Cadencii/FormWordDictionaryUiImpl.cs (revision 1713)
+++ Cadencii/trunk/Cadencii/FormWordDictionaryUiImpl.cs (revision 1714)
@@ -38,7 +38,17 @@
3838 Util.applyFontRecurse( this, AppManager.editorConfig.getBaseFont() );
3939 }
4040
41+ public void listDictionariesSetColumnWidth( int columnWidth )
42+ {
43+ listDictionaries.Columns[0].Width = columnWidth;
44+ }
4145
46+ public int listDictionariesGetColumnWidth()
47+ {
48+ return listDictionaries.Columns[0].Width;
49+ }
50+
51+
4252 #region FormWordDictionaryUiの実装
4353
4454 public void setTitle( string value )
@@ -66,20 +76,14 @@
6676 this.Close();
6777 }
6878
69- public void listDictionariesSetColumnHeaders( string[] headers )
79+ /*public void listDictionariesSetColumnHeader( string header )
7080 {
71- if ( listDictionaries.Columns.Count < headers.Length )
81+ if ( listDictionaries.Columns.Count < 1 )
7282 {
73- for ( int i = listDictionaries.Columns.Count; i < headers.Length; i++ )
74- {
75- listDictionaries.Columns.Add( "" );
76- }
83+ listDictionaries.Columns.Add( "" );
7784 }
78- for ( int i = 0; i < headers.Length; i++ )
79- {
80- listDictionaries.Columns[i].Text = headers[i];
81- }
82- }
85+ listDictionaries.Columns[0].Text = header;
86+ }*/
8387
8488 public void listDictionariesClearSelection()
8589 {
@@ -86,25 +90,17 @@
8690 listDictionaries.SelectedIndices.Clear();
8791 }
8892
89- public void listDictionariesAddRow( string[] values, bool selected )
93+ public void listDictionariesAddRow( string value, bool selected )
9094 {
91- ListViewItem item = new ListViewItem( values );
92- if ( listDictionaries.Columns.Count < values.Length )
95+ ListViewItem item = new ListViewItem( new string[]{ value } );
96+ if ( listDictionaries.Columns.Count < 1 )
9397 {
94- for ( int i = listDictionaries.Columns.Count; i < values.Length; i++ )
95- {
96- listDictionaries.Columns.Add( "" );
97- }
98+ listDictionaries.Columns.Add( "" );
9899 }
99100 item.Selected = selected;
100101 listDictionaries.Items.Add( item );
101102 }
102103
103- public int listDictionariesGetColumnWidth( int column )
104- {
105- return listDictionaries.Columns[column].Width;
106- }
107-
108104 public void listDictionariesSetRowChecked( int row, bool value )
109105 {
110106 listDictionaries.Items[row].Checked = value;
@@ -118,9 +114,9 @@
118114 }
119115 }
120116
121- public void listDictionariesSetItemAt( int row, int column, string value )
117+ public void listDictionariesSetItemAt( int row, string value )
122118 {
123- listDictionaries.Items[row].SubItems[column].Text = value;
119+ listDictionaries.Items[row].SubItems[0].Text = value;
124120 }
125121
126122 public bool listDictionariesIsRowChecked( int row )
@@ -128,9 +124,9 @@
128124 return listDictionaries.Items[row].Checked;
129125 }
130126
131- public string listDictionariesGetItemAt( int row, int column )
127+ public string listDictionariesGetItemAt( int row )
132128 {
133- return listDictionaries.Items[row].SubItems[column].Text;
129+ return listDictionaries.Items[row].SubItems[0].Text;
134130 }
135131
136132 public int listDictionariesGetSelectedRow()
@@ -155,11 +151,6 @@
155151 listDictionaries.Items.Clear();
156152 }
157153
158- public void listDictionariesSetColumnWidth( int columnIndex, int columnWidth )
159- {
160- listDictionaries.Columns[columnIndex].Width = columnWidth;
161- }
162-
163154 public void buttonDownSetText( string value )
164155 {
165156 btnDown.Text = value;
@@ -284,7 +275,9 @@
284275
285276 #endregion
286277
278+ private ColumnHeader columnHeader1;
287279
280+
288281 #region UI implementation
289282
290283 /// <summary>
@@ -312,10 +305,10 @@
312305 /// </summary>
313306 private void InitializeComponent()
314307 {
315- System.Windows.Forms.ListViewGroup listViewGroup10 = new System.Windows.Forms.ListViewGroup( "ListViewGroup", System.Windows.Forms.HorizontalAlignment.Left );
316- System.Windows.Forms.ListViewGroup listViewGroup11 = new System.Windows.Forms.ListViewGroup( "ListViewGroup", System.Windows.Forms.HorizontalAlignment.Left );
317- System.Windows.Forms.ListViewGroup listViewGroup12 = new System.Windows.Forms.ListViewGroup( "ListViewGroup", System.Windows.Forms.HorizontalAlignment.Left );
318- System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem( "DEFAULT_JP" );
308+ System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup( "ListViewGroup", System.Windows.Forms.HorizontalAlignment.Left );
309+ System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup( "ListViewGroup", System.Windows.Forms.HorizontalAlignment.Left );
310+ System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup( "ListViewGroup", System.Windows.Forms.HorizontalAlignment.Left );
311+ System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem( "DEFAULT_JP" );
319312 this.listDictionaries = new org.kbinani.windows.forms.BListView();
320313 this.lblAvailableDictionaries = new System.Windows.Forms.Label();
321314 this.btnOK = new System.Windows.Forms.Button();
@@ -322,6 +315,7 @@
322315 this.btnCancel = new System.Windows.Forms.Button();
323316 this.btnUp = new System.Windows.Forms.Button();
324317 this.btnDown = new System.Windows.Forms.Button();
318+ this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
325319 this.SuspendLayout();
326320 //
327321 // listDictionaries
@@ -330,22 +324,24 @@
330324 | System.Windows.Forms.AnchorStyles.Left)
331325 | System.Windows.Forms.AnchorStyles.Right)));
332326 this.listDictionaries.CheckBoxes = true;
333- listViewGroup10.Header = "ListViewGroup";
334- listViewGroup10.Name = null;
335- listViewGroup11.Header = "ListViewGroup";
336- listViewGroup11.Name = null;
337- listViewGroup12.Header = "ListViewGroup";
338- listViewGroup12.Name = null;
327+ this.listDictionaries.Columns.AddRange( new System.Windows.Forms.ColumnHeader[] {
328+ this.columnHeader1} );
329+ listViewGroup1.Header = "ListViewGroup";
330+ listViewGroup1.Name = null;
331+ listViewGroup2.Header = "ListViewGroup";
332+ listViewGroup2.Name = null;
333+ listViewGroup3.Header = "ListViewGroup";
334+ listViewGroup3.Name = null;
339335 this.listDictionaries.Groups.AddRange( new System.Windows.Forms.ListViewGroup[] {
340- listViewGroup10,
341- listViewGroup11,
342- listViewGroup12} );
336+ listViewGroup1,
337+ listViewGroup2,
338+ listViewGroup3} );
343339 this.listDictionaries.HideSelection = false;
344- listViewItem4.Checked = true;
345- listViewItem4.Group = listViewGroup12;
346- listViewItem4.StateImageIndex = 1;
340+ listViewItem1.Checked = true;
341+ listViewItem1.Group = listViewGroup3;
342+ listViewItem1.StateImageIndex = 1;
347343 this.listDictionaries.Items.AddRange( new System.Windows.Forms.ListViewItem[] {
348- listViewItem4} );
344+ listViewItem1} );
349345 this.listDictionaries.Location = new System.Drawing.Point( 12, 33 );
350346 this.listDictionaries.Name = "listDictionaries";
351347 this.listDictionaries.Size = new System.Drawing.Size( 248, 186 );
--- Cadencii/trunk/Cadencii/FormWordDictionaryUi.cs (revision 1713)
+++ Cadencii/trunk/Cadencii/FormWordDictionaryUi.cs (revision 1714)
@@ -23,6 +23,10 @@
2323 {
2424 namespace cadencii
2525 {
26+#if __cplusplus
27+ using namespace std;
28+ using namespace org::kbinani::cadencii;
29+#endif
2630
2731 #endif
2832
@@ -87,18 +91,9 @@
8791 [PureVirtualFunction]
8892 void close();
8993
90-
9194 /// <summary>
9295 /// TODO: comment
9396 /// </summary>
94- /// <param name="columIndex"></param>
95- /// <param name="columnWidth"></param>
96- [PureVirtualFunction]
97- void listDictionariesSetColumnWidth( int columIndex, int columnWidth );
98-
99- /// <summary>
100- /// TODO: comment
101- /// </summary>
10297 /// <returns></returns>
10398 [PureVirtualFunction]
10499 int listDictionariesGetSelectedRow();
@@ -123,7 +118,7 @@
123118 /// <param name="column"></param>
124119 /// <returns></returns>
125120 [PureVirtualFunction]
126- string listDictionariesGetItemAt( int row, int column );
121+ string listDictionariesGetItemAt( int row );
127122
128123 /// <summary>
129124 /// TODO:
@@ -140,7 +135,7 @@
140135 /// <param name="column"></param>
141136 /// <param name="value"></param>
142137 [PureVirtualFunction]
143- void listDictionariesSetItemAt( int row, int column, string value );
138+ void listDictionariesSetItemAt( int row, string value );
144139
145140 /// <summary>
146141 /// TODO:
@@ -148,7 +143,7 @@
148143 /// <param name="row"></param>
149144 /// <param name="value"></param>
150145 [PureVirtualFunction]
151- void listDictionariesSetRowChecked( int row, bool value );
146+ void listDictionariesSetRowChecked( int row, bool isChecked );
152147
153148 /// <summary>
154149 /// TODO:
@@ -166,28 +161,12 @@
166161 /// <summary>
167162 /// TODO: comment
168163 /// </summary>
169- /// <param name="values"></param>
164+ /// <param name="value"></param>
170165 /// <param name="selected"></param>
171166 [PureVirtualFunction]
172- void listDictionariesAddRow( string[] values, bool selected );
167+ void listDictionariesAddRow( string value, bool isChecked );
173168
174169 /// <summary>
175- /// TODO: comment
176- /// </summary>
177- /// <param name="column"></param>
178- /// <returns></returns>
179- [PureVirtualFunction]
180- int listDictionariesGetColumnWidth( int column );
181-
182- /// <summary>
183- /// リストのヘッダーの文字列を一括設定します
184- /// </summary>
185- /// <param name="headers">リストのヘッダー文字列のリスト</param>
186- [PureVirtualFunction]
187- void listDictionariesSetColumnHeaders( string[] headers );
188-
189-
190- /// <summary>
191170 /// 「利用可能な辞書」という意味の説明文の文字列を設定します.
192171 /// </summary>
193172 /// <param name="value">設定する文字列</param>
@@ -221,7 +200,7 @@
221200 /// <param name="value">設定する文字列</param>
222201 [PureVirtualFunction]
223202 void buttonDownSetText( string value );
224- }
203+ };
225204
226205 #if !JAVA
227206 }
--- Cadencii/trunk/Cadencii/FormWordDictionaryController.cs (revision 1713)
+++ Cadencii/trunk/Cadencii/FormWordDictionaryController.cs (revision 1714)
@@ -57,7 +57,7 @@
5757 ui = new FormWordDictionaryUiImpl( this );
5858 applyLanguage();
5959 ui.setSize( mWidth, mHeight );
60- ui.listDictionariesSetColumnWidth( 0, mColumnWidth );
60+ ui.listDictionariesSetColumnWidth( mColumnWidth );
6161 }
6262
6363
@@ -76,14 +76,14 @@
7676 try
7777 {
7878 ui.listDictionariesClear();
79- String upper_name = ui.listDictionariesGetItemAt( index, 0 );
79+ String upper_name = ui.listDictionariesGetItemAt( index );
8080 boolean upper_enabled = ui.listDictionariesIsRowChecked( index );
81- String lower_name = ui.listDictionariesGetItemAt( index + 1, 0 );
81+ String lower_name = ui.listDictionariesGetItemAt( index + 1 );
8282 boolean lower_enabled = ui.listDictionariesIsRowChecked( index + 1 );
8383
84- ui.listDictionariesSetItemAt( index + 1, 0, upper_name );
84+ ui.listDictionariesSetItemAt( index + 1, upper_name );
8585 ui.listDictionariesSetRowChecked( index + 1, upper_enabled );
86- ui.listDictionariesSetItemAt( index, 0, lower_name );
86+ ui.listDictionariesSetItemAt( index, lower_name );
8787 ui.listDictionariesSetRowChecked( index, lower_enabled );
8888
8989 ui.listDictionariesSetSelectedRow( index + 1 );
@@ -103,14 +103,14 @@
103103 try
104104 {
105105 ui.listDictionariesClearSelection();
106- String upper_name = ui.listDictionariesGetItemAt( index - 1, 0 );
106+ String upper_name = ui.listDictionariesGetItemAt( index - 1 );
107107 boolean upper_enabled = ui.listDictionariesIsRowChecked( index - 1 );
108- String lower_name = ui.listDictionariesGetItemAt( index, 0 );
108+ String lower_name = ui.listDictionariesGetItemAt( index );
109109 boolean lower_enabled = ui.listDictionariesIsRowChecked( index );
110110
111- ui.listDictionariesSetItemAt( index - 1, 0, lower_name );
111+ ui.listDictionariesSetItemAt( index - 1, lower_name );
112112 ui.listDictionariesSetRowChecked( index - 1, lower_enabled );
113- ui.listDictionariesSetItemAt( index, 0, upper_name );
113+ ui.listDictionariesSetItemAt( index, upper_name );
114114 ui.listDictionariesSetRowChecked( index, upper_enabled );
115115
116116 ui.listDictionariesSetSelectedRow( index - 1 );
@@ -134,13 +134,13 @@
134134 {
135135 String name = SymbolTable.getSymbolTable( i ).getName();
136136 boolean enabled = SymbolTable.getSymbolTable( i ).isEnabled();
137- ui.listDictionariesAddRow( new String[] { name }, enabled );
137+ ui.listDictionariesAddRow( name, enabled );
138138 }
139139 }
140140
141141 public void formClosing()
142142 {
143- mColumnWidth = ui.listDictionariesGetColumnWidth( 0 );
143+ mColumnWidth = ui.listDictionariesGetColumnWidth();
144144 mWidth = ui.getWidth();
145145 mHeight = ui.getHeight();
146146 }
@@ -183,7 +183,7 @@
183183 ui.buttonCancelSetText( _( "Cancel" ) );
184184 ui.buttonUpSetText( _( "Up" ) );
185185 ui.buttonDownSetText( _( "Down" ) );
186- ui.listDictionariesSetColumnHeaders( new String[] { _( "Name of dictionary" ) } );
186+ //ui.listDictionariesSetColumnHeader( _( "Name of dictionary" ) );
187187 }
188188
189189 public Vector<ValuePair<String, Boolean>> getResult()
@@ -195,10 +195,10 @@
195195 #endif
196196 for ( int i = 0; i < count; i++ )
197197 {
198- String name = ui.listDictionariesGetItemAt( i, 0 );
198+ String name = ui.listDictionariesGetItemAt( i );
199199
200200 ret.add( new ValuePair<String, Boolean>(
201- ui.listDictionariesGetItemAt( i, 0 ), ui.listDictionariesIsRowChecked( i ) ) );
201+ ui.listDictionariesGetItemAt( i ), ui.listDictionariesIsRowChecked( i ) ) );
202202 }
203203 return ret;
204204 }
--- Cadencii/trunk/buildQtUI/main.cpp (revision 1713)
+++ Cadencii/trunk/buildQtUI/main.cpp (revision 1714)
@@ -12,6 +12,8 @@
1212
1313 #include "org/kbinani/cadencii/FormAskKeySoundGenerationUiListener.h"
1414 #include "org/kbinani/cadencii/FormAskKeySoundGenerationUiImpl.h"
15+void FormAskKeySoundGenerationUiListener::buttonCancelClickedSlot(){}
16+void FormAskKeySoundGenerationUiListener::buttonOkClickedSlot(){}
1517
1618 #include "org/kbinani/cadencii/WaveformZoomUiListener.h"
1719 #include "org/kbinani/cadencii/WaveformZoomUi.h"
@@ -18,7 +20,13 @@
1820
1921 #include "org/kbinani/cadencii/FormBeatConfigUiListener.h"
2022 #include "org/kbinani/cadencii/FormBeatConfigUiImpl.h"
23+void FormBeatConfigUiListener::buttonCancelClickedSlot(){}
24+void FormBeatConfigUiListener::buttonOkClickedSlot(){}
25+void FormBeatConfigUiListener::checkboxEndCheckedChangedSlot(){}
2126
27+#include "org/kbinani/cadencii/FormWordDictionaryUiListener.h"
28+#include "org/kbinani/cadencii/FormWordDictionaryUiImpl.h"
29+
2230 int UiBase::showDialog(QObject *parent_form){}
2331
2432 int main( int argc, char*argv[] )
@@ -27,12 +35,18 @@
2735
2836 FormAskKeySoundGenerationUiImpl view( 0 );
2937 view.setAlwaysPerformThisCheck( false );
30- view.show();
38+ //view.show();
3139
3240 FormBeatConfigUiImpl formBeatConfigUiImpl( 0 );
3341 formBeatConfigUiImpl.addItemDenominatorCombobox( "foo" );
34- formBeatConfigUiImpl.show();
42+ //formBeatConfigUiImpl.show();
3543
44+ FormWordDictionaryUiImpl formWordDictionaryUiImpl( 0 );
45+ formWordDictionaryUiImpl.listDictionariesAddRow( "foo", false );
46+ formWordDictionaryUiImpl.listDictionariesAddRow( "bar", true );
47+ formWordDictionaryUiImpl.listDictionariesSetSelectedRow( 1 );
48+ formWordDictionaryUiImpl.show();
49+
3650 int ret = formBeatConfigUiImpl.showDialog( &view );
3751 string s = "";
3852 char buff[1024];
--- Cadencii/trunk/buildQtUI/FormWordDictionaryUiImplTest.cpp (nonexistent)
+++ Cadencii/trunk/buildQtUI/FormWordDictionaryUiImplTest.cpp (revision 1714)
@@ -0,0 +1,9 @@
1+/*#include <QtTest/QtTest>
2+
3+class FormWordDictionaryUiImplTest : public QObject
4+{
5+ Q_OBJECT
6+private slots:
7+
8+};
9+*/
--- Cadencii/trunk/buildQtUI/org/kbinani/cadencii/FormWordDictionaryUiImpl.cpp (nonexistent)
+++ Cadencii/trunk/buildQtUI/org/kbinani/cadencii/FormWordDictionaryUiImpl.cpp (revision 1714)
@@ -0,0 +1,145 @@
1+#include "FormWordDictionaryUiImpl.h"
2+#include "ui_FormWordDictionaryUiImpl.h"
3+
4+FormWordDictionaryUiImpl::FormWordDictionaryUiImpl(QWidget *parent) :
5+ QDialog(parent),
6+ ui(new Ui::FormWordDictionaryUiImpl)
7+{
8+ ui->setupUi(this);
9+}
10+
11+FormWordDictionaryUiImpl::~FormWordDictionaryUiImpl()
12+{
13+ delete ui;
14+}
15+
16+void FormWordDictionaryUiImpl::changeEvent(QEvent *e)
17+{
18+ QDialog::changeEvent(e);
19+ switch (e->type()) {
20+ case QEvent::LanguageChange:
21+ ui->retranslateUi(this);
22+ break;
23+ default:
24+ break;
25+ }
26+}
27+
28+void FormWordDictionaryUiImpl::setTitle(string value)
29+{
30+ QDialog::setWindowTitle( QString( value.c_str() ) );
31+}
32+
33+void FormWordDictionaryUiImpl::setDialogResult(bool value)
34+{
35+ dialogResult = value;
36+ close();
37+}
38+
39+void FormWordDictionaryUiImpl::setSize(int width, int height)
40+{
41+ QDialog::setGeometry( QDialog::x(), QDialog::y(), width, height );
42+}
43+
44+int FormWordDictionaryUiImpl::getWidth()
45+{
46+ return QDialog::width();
47+}
48+
49+int FormWordDictionaryUiImpl::getHeight()
50+{
51+ return QDialog::height();
52+}
53+
54+void FormWordDictionaryUiImpl::setLocation(int x, int y)
55+{
56+ QDialog::setGeometry( x, y, QDialog::width(), QDialog::height() );
57+}
58+
59+void FormWordDictionaryUiImpl::close()
60+{
61+ QDialog::close();
62+}
63+
64+int FormWordDictionaryUiImpl::listDictionariesGetSelectedRow()
65+{
66+ return ui->listDictionaries->selectionModel()->currentIndex().row();
67+}
68+
69+int FormWordDictionaryUiImpl::listDictionariesGetItemCountRow()
70+{
71+ return ui->listDictionaries->count();
72+}
73+
74+void FormWordDictionaryUiImpl::listDictionariesClear()
75+{
76+ ui->listDictionaries->clear();
77+}
78+
79+string FormWordDictionaryUiImpl::listDictionariesGetItemAt(int row)
80+{
81+ QListWidgetItem *item = ui->listDictionaries->item( row );
82+ return item->text().toStdString();
83+}
84+
85+bool FormWordDictionaryUiImpl::listDictionariesIsRowChecked(int row)
86+{
87+ QListWidgetItem *item = ui->listDictionaries->item( row );
88+ return item->checkState() == Qt::Checked;
89+}
90+
91+void FormWordDictionaryUiImpl::listDictionariesSetItemAt(int row, string value)
92+{
93+ QListWidgetItem *item = ui->listDictionaries->item( row );
94+ item->setText( QString( value.c_str() ) );
95+}
96+
97+void FormWordDictionaryUiImpl::listDictionariesSetRowChecked(int row, bool value)
98+{
99+ QListWidgetItem *item = ui->listDictionaries->item( row );
100+ item->setCheckState( value ? Qt::Checked : Qt::Unchecked );
101+}
102+
103+void FormWordDictionaryUiImpl::listDictionariesSetSelectedRow(int row)
104+{
105+ ui->listDictionaries->setCurrentRow( row );
106+}
107+
108+void FormWordDictionaryUiImpl::listDictionariesClearSelection()
109+{
110+ ui->listDictionaries->clearSelection();
111+}
112+
113+void FormWordDictionaryUiImpl::listDictionariesAddRow(string value, bool selected)
114+{
115+ ui->listDictionaries->addItem( QString( value.c_str() ) );
116+ QListWidgetItem *item = ui->listDictionaries->item( ui->listDictionaries->count() - 1 );
117+ Qt::ItemFlags flags = item->flags() | Qt::ItemIsUserCheckable;
118+ item->setFlags( flags );
119+ item->setCheckState( selected ? Qt::Checked : Qt::Unchecked );
120+}
121+
122+void FormWordDictionaryUiImpl::labelAvailableDictionariesSetText(string value)
123+{
124+ ui->labelAvailableDictionaries->setText( QString( value.c_str() ) );
125+}
126+
127+void FormWordDictionaryUiImpl::buttonOkSetText(string value)
128+{
129+ ui->buttonOk->setText( QString( value.c_str() ) );
130+}
131+
132+void FormWordDictionaryUiImpl::buttonCancelSetText(string value)
133+{
134+ ui->buttonCancel->setText( QString( value.c_str() ) );
135+}
136+
137+void FormWordDictionaryUiImpl::buttonUpSetText(string value)
138+{
139+ ui->buttonUp->setText( QString( value.c_str() ) );
140+}
141+
142+void FormWordDictionaryUiImpl::buttonDownSetText(string value)
143+{
144+ ui->buttonDown->setText( QString( value.c_str() ) );
145+}
--- Cadencii/trunk/buildQtUI/org/kbinani/cadencii/FormWordDictionaryUiImpl.h (nonexistent)
+++ Cadencii/trunk/buildQtUI/org/kbinani/cadencii/FormWordDictionaryUiImpl.h (revision 1714)
@@ -0,0 +1,54 @@
1+#ifndef FORMWORDDICTIONARYUIIMPL_H
2+#define FORMWORDDICTIONARYUIIMPL_H
3+
4+#include <QDialog>
5+
6+#include "UiBase.h"
7+#include "FormWordDictionaryUi.h"
8+#include "FormWordDictionaryUiListener.h"
9+#include <string>
10+
11+namespace Ui {
12+ class FormWordDictionaryUiImpl;
13+}
14+
15+using namespace org::kbinani::cadencii;
16+using namespace std;
17+
18+class FormWordDictionaryUiImpl : public QDialog, public FormWordDictionaryUi {
19+ Q_OBJECT
20+public:
21+ FormWordDictionaryUiImpl( QWidget *parent = 0 );
22+ ~FormWordDictionaryUiImpl();
23+ void setTitle( string value );
24+ void setDialogResult( bool value );
25+ void setSize( int width, int height );
26+ int getWidth();
27+ int getHeight();
28+ void setLocation( int x, int y );
29+ void close();
30+ int listDictionariesGetSelectedRow();
31+ int listDictionariesGetItemCountRow();
32+ void listDictionariesClear();
33+ string listDictionariesGetItemAt( int row );
34+ bool listDictionariesIsRowChecked( int row );
35+ void listDictionariesSetItemAt( int row, string value );
36+ void listDictionariesSetRowChecked( int row, bool value );
37+ void listDictionariesSetSelectedRow( int row );
38+ void listDictionariesClearSelection();
39+ void listDictionariesAddRow( string value, bool selected );
40+ void labelAvailableDictionariesSetText( string value );
41+ void buttonOkSetText( string value );
42+ void buttonCancelSetText( string value );
43+ void buttonUpSetText( string value );
44+ void buttonDownSetText( string value );
45+
46+protected:
47+ void changeEvent( QEvent *e );
48+
49+private:
50+ Ui::FormWordDictionaryUiImpl *ui;
51+ bool dialogResult;
52+};
53+
54+#endif // FORMWORDDICTIONARYUIIMPL_H
--- Cadencii/trunk/buildQtUI/FormWordDictionaryUiImplTest.h (nonexistent)
+++ Cadencii/trunk/buildQtUI/FormWordDictionaryUiImplTest.h (revision 1714)
@@ -0,0 +1,5 @@
1+#ifndef FORMWORDDICTIONARYUIIMPLTEST_H
2+#define FORMWORDDICTIONARYUIIMPLTEST_H
3+
4+
5+#endif // FORMWORDDICTIONARYUIIMPLTEST_H
旧リポジトリブラウザで表示