<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/qtlab/">
    <title>qtlab</title>
    <link>http://w.atwiki.jp/qtlab/</link>
    <atom:link href="https://w.atwiki.jp/qtlab/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>qtlab</description>

    <dc:language>ja</dc:language>
    <dc:date>2013-08-02T14:30:29+09:00</dc:date>
    <utime>1375421429</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/20.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/30.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/2.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/29.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/27.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/28.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/qtlab/pages/23.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/20.html">
    <title>QFileDialog</title>
    <link>https://w.atwiki.jp/qtlab/pages/20.html</link>
    <description>
      **ファイルダイアログ
-ファイル取得　呼び出し
	//ダイアログでファイルパス取得
	[[QString]] directory = QFileDialog::getSaveFileName(this, 
	//コメント
	tr(&quot;Please Select File&quot;), 
	//初期ディレクトリパス
	QString::fromLocal8Bit(mCoodinateFileNameOUT.c_str()),
	//フィルタ
	&quot;TEXT(*.csv)&quot;);

☆引数　[[QWidget]] 親子ウィジェットの関係・・・基本this 固定で。
	QString キャプション
	QString 初期パス
	QString フィルター

★初期ディレクトリパスの入力は、[[QString]]への変換に注意。

☆フィルタを複数指定する場合
	&quot;Images (*.jpg *.jpeg *.png)&quot;);


-フォルダ取得　呼び出し
	//フォルダ選択ダイアログ
	QString directory = QFileDialog::getExistingDirectory(this, 
	//ダイアログタイトル
	tr(&quot;フォルダを選択してください&quot;), 
	//初期ディレクトリパス
	QString::fromLocal8Bit(&quot;D:\\DATA&quot;));

☆引数　QWidget 親子ウィジェットの関係・・・基本this 固定で。
	QString キャプション
	QString 初期パス

★ファイル指定とほぼ一緒。フィルタの指定がないだけ。    </description>
    <dc:date>2013-08-02T14:30:29+09:00</dc:date>
    <utime>1375421429</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/30.html">
    <title>メニューバー</title>
    <link>https://w.atwiki.jp/qtlab/pages/30.html</link>
    <description>
      **メニューバーの表示と非表示

	//表示
	menuBar-&gt;setVisible(true);

	//非表示
	menuBar-&gt;setVisible(false);    </description>
    <dc:date>2013-08-02T14:04:57+09:00</dc:date>
    <utime>1375419897</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/2.html">
    <title>メニュー</title>
    <link>https://w.atwiki.jp/qtlab/pages/2.html</link>
    <description>
      **メニュー
-[[トップページ]]
-[[開発環境]]
-[[QtDesigner]]
-[[デバッグ]]

-項目
--[[QString]]
--[[スタイル]]
--[[QFileDialog]]
--[[QMessageBox]]
--[[URLオープン]]
--[[設定の保存・読込]]
--[[QGraphicsViewへの表示]]
--[[PDF出力]]
--[[メニューバー]]

-イベント
--[[ドラッグ＆ドロップ]]
--[[タイマー]]
--[[キーボード押下]]

----

