Changeset View
Changeset View
Standalone View
Standalone View
backends/xrandr/xrandrmode.cpp
Show All 9 Lines | |||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | ||
12 | * Lesser General Public License for more details. * | 12 | * Lesser General Public License for more details. * | ||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU Lesser General Public * | 14 | * You should have received a copy of the GNU Lesser General Public * | ||
15 | * License along with this library; if not, write to the Free Software * | 15 | * License along with this library; if not, write to the Free Software * | ||
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * | ||
17 | *************************************************************************************/ | 17 | *************************************************************************************/ | ||
18 | | ||||
19 | #include "xrandrmode.h" | 18 | #include "xrandrmode.h" | ||
20 | #include "xrandroutput.h" | 19 | | ||
21 | #include "mode.h" | 20 | #include "mode.h" | ||
22 | #include "output.h" | 21 | #include "output.h" | ||
22 | #include "xrandroutput.h" | ||||
23 | 23 | | |||
24 | XRandRMode::XRandRMode(const xcb_randr_mode_info_t &modeInfo, XRandROutput *output) | 24 | XRandRMode::XRandRMode(const xcb_randr_mode_info_t &modeInfo, XRandROutput *output) | ||
25 | : QObject(output) | 25 | : QObject(output) | ||
26 | { | 26 | { | ||
27 | m_id = modeInfo.id; | 27 | m_id = modeInfo.id; | ||
28 | // FIXME XCB | 28 | // FIXME XCB | ||
29 | //m_name = QString::fromUtf8(modeInfo->name); | 29 | //m_name = QString::fromUtf8(modeInfo->name); | ||
30 | m_size = QSize(modeInfo.width, modeInfo.height); | 30 | m_size = QSize(modeInfo.width, modeInfo.height); | ||
31 | m_refreshRate = ((float) modeInfo.dot_clock / ((float) modeInfo.htotal * (float) modeInfo.vtotal)); | 31 | m_refreshRate = (float) modeInfo.dot_clock | ||
32 | / ((float) modeInfo.htotal * (float) modeInfo.vtotal); | ||||
32 | } | 33 | } | ||
33 | 34 | | |||
34 | | ||||
35 | XRandRMode::~XRandRMode() | 35 | XRandRMode::~XRandRMode() | ||
36 | { | 36 | { | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | KScreen::ModePtr XRandRMode::toKScreenMode() | 39 | KScreen::ModePtr XRandRMode::toKScreenMode() | ||
40 | { | 40 | { | ||
41 | KScreen::ModePtr kscreenMode(new KScreen::Mode); | 41 | KScreen::ModePtr kscreenMode(new KScreen::Mode); | ||
42 | 42 | | |||
Show All 27 Lines |