namespace CPUMonitor
{
partial class frmCPU
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.serSerialPort = new System.IO.Ports.SerialPort(this.components);
this.tmrCPUTimer = new System.Windows.Forms.Timer(this.components);
this.cmbComPort = new System.Windows.Forms.ComboBox();
this.pcCPUUsage = new System.Diagnostics.PerformanceCounter();
this.lblCPU = new System.Windows.Forms.Label();
this.nicoNotifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.btnMinimizeToTray = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pcCPUUsage)).BeginInit();
this.SuspendLayout();
//
// tmrCPUTimer
//
this.tmrCPUTimer.Enabled = true;
this.tmrCPUTimer.Interval = 1000;
this.tmrCPUTimer.Tick += new System.EventHandler(this.tmrCPUTimer_Tick);
//
// cmbComPort
//
this.cmbComPort.FormattingEnabled = true;
this.cmbComPort.Location = new System.Drawing.Point(48, 12);
this.cmbComPort.Name = "cmbComPort";
this.cmbComPort.Size = new System.Drawing.Size(156, 21);
this.cmbComPort.TabIndex = 0;
this.cmbComPort.SelectedIndexChanged += new System.EventHandler(this.cbPort_SelectedIndexChanged);
//
// pcCPUUsage
//
this.pcCPUUsage.CategoryName = "Processor";
this.pcCPUUsage.CounterName = "% Processor Time";
this.pcCPUUsage.InstanceName = "_Total";
//
// lblCPU
//
this.lblCPU.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCPU.Location = new System.Drawing.Point(44, 36);
this.lblCPU.Name = "lblCPU";
this.lblCPU.Size = new System.Drawing.Size(160, 28);
this.lblCPU.TabIndex = 1;
this.lblCPU.Text = "0%";
this.lblCPU.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// nicoNotifyIcon
//
this.nicoNotifyIcon.Text = "CPU Usage Monitor";
this.nicoNotifyIcon.Visible = true;
//
// btnMinimizeToTray
//
this.btnMinimizeToTray.Location = new System.Drawing.Point(12, 67);
this.btnMinimizeToTray.Name = "btnMinimizeToTray";
this.btnMinimizeToTray.Size = new System.Drawing.Size(111, 28);
this.btnMinimizeToTray.TabIndex = 2;
this.btnMinimizeToTray.Text = "Minimize to Tray";
this.btnMinimizeToTray.UseVisualStyleBackColor = true;
this.btnMinimizeToTray.Click += new System.EventHandler(this.btnMinimizeToTray_Click);
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(126, 67);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(111, 28);
this.btnExit.TabIndex = 3;
this.btnExit.Text = "Exit";
this.btnExit.UseVisualStyleBackColor = true;
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// frmCPU
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(249, 106);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnMinimizeToTray);
this.Controls.Add(this.lblCPU);
this.Controls.Add(this.cmbComPort);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "frmCPU";
this.Text = "CPU Usage Monitor";
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pcCPUUsage)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.IO.Ports.SerialPort serSerialPort;
private System.Windows.Forms.Timer tmrCPUTimer;
private System.Windows.Forms.ComboBox cmbComPort;
private System.Diagnostics.PerformanceCounter pcCPUUsage;
private System.Windows.Forms.Label lblCPU;
private System.Windows.Forms.NotifyIcon nicoNotifyIcon;
private System.Windows.Forms.Button btnMinimizeToTray;
private System.Windows.Forms.Button btnExit;
}
}
4'>64
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of a Qt Solutions component.
**
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
** the names of its contributors may be used to endorse or promote
** products derived from this software without specific prior written
** permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
****************************************************************************/
#ifndef OBJECTCONTROLLER_H
#define OBJECTCONTROLLER_H
#include <QWidget>
class ObjectControllerPrivate;
class ObjectController : public QWidget
{
Q_OBJECT
public:
ObjectController(QWidget *parent = 0);
~ObjectController();
void setObject(QObject *object);
QObject *object() const;
private:
ObjectControllerPrivate *d_ptr;
Q_DECLARE_PRIVATE(ObjectController)
Q_DISABLE_COPY(ObjectController)
Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, const QVariant &))
};
#endif
|