**リンク
-[[クラスリファレンス（日本語）&gt;&gt;http://www.kde.gr.jp/~ichi/qt/]]
-[[クラスリファレンス（英語）&gt;&gt;http://www.kde.gr.jp/~ichi/qt/classes.html]]
-[[Qt4.7クラスリファレンス &gt;&gt;http://doc.qt.nokia.com/4.7-snapshot/classes.html]]
-[[タンスの引き出し&gt;&gt;http://memotiyou.blogspot.jp/]]
-[[Qt公式HP &gt;&gt;http://qt.nokia.com/title-jp]]

**他のサービス

// リンクを張るには &quot;[&quot; 2つで文字列を括ります。
// &quot;&gt;&quot; の左側に文字、右側にURLを記述するとリンクになります


//**更新履歴
//#recent(20)

&amp;link_editmenu(text=ここを編集)    </description>
    <dc:date>2013-08-02T14:03:49+09:00</dc:date>
    <utime>1375419829</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/29.html">
    <title>キーボード押下</title>
    <link>https://w.atwiki.jp/qtlab/pages/29.html</link>
    <description>
      **キープレスイベントの実装
ヘッダーにプロテクトで宣言

	protected:
	//イベント関数
	void keyPressEvent(QKeyEvent *event);

関数のソースは以下
	//========================================
	//キープレスイベント キーが押されたとき
	//========================================
	void YLAnalys::keyPressEvent(QKeyEvent *event)
	{
		switch(event-&gt;key())
		{
		//Mキーが押されたとき
		case Qt::Key_M:
			//Mボタンが押された時の処理
			
			break;
			
		//デフォルトでの処理
		default:
			break;
		}
	}    </description>
    <dc:date>2013-08-02T13:59:04+09:00</dc:date>
    <utime>1375419544</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/27.html">
    <title>QGraphicsViewへの表示</title>
    <link>https://w.atwiki.jp/qtlab/pages/27.html</link>
    <description>
      **unsigned char データからの描画
unsigned char image_data_rgba データからの描画ソース

↓メンバ変数として宣言・コンストラクタで初期化
	mScene = new QGraphicsScene();
	graphicsView-&gt;setScene(mScene);
	mPixmapItem = new QGraphicsPixmapItem();

↓描画時に呼び出し
	//QImage作成
	QImage fixedImage(image_data_rgba, sizeX, sizeY, QImage::Format_ARGB32_Premultiplied);
	QPixmap *pixmap = new QPixmap();
	pixmap-&gt;convertFromImage(fixedImage);
	mPixmapItem = mScene-&gt;addPixmap(*pixmap);


**QGraphicsViewを透過して配置
QｔDesignerのQGraphicsViewのプロパティ設定で
Styleseetを background: transparent に設定する。    </description>
    <dc:date>2013-08-01T13:03:03+09:00</dc:date>
    <utime>1375329783</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/28.html">
    <title>PDF出力</title>
    <link>https://w.atwiki.jp/qtlab/pages/28.html</link>
    <description>
      **QPrinterを使ってPDF出力

	//QPrinterの設定
	QPrinter printer(QPrinter::ScreenResolution);
	
	//プリンターダイアログの設定を開く
	QPrintDialog printDialog(&amp;printer, this);		//プリンターの設定ダイアログ
	
	//出力ファイルの名前設定 フォーマット設定
	printer.setOutputFileName(&quot;test.pdf&quot;);			//出力ファイル名
	printer.setOutputFormat(QPrinter::PdfFormat);	//出力フォーマット
	printer.setOrientation(QPrinter::Landscape);	//縦・横
	printer.setPaperSize(QPrinter::A4);				//出力サイズ
	
	//OKなら
	if(printDialog.exec() == QDialog::Accepted)		//プリンタの設定画面表示
	{
		//ペインターに出力
		QPainter painter(&amp;printer);		//prinnterとPainterを接続
		QRect rect = painter.viewport();
		QSize size = image.size();
		size.scale(rect.size(), Qt::KeepAspectRatio);
	
		//サイズの指定
		painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
		painter.setWindow(image.rect());
	
		//QImageをPainterに描画
		painter.drawImage(0, 0, image);
	}    </description>
    <dc:date>2013-03-13T14:41:35+09:00</dc:date>
    <utime>1363153295</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/26.html">
    <title>タイマー</title>
    <link>https://w.atwiki.jp/qtlab/pages/26.html</link>
    <description>
      **タイマーイベントの追加

①タイマーイベント関数を追加（※protected で宣言）
	//========================================
	//タイマーイベント（一定時間ごとに発生）
	//========================================
	void window::timerEvent(QTimerEvent *)
	{
		//処理の記述
	}

②タイマーイベントを有効にする
	int myTimerID = startTimer(1000);
　引数 startTimer
 int タイマーイベント発生間隔 [msec]

③タイマーイベントを無効にする
	killTimer(myTimerID);
　startTimer 関数で取得したIDを渡してタイマーを無効にする    </description>
    <dc:date>2013-03-11T14:15:58+09:00</dc:date>
    <utime>1362978958</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/24.html">
    <title>QMessageBox</title>
    <link>https://w.atwiki.jp/qtlab/pages/24.html</link>
    <description>
      **メッセージボックス
-標準メッセージボックス
ボタン三つ配置

	//テストメッセージボックス
	QMessageBox messageBox(tr(&quot;キャプション&quot;), tr(&quot;メッセージ&quot;), QMessageBox::Warning, 
	Button1, Button2, Button3);

☆引数 
	キャプション　[[QString]]　QString::fromLocal8Bit(&quot;タイトル&quot;)
	メッセージ　  QString　QString::fromLocal8Bit(&quot;メッセージ&quot;)
	アイコン　　　QMessageBox:: Warning など
	Button1~3　 QMessageBox:: Yes, No など

-警告など表示するだけのもの
	QMessageBox msgBox;	//宣言
	msgBox.setText(&quot;完了！&quot;);	//表示テキストセット
	msgBox.exec();		//表示     </description>
    <dc:date>2013-01-10T12:07:28+09:00</dc:date>
    <utime>1357787248</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/25.html">
    <title>設定の保存・読込</title>
    <link>https://w.atwiki.jp/qtlab/pages/25.html</link>
    <description>
      **設定の保存・読込
-設定の保存

☆ラインエディットの保存

	//設定名の保存　独自名
	QSettings setting(&quot;RSLM&quot;,&quot;LumAnlyzeParameter&quot;);
	
	setting.setValue(&quot;設定名&quot;, (値)uiRecipe.lightSpanEdit-&gt;text());

☆ラインエディットの読込

	//設定名の読込　独自名
	QSettings setting(&quot;RSLM&quot;,&quot;LumAnlyzeParameter&quot;);
	
	uiRecipe.lightSpanEdit-&gt;setText(setting.value(&quot;設置値名&quot;, 初期値).toString());    </description>
    <dc:date>2012-12-11T13:31:28+09:00</dc:date>
    <utime>1355200288</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/qtlab/pages/23.html">
    <title>URLオープン</title>
    <link>https://w.atwiki.jp/qtlab/pages/23.html</link>
    <description>
      **URLおーぷえん
アプリケーション上より、
ウェブURLやローカルのファイルを開く場合

↓WEBアドレスを開く
	QUrl url = QUrl( &quot;WEBアドレス&quot;);
	QDesktopServices::openUrl( url );

↓ローカルファイルを開く
	QUrl url = QUrl::fromLocalFile( &quot;ローカルパス&quot;);
	QDesktopServices::openUrl( url );    </description>
    <dc:date>2012-09-27T11:51:52+09:00</dc:date>
    <utime>1348714312</utime>
  </item>
  </rdf:RDF>